1 line
8.1 KiB
JSON
1 line
8.1 KiB
JSON
{"ast":null,"code":"/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { defaults } from 'zrender/lib/core/util.js';\nexport function installTimelineAction(registers) {\n registers.registerAction({\n type: 'timelineChange',\n event: 'timelineChanged',\n update: 'prepareAndUpdate'\n }, function (payload, ecModel, api) {\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel && payload.currentIndex != null) {\n timelineModel.setCurrentIndex(payload.currentIndex);\n\n if (!timelineModel.get('loop', true) && timelineModel.isIndexMax() && timelineModel.getPlayState()) {\n timelineModel.setPlayState(false); // The timeline has played to the end, trigger event\n\n api.dispatchAction({\n type: 'timelinePlayChange',\n playState: false,\n from: payload.from\n });\n }\n } // Set normalized currentIndex to payload.\n\n\n ecModel.resetOption('timeline', {\n replaceMerge: timelineModel.get('replaceMerge', true)\n });\n return defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n });\n registers.registerAction({\n type: 'timelinePlayChange',\n event: 'timelinePlayChanged',\n update: 'update'\n }, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\n }\n });\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/component/timeline/timelineAction.js"],"names":["defaults","installTimelineAction","registers","registerAction","type","event","update","payload","ecModel","api","timelineModel","getComponent","currentIndex","setCurrentIndex","get","isIndexMax","getPlayState","setPlayState","dispatchAction","playState","from","resetOption","replaceMerge","option"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAO,SAASC,qBAAT,CAA+BC,SAA/B,EAA0C;AAC/CA,EAAAA,SAAS,CAACC,cAAV,CAAyB;AACvBC,IAAAA,IAAI,EAAE,gBADiB;AAEvBC,IAAAA,KAAK,EAAE,iBAFgB;AAGvBC,IAAAA,MAAM,EAAE;AAHe,GAAzB,EAIG,UAAUC,OAAV,EAAmBC,OAAnB,EAA4BC,GAA5B,EAAiC;AAClC,QAAIC,aAAa,GAAGF,OAAO,CAACG,YAAR,CAAqB,UAArB,CAApB;;AAEA,QAAID,aAAa,IAAIH,OAAO,CAACK,YAAR,IAAwB,IAA7C,EAAmD;AACjDF,MAAAA,aAAa,CAACG,eAAd,CAA8BN,OAAO,CAACK,YAAtC;;AAEA,UAAI,CAACF,aAAa,CAACI,GAAd,CAAkB,MAAlB,EAA0B,IAA1B,CAAD,IAAoCJ,aAAa,CAACK,UAAd,EAApC,IAAkEL,aAAa,CAACM,YAAd,EAAtE,EAAoG;AAClGN,QAAAA,aAAa,CAACO,YAAd,CAA2B,KAA3B,EADkG,CAC/D;;AAEnCR,QAAAA,GAAG,CAACS,cAAJ,CAAmB;AACjBd,UAAAA,IAAI,EAAE,oBADW;AAEjBe,UAAAA,SAAS,EAAE,KAFM;AAGjBC,UAAAA,IAAI,EAAEb,OAAO,CAACa;AAHG,SAAnB;AAKD;AACF,KAfiC,CAehC;;;AAGFZ,IAAAA,OAAO,CAACa,WAAR,CAAoB,UAApB,EAAgC;AAC9BC,MAAAA,YAAY,EAAEZ,aAAa,CAACI,GAAd,CAAkB,cAAlB,EAAkC,IAAlC;AADgB,KAAhC;AAGA,WAAOd,QAAQ,CAAC;AACdY,MAAAA,YAAY,EAAEF,aAAa,CAACa,MAAd,CAAqBX;AADrB,KAAD,EAEZL,OAFY,CAAf;AAGD,GA5BD;AA6BAL,EAAAA,SAAS,CAACC,cAAV,CAAyB;AACvBC,IAAAA,IAAI,EAAE,oBADiB;AAEvBC,IAAAA,KAAK,EAAE,qBAFgB;AAGvBC,IAAAA,MAAM,EAAE;AAHe,GAAzB,EAIG,UAAUC,OAAV,EAAmBC,OAAnB,EAA4B;AAC7B,QAAIE,aAAa,GAAGF,OAAO,CAACG,YAAR,CAAqB,UAArB,CAApB;;AAEA,QAAID,aAAa,IAAIH,OAAO,CAACY,SAAR,IAAqB,IAA1C,EAAgD;AAC9CT,MAAAA,aAAa,CAACO,YAAd,CAA2BV,OAAO,CAACY,SAAnC;AACD;AACF,GAVD;AAWD","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { defaults } from 'zrender/lib/core/util.js';\nexport function installTimelineAction(registers) {\n registers.registerAction({\n type: 'timelineChange',\n event: 'timelineChanged',\n update: 'prepareAndUpdate'\n }, function (payload, ecModel, api) {\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel && payload.currentIndex != null) {\n timelineModel.setCurrentIndex(payload.currentIndex);\n\n if (!timelineModel.get('loop', true) && timelineModel.isIndexMax() && timelineModel.getPlayState()) {\n timelineModel.setPlayState(false); // The timeline has played to the end, trigger event\n\n api.dispatchAction({\n type: 'timelinePlayChange',\n playState: false,\n from: payload.from\n });\n }\n } // Set normalized currentIndex to payload.\n\n\n ecModel.resetOption('timeline', {\n replaceMerge: timelineModel.get('replaceMerge', true)\n });\n return defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n });\n registers.registerAction({\n type: 'timelinePlayChange',\n event: 'timelinePlayChanged',\n update: 'update'\n }, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\n }\n });\n}"]},"metadata":{},"sourceType":"module"} |