@shijiu/jsview-vue 2.1.448-test.0 → 2.1.482-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/browser/BrowserApic.vue.mjs +4 -4
- package/bin/browser/BrowserApic2.vue.mjs +4 -4
- package/bin/browser/BrowserApicLib.mjs +24 -24
- package/bin/browser/BrowserAudio.vue.mjs +8 -8
- package/bin/browser/BrowserJsvLatex.vue.mjs +27 -15
- package/bin/browser/BrowserPreload.vue.mjs +4 -4
- package/bin/browser/BrowserQrcode.vue.mjs +4 -4
- package/bin/browser/BrowserSpray.vue.mjs +4 -4
- package/bin/browser/BrowserTextureAnim.vue.mjs +4 -4
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +12138 -13910
- package/bin/types/browser/BrowserApic.vue.d.mts +33 -0
- package/bin/types/browser/BrowserApic2.vue.d.mts +16 -0
- package/bin/types/browser/BrowserApicLib.d.mts +56 -0
- package/bin/types/browser/BrowserAudio.vue.d.mts +2 -0
- package/bin/types/browser/BrowserJsvLatex.vue.d.mts +55 -0
- package/bin/types/browser/BrowserPreload.vue.d.mts +14 -0
- package/bin/types/browser/BrowserQrcode.vue.d.mts +29 -0
- package/bin/types/browser/BrowserSpray.vue.d.mts +2 -0
- package/bin/types/browser/BrowserTextureAnim.vue.d.mts +2 -0
- package/bin/types/export-sfc.d.mts +2 -0
- package/bin/types/jsview-vue-common.d.mts +23 -0
- package/bin/types/jsview-vue.d.mts +2511 -0
- package/index.d.ts +3 -4
- package/package.json +1 -1
- package/tools/config/tsconfig.json +7 -10
- package/tools/jsview-vue-build.mjs +25 -4
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +2 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +2 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +94 -38
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +1 -1
- package/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue +0 -1
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +11 -3
- package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +6 -3
- package/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue +20 -0
- package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +13 -3
- package/utils/JsViewPlugin/JsvAudio/index.js +11 -16
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +22 -5
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +3 -1
- package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +20 -0
- package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +13 -3
- package/utils/JsViewPlugin/JsvLatex/index.js +11 -16
- package/utils/JsViewPlugin/index.js +1 -1
- package/utils/JsViewVueTools/ForgeHandles.ts +14 -0
- package/utils/JsViewVueTools/{JsvDynamicKeyFrames.js → JsvDynamicKeyFrames.ts} +2 -2
- package/utils/JsViewVueTools/JsvFederationTools.ts +35 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +36 -37
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +1 -1
- package/utils/JsViewVueTools/index.js +2 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +7 -3
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +4 -2
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +4 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +18 -0
- package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +1 -1
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
- package/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.ts +11 -7
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +135 -61
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.ts +26 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +8 -1
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +6 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +1 -1
- package/bin/browser/BrowserJsvPlayer.vue.mjs +0 -573
- package/utils/JsViewEngineWidget/index.d.ts +0 -28
- package/utils/JsViewPlugin/JsvLatex/mathjax-tex-svg.txt +0 -1
- package/utils/JsViewPlugin/index.d.ts +0 -1
- package/utils/JsViewVueTools/ForgeHandles.js +0 -13
- package/utils/JsViewVueTools/index.d.ts +0 -13
- /package/utils/JsViewVueWidget/JsvSpriteAnim/{sAnimationToken.js → sAnimationToken.ts} +0 -0
|
@@ -26,7 +26,9 @@ import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
|
26
26
|
import ForgeHandles from "../../JsViewVueTools/ForgeHandles";
|
|
27
27
|
import JsvLatexBridgeProxy from "./JsvLatexBridgeProxy";
|
|
28
28
|
import { cssColor2Android } from "./Color";
|
|
29
|
-
import
|
|
29
|
+
import { GetPluginLoader } from "./PluginLoader";
|
|
30
|
+
|
|
31
|
+
let sPluginLoader = GetPluginLoader();
|
|
30
32
|
|
|
31
33
|
const props = defineProps({
|
|
32
34
|
latexStr: {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
import JsvLatex from "./JsvLatex.vue";
|
|
4
|
+
|
|
5
|
+
const AsyncComp = defineAsyncComponent(() => {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
if (!window.JsView) {
|
|
8
|
+
console.log("Load BrowserJsvLatex");
|
|
9
|
+
const BrowserJsvLatex = import("./BrowserJsvLatex.vue");
|
|
10
|
+
resolve(BrowserJsvLatex);
|
|
11
|
+
} else {
|
|
12
|
+
resolve(JsvLatex);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<AsyncComp v-bind="$attrs" />
|
|
20
|
+
</template>
|
|
@@ -166,6 +166,16 @@ class PluginLoader {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
let sPluginLoader = null;
|
|
170
|
+
|
|
171
|
+
function GetPluginLoader() {
|
|
172
|
+
if (sPluginLoader == null) {
|
|
173
|
+
sPluginLoader = new PluginLoader();
|
|
174
|
+
sPluginLoader.registerGlobalListener();
|
|
175
|
+
}
|
|
176
|
+
return sPluginLoader;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export {
|
|
180
|
+
GetPluginLoader
|
|
181
|
+
}
|
|
@@ -3,26 +3,21 @@
|
|
|
3
3
|
* @Date: 2023-02-28 10:18:42
|
|
4
4
|
* @Description: file content
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
7
|
-
import JsvLatex from "./
|
|
6
|
+
import { GetPluginLoader } from "./PluginLoader.js";
|
|
7
|
+
import JsvLatex from "./JsvLatexProxy.vue"
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (!window.JsView) {
|
|
13
|
-
const BrowserJsvLatex = await import("./BrowserJsvLatex.vue");
|
|
14
|
-
//browser
|
|
15
|
-
globalLoadJsvLatexPlugin = (listener) => {
|
|
9
|
+
const globalLoadJsvLatexPlugin = (listener) => {
|
|
10
|
+
if (!window.JsView) {
|
|
16
11
|
setTimeout(listener, 0);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
} else {
|
|
13
|
+
//jsview
|
|
14
|
+
let pluginLoader = GetPluginLoader();
|
|
15
|
+
let innerFunc = pluginLoader.loadPlugin.bind(pluginLoader);
|
|
16
|
+
innerFunc(listener);
|
|
17
|
+
}
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
export {
|
|
26
|
-
|
|
21
|
+
JsvLatex,
|
|
27
22
|
globalLoadJsvLatexPlugin,
|
|
28
23
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
let handles = {
|
|
2
|
+
TextureManager: null,
|
|
3
|
+
RootView: null,
|
|
4
|
+
RootActivity: null
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const jsvCode = (window as any).JsvCode;
|
|
8
|
+
jsvCode.ForgeHandles.listenToReady(()=>{
|
|
9
|
+
handles.TextureManager = jsvCode.ForgeHandles.TextureManager;
|
|
10
|
+
handles.RootView = jsvCode.ForgeHandles.RootView;
|
|
11
|
+
handles.RootActivity = jsvCode.ForgeHandles.RootActivity;
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export default handles;
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* 返回值:
|
|
20
20
|
* KeyFrameStyleSheet 以anchor_tag为锚点,找到对应的cssRule,以此cssRule创建出的KeyFrame管理句柄
|
|
21
21
|
*/
|
|
22
|
-
function getKeyFramesGroup(anchor_tag) {
|
|
23
|
-
return window.JsvCode.Dom.getKeyFrameGroup(anchor_tag);
|
|
22
|
+
function getKeyFramesGroup(anchor_tag: string | null) {
|
|
23
|
+
return (window as any).JsvCode.Dom.getKeyFrameGroup(anchor_tag);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* alterModuleUrl
|
|
4
|
+
*
|
|
5
|
+
* 配置federation remote模块的加载url
|
|
6
|
+
* 注意: 需要在模块进行加载前使用才能生效,否则不生效
|
|
7
|
+
*
|
|
8
|
+
* @param {string} moduleName
|
|
9
|
+
* 远程模块名,例如: RemoteEntry
|
|
10
|
+
* @param {string} newUrl
|
|
11
|
+
* 模块远程url, 此url对应remote build后dist部署的服务器位置,例如: "http://localhost:8088/dist/js/remoteEntry.js"
|
|
12
|
+
*/
|
|
13
|
+
function alterModuleUrl(moduleName: string, newUrl: string) {
|
|
14
|
+
let moduleRef = (window as any).JsvCode.Federation.remotesMap[moduleName];
|
|
15
|
+
if (moduleRef) {
|
|
16
|
+
if (moduleRef.inited) { // 按照Module federation 1.3.4的数据规则, 未加载时, inited为false
|
|
17
|
+
console.error(`Error: can't change INITED module name '${moduleName}'`);
|
|
18
|
+
} else {
|
|
19
|
+
moduleRef.url = newUrl;
|
|
20
|
+
console.log(`Info: set '${moduleName}' to '${newUrl}' succcess`);
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
console.error(`Error: module '${moduleName}' not found`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const JsvFederationTools = {
|
|
28
|
+
alterModuleUrl
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
JsvFederationTools
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
@@ -24,7 +24,7 @@ interface DownloadListItem {
|
|
|
24
24
|
netSetting?: string,
|
|
25
25
|
isImage?: boolean,
|
|
26
26
|
}
|
|
27
|
-
interface infoObject{
|
|
27
|
+
interface infoObject {
|
|
28
28
|
errorCode: number
|
|
29
29
|
errorInfo: string
|
|
30
30
|
url: null
|
|
@@ -39,16 +39,16 @@ abstract class JsvPreDownloaderBase {
|
|
|
39
39
|
if (typeof url === "string") {
|
|
40
40
|
this.downloadInner(url, netSetting, isImage).then(resolve, reject);
|
|
41
41
|
} else if (Array.isArray(url) && url.length > 0) {
|
|
42
|
-
const downloadResult = new Array(url.length);
|
|
42
|
+
const downloadResult = new Array(url.length);
|
|
43
43
|
const check = () => {
|
|
44
44
|
let allDone = false;
|
|
45
|
-
let allSuccess = true;
|
|
45
|
+
let allSuccess = true;
|
|
46
46
|
for (let i of downloadResult) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
if (!i?.succeed) {
|
|
48
|
+
allSuccess = false;
|
|
49
|
+
}
|
|
50
50
|
}
|
|
51
|
-
if(isNullNumber + workNumber == url.length
|
|
51
|
+
if (isNullNumber + workNumber == url.length) {
|
|
52
52
|
|
|
53
53
|
allDone = true;
|
|
54
54
|
}
|
|
@@ -61,10 +61,10 @@ abstract class JsvPreDownloaderBase {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
for (let i = 0; i < url.length; ++i) {
|
|
64
|
-
if(url[i]==null || url[i].url == null
|
|
65
|
-
downloadResult[i]={
|
|
66
|
-
succeed:false,
|
|
67
|
-
info:{
|
|
64
|
+
if (url[i] == null || url[i].url == null) {
|
|
65
|
+
downloadResult[i] = {
|
|
66
|
+
succeed: false,
|
|
67
|
+
info: {
|
|
68
68
|
errorCode: 100,
|
|
69
69
|
errorInfo: "This item is null or url is null",
|
|
70
70
|
url: null
|
|
@@ -73,24 +73,24 @@ abstract class JsvPreDownloaderBase {
|
|
|
73
73
|
isNullNumber += 1
|
|
74
74
|
} else {
|
|
75
75
|
this.downloadInner(url[i].url, url[i].netSetting, !!url[i].isImage)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
76
|
+
.then(
|
|
77
|
+
(info) => {
|
|
78
|
+
downloadResult[i] = {
|
|
79
|
+
succeed: true,
|
|
80
|
+
info: info,
|
|
81
|
+
};
|
|
82
|
+
workNumber += 1
|
|
83
|
+
check();
|
|
84
|
+
},
|
|
85
|
+
(errorInfo) => {
|
|
86
|
+
downloadResult[i] = {
|
|
87
|
+
succeed: false,
|
|
88
|
+
info: errorInfo,
|
|
89
|
+
};
|
|
90
|
+
workNumber += 1
|
|
91
|
+
check();
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
94
|
}
|
|
95
95
|
} else {
|
|
96
96
|
console.error(TAG, "download url invalid", url);
|
|
@@ -99,13 +99,13 @@ abstract class JsvPreDownloaderBase {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
public buildDownloadItem(url: string, netSetting: string = "", isImage: boolean = false)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
public buildDownloadItem(url: string, netSetting: string = "", isImage: boolean = false): DownloadListItem {
|
|
103
|
+
const item: DownloadListItem = {
|
|
104
|
+
url: url,
|
|
105
|
+
netSetting: netSetting,
|
|
106
|
+
isImage: isImage,
|
|
107
|
+
}
|
|
108
|
+
return item
|
|
109
109
|
}
|
|
110
110
|
protected abstract downloadInner(url: string, netSetting: string | undefined, isImage: boolean): Promise<Object>;
|
|
111
111
|
}
|
|
@@ -181,5 +181,4 @@ class JsvPreDownloaderInBrowser extends JsvPreDownloaderBase {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
const exportObj = (window as any).JsView ? JsvPreDownloaderInJsView : JsvPreDownloaderInBrowser;
|
|
184
|
-
(window as any).Test = exportObj;
|
|
185
184
|
export { exportObj as JsvPreDownloader }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ForgeHandles from "../../../JsViewVueTools/ForgeHandles
|
|
1
|
+
import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
|
|
2
2
|
import { TextureBase } from "../Texture"
|
|
3
3
|
import * as Constants from "./CommandList"
|
|
4
4
|
import { RectPath, CirclePath, CustomPath } from "./Path"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
export * from "./JsvHashHistory";
|
|
8
8
|
export * from "./JsvDynamicCssStyle.js";
|
|
9
|
-
export * from "./JsvDynamicKeyFrames.
|
|
9
|
+
export * from "./JsvDynamicKeyFrames.ts";
|
|
10
10
|
export * from "./JsvRuntimeBridge.js";
|
|
11
11
|
export * from "./NinePatchHelper";
|
|
12
12
|
export * from "./TypeCheckAndSet";
|
|
@@ -23,3 +23,4 @@ export * from "./JsvDemoTester.js"
|
|
|
23
23
|
export * from "./JsvPerformance.ts"
|
|
24
24
|
export * from "./JsvTextureStore/JsvTextureStore.ts"
|
|
25
25
|
export * from "./JsvTextureDefines.ts"
|
|
26
|
+
export * from "./JsvFederationTools.ts"
|
|
@@ -33,6 +33,10 @@ class ActorControl {
|
|
|
33
33
|
this._StatePackBuilder = new StatePackBuilder();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
// debugGetAnimId() {
|
|
37
|
+
// return this._BindAnim?.AnimNativeId;
|
|
38
|
+
// }
|
|
39
|
+
|
|
36
40
|
bindForgeView(bindView: any, instantActive: boolean) {
|
|
37
41
|
this._BindView = bindView;
|
|
38
42
|
|
|
@@ -138,8 +142,8 @@ class ActorControl {
|
|
|
138
142
|
|
|
139
143
|
_OnEchoEvent(retJson: string) {
|
|
140
144
|
// 遇到layout后仍然会因为新broadcast有动作时,一帧中可能会有多次回调
|
|
141
|
-
let retJsonObject:
|
|
142
|
-
let echoRetList = retJsonObject["retList"];
|
|
145
|
+
let retJsonObject: any = JSON.parse(retJson);
|
|
146
|
+
let echoRetList: Array<any> = retJsonObject["retList"];
|
|
143
147
|
if (echoRetList) {
|
|
144
148
|
for (let echoRet of echoRetList) {
|
|
145
149
|
let renderBreakId = echoRet["rbTkn"];
|
|
@@ -147,7 +151,7 @@ class ActorControl {
|
|
|
147
151
|
// 标识此RenderBreak完成
|
|
148
152
|
FinishRenderBreak(renderBreakId);
|
|
149
153
|
}
|
|
150
|
-
this._Callbacks.invokeCallback(echoRet["eTkn"], retJsonObject);
|
|
154
|
+
this._Callbacks.invokeCallback(echoRet["eTkn"], retJsonObject, echoRet["cds"], echoRet["ncds"]);
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
}
|
|
@@ -49,7 +49,9 @@ class CallbackManager {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
public invokeCallback(id: string, actorState: Object
|
|
52
|
+
public invokeCallback(id: string, actorState: Object,
|
|
53
|
+
customDataStr: string | null | undefined,
|
|
54
|
+
nexusCustomDataStr:string | null | undefined) {
|
|
53
55
|
let callbackObj = this._CallbackMap.get(id);
|
|
54
56
|
if (callbackObj) {
|
|
55
57
|
if (callbackObj.once) {
|
|
@@ -58,7 +60,7 @@ class CallbackManager {
|
|
|
58
60
|
callbackObj.times++;
|
|
59
61
|
}
|
|
60
62
|
try {
|
|
61
|
-
callbackObj.funcRef?.(actorState);
|
|
63
|
+
callbackObj.funcRef?.(actorState, customDataStr, nexusCustomDataStr);
|
|
62
64
|
} catch (e) {
|
|
63
65
|
// 规避 callback 执行出错导致流程执行不下去
|
|
64
66
|
console.error("Error: callback error", e);
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* 【模块 export 内容】
|
|
3
3
|
* JsvEnvBlocker: 触发FreeMoveAnimation的 blockerCondition 的全屏碰撞体
|
|
4
|
+
* 与FreeMoveAnimation的 setCondition.onHitBlock 配合使用
|
|
4
5
|
* props说明:
|
|
5
6
|
* top, left, width, height(Number): 关联的div的定位信息
|
|
6
7
|
* topGID(Number): 上边缘响应监听的组id(用于blockerCondition的组参数), 0或者undefined代表不激活这条边的测试
|
|
7
8
|
* bottomGID(Number): 下边缘响应监听的组id
|
|
8
9
|
* leftGID(Number): 左边缘响应监听的组id
|
|
9
10
|
* rightGID(Number): 右边缘响应监听的组id
|
|
11
|
+
*
|
|
12
|
+
* 特别说明 GID 是全局共享的,例如多个EnvBlocker都有GID=2设置的边时,某个FreeMove实例设置setCondition.onHitBlock(2),
|
|
13
|
+
* 意味着此FreeMoveAnimation碰撞任何一个EnvBlocker的GID=2的边都会触发回调
|
|
10
14
|
*
|
|
11
15
|
-->
|
|
12
16
|
|
|
@@ -194,6 +194,16 @@ class ConditionPackBuilder {
|
|
|
194
194
|
return this._BuildPack(ConditionSetBuilder.OnNextTick(tickGap, this._CommonInfo));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/** 指定的swapcount前才能执行 */
|
|
198
|
+
onSwapCount() {
|
|
199
|
+
// CommonInfo 只能使用一次,规避多次使用问题
|
|
200
|
+
if (!this._CheckCommonInfo()) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
this._CommonInfoValid = false;
|
|
204
|
+
return this._BuildPack(ConditionSetBuilder.onSwapCount(0, this._CommonInfo));
|
|
205
|
+
}
|
|
206
|
+
|
|
197
207
|
onDragStart() {
|
|
198
208
|
if (!this._CheckCommonInfo()) {
|
|
199
209
|
return null;
|
|
@@ -259,6 +269,14 @@ class ConditionPackBuilder {
|
|
|
259
269
|
return this._BuildPack(ConditionSetBuilder.OnFlingCancel(this._CommonInfo, this._ContorlSlefNexus.token));
|
|
260
270
|
}
|
|
261
271
|
|
|
272
|
+
touchCount(count: number) {
|
|
273
|
+
if (!this._CheckCommonInfo()) {
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
this._CommonInfoValid = false;
|
|
277
|
+
return this._BuildPack(ConditionSetBuilder.TouchCount(this._CommonInfo, count));
|
|
278
|
+
}
|
|
279
|
+
|
|
262
280
|
_CheckCommonInfo(): boolean {
|
|
263
281
|
if (!this._CommonInfoValid) {
|
|
264
282
|
console.error("Error: must call from new conditoin()");
|
|
@@ -154,11 +154,12 @@ export default {
|
|
|
154
154
|
qrCodeView: null,
|
|
155
155
|
};
|
|
156
156
|
},
|
|
157
|
-
|
|
157
|
+
beforeUnmount() {
|
|
158
158
|
if (this.innerViewId !== -1) {
|
|
159
159
|
Forge.sViewStore.remove(this.innerViewId);
|
|
160
160
|
this.innerViewId = -1;
|
|
161
161
|
this.jsvBaseView = null;
|
|
162
|
+
console.log("success remove innerview");
|
|
162
163
|
}
|
|
163
164
|
},
|
|
164
165
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getKeyFramesGroup } from "../../JsViewVueTools/JsvDynamicKeyFrames
|
|
2
|
-
import { getsAnimationToken } from "./sAnimationToken
|
|
1
|
+
import { getKeyFramesGroup } from "../../JsViewVueTools/JsvDynamicKeyFrames";
|
|
2
|
+
import { getsAnimationToken } from "./sAnimationToken";
|
|
3
3
|
|
|
4
4
|
let keyFrameStyleSheet = getKeyFramesGroup(null);
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ class TransformInfoResule {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
class SpritePack {
|
|
20
|
-
public keyFrameRefName: String | null = null;
|
|
20
|
+
public keyFrameRefName: String | null = null; // 可用来识别是否有动画(静图无动画)
|
|
21
21
|
public clipKeyFrameName: String | null = null;
|
|
22
22
|
public transKeyFrameName: String | null = null;
|
|
23
23
|
public clipStyle: any = null; // 对应clip div的style控制
|
|
@@ -73,11 +73,15 @@ function expireAnimates(runningSprite: SpritePack | null) {
|
|
|
73
73
|
if (!runningSprite) {
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
let keyFrameRefName = runningSprite.keyFrameRefName;
|
|
77
|
-
const names_array = [`${keyFrameRefName}-clip`, `${keyFrameRefName}-image`];
|
|
78
76
|
|
|
79
|
-
if (
|
|
80
|
-
|
|
77
|
+
if (runningSprite.keyFrameRefName) {
|
|
78
|
+
// 动态frame要进行keyFrame清理,静态则不需要
|
|
79
|
+
let keyFrameRefName = runningSprite.keyFrameRefName;
|
|
80
|
+
const names_array = [`${keyFrameRefName}-clip`, `${keyFrameRefName}-image`];
|
|
81
|
+
|
|
82
|
+
if (keyFrameStyleSheet) {
|
|
83
|
+
keyFrameStyleSheet.removeMultiRules(names_array);
|
|
84
|
+
}
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
|