@shijiu/jsview-vue 2.2.35 → 2.2.128
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 +2 -1
- package/bin/browser/BrowserApic2.vue.mjs +2 -1
- package/bin/browser/BrowserApicLib.mjs +2 -1
- package/bin/browser/BrowserQrcode.vue.mjs +3 -1
- package/bin/browser/BrowserTextureAnim.vue.mjs +7 -6
- package/bin/jsview-vue.mjs +1557 -894
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +21 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +2 -8
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +9 -3
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +2 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +113 -57
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +8 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +65 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorState.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +11 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +15 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +71 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +95 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +62 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +2 -1
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +66 -28
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +176 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +7 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +3 -3
- package/bin/types/JsViewVueWidget/index.d.ts +1 -0
- package/package.json +1 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +10 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +398 -309
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +2 -1
- package/utils/JsViewEngineWidget/MetroWidget/Slide.ts +56 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +51 -10
- package/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.ts +10 -0
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +9 -3
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +25 -35
- package/utils/JsViewEngineWidget/WidgetCommon.ts +20 -7
- package/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue +13 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +470 -338
- package/utils/JsViewVueTools/ConstSymbol.ts +3 -0
- package/utils/JsViewVueTools/ForgeConstDefine.ts +11 -0
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +172 -50
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +62 -0
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +41 -7
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +15 -1
- package/utils/JsViewVueTools/index.js +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +6 -6
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +5 -6
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.js +5 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.ts +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +23 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.ts +4 -4
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +6 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +43 -9
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +24 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +50 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +56 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +3 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +6 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +121 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +4 -1
- package/utils/JsViewVueWidget/JsvPosterImage.vue +22 -9
- package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +6 -2
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +309 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +15 -0
- package/utils/JsViewVueWidget/JsvScrollBox/index.js +2 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +12 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +9 -6
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +2 -0
- package/utils/JsViewVueWidget/index.js +1 -0
package/bin/jsview-vue.mjs
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Forge as Forge$1 } from '@shijiu/jsview/dom/jsv-forge-define.mjs';
|
|
2
|
+
import { ref, computed, toRaw, reactive, nextTick, onMounted, onUpdated, onBeforeUnmount, onBeforeUpdate, openBlock, createElementBlock, renderSlot, shallowRef, resolveComponent, normalizeStyle, createElementVNode, unref, mergeProps, toHandlers, createVNode, withCtx, Fragment, renderList, createCommentVNode, inject, provide, onUnmounted, onActivated, onDeactivated, createBlock, defineAsyncComponent, normalizeProps, guardReactiveProps, watchEffect, toDisplayString, watch, shallowReactive, withDirectives, vShow, defineComponent } from 'vue';
|
|
3
|
+
import { Forge as Forge$2, ForgeExtension } from '@shijiu/jsview/dom/jsv-forge-define';
|
|
3
4
|
import { createWebHashHistory, createMemoryHistory } from 'vue-router';
|
|
4
|
-
import { Forge as Forge$2 } from '@shijiu/jsview/dom/jsv-forge-define.mjs';
|
|
5
5
|
import { L as LoopType } from './jsview-vue-common.mjs';
|
|
6
6
|
export { A as ApicEndState } from './jsview-vue-common.mjs';
|
|
7
7
|
import { _ as _export_sfc } from './export-sfc.mjs';
|
|
8
8
|
|
|
9
|
+
//
|
|
10
|
+
// utils/JsViewVueTools/ConstSymbol.ts;
|
|
11
|
+
//
|
|
12
|
+
const VERTICAL = Symbol("vertical");
|
|
13
|
+
const HORIZONTAL = Symbol("horizontal");
|
|
14
|
+
|
|
9
15
|
//
|
|
10
16
|
// utils/JsViewEngineWidget/WidgetCommon.ts;
|
|
11
17
|
//
|
|
18
|
+
const getCurFrameCount = () => {
|
|
19
|
+
return Forge$1.sFrameCount.count;
|
|
20
|
+
};
|
|
12
21
|
class BaseDispatcher {
|
|
13
22
|
_Component;
|
|
14
23
|
constructor() {
|
|
@@ -86,8 +95,6 @@ const SlideStyle = {
|
|
|
86
95
|
startBoundaryProtect: 1,
|
|
87
96
|
endBoundaryProtect: 2
|
|
88
97
|
};
|
|
89
|
-
const VERTICAL = Symbol("vertical");
|
|
90
|
-
const HORIZONTAL = Symbol("horizontal");
|
|
91
98
|
const defaultSpeed = 1.5;
|
|
92
99
|
const defaultEasing = "";
|
|
93
100
|
class SlideSetting {
|
|
@@ -129,11 +136,15 @@ class SeamlessSlide extends SlideSetting {
|
|
|
129
136
|
StartPercent;
|
|
130
137
|
EndPercent;
|
|
131
138
|
FixFirstPage;
|
|
139
|
+
HeadSafeArea;
|
|
140
|
+
TailSafeArea;
|
|
132
141
|
constructor({
|
|
133
142
|
startPercent = 0.2,
|
|
134
143
|
endPercent = 0.8,
|
|
135
144
|
headRange = void 0,
|
|
136
145
|
tailRange = void 0,
|
|
146
|
+
headSafeArea = 0.1,
|
|
147
|
+
tailSafeArea = 0.1,
|
|
137
148
|
speed = defaultSpeed,
|
|
138
149
|
duration = null,
|
|
139
150
|
easing = defaultEasing,
|
|
@@ -147,13 +158,15 @@ class SeamlessSlide extends SlideSetting {
|
|
|
147
158
|
this.StartPercent = headRange;
|
|
148
159
|
}
|
|
149
160
|
if (typeof tailRange !== "undefined") {
|
|
150
|
-
this.EndPercent = tailRange;
|
|
161
|
+
this.EndPercent = 1 - tailRange;
|
|
151
162
|
}
|
|
152
163
|
if (this.StartPercent < 0 || this.StartPercent > 1 || this.EndPercent < 0 || this.EndPercent > 1) {
|
|
153
164
|
console.error(`SeamlessSlideSetting error: invalide value, startPercent(${this.StartPercent}) and endPercent(${this.EndPercent}) must between 0 and 1.`);
|
|
154
|
-
this.StartPercent = 0.
|
|
155
|
-
this.EndPercent = 0.
|
|
165
|
+
this.StartPercent = 0.3;
|
|
166
|
+
this.EndPercent = 0.7;
|
|
156
167
|
}
|
|
168
|
+
this.HeadSafeArea = headSafeArea;
|
|
169
|
+
this.TailSafeArea = tailSafeArea;
|
|
157
170
|
this.FixFirstPage = fixFirstPage;
|
|
158
171
|
}
|
|
159
172
|
}
|
|
@@ -394,6 +407,50 @@ const METRO_WIDGET = {
|
|
|
394
407
|
}
|
|
395
408
|
};
|
|
396
409
|
|
|
410
|
+
//
|
|
411
|
+
// utils/JsViewEngineWidget/MetroWidget/Slide.ts;
|
|
412
|
+
//
|
|
413
|
+
class RectCache {
|
|
414
|
+
preRect = null;
|
|
415
|
+
curRect = null;
|
|
416
|
+
cache(rect) {
|
|
417
|
+
if (this.curRect && this.curRect.frameCount < rect?.frameCount) {
|
|
418
|
+
this.preRect = this.curRect;
|
|
419
|
+
}
|
|
420
|
+
this.curRect = rect;
|
|
421
|
+
}
|
|
422
|
+
cacheManually() {
|
|
423
|
+
if (this.curRect && this.curRect.frameCount < getCurFrameCount()) {
|
|
424
|
+
this.preRect = this.curRect;
|
|
425
|
+
this.curRect = null;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
getCurRect() {
|
|
429
|
+
return this.curRect ? { ...this.curRect } : null;
|
|
430
|
+
}
|
|
431
|
+
getPreRect() {
|
|
432
|
+
return this.preRect ? { ...this.preRect } : null;
|
|
433
|
+
}
|
|
434
|
+
updatePre(key, value) {
|
|
435
|
+
if (this.preRect) {
|
|
436
|
+
let p = this.preRect[key];
|
|
437
|
+
this.preRect[key] = value;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
clean() {
|
|
441
|
+
this.preRect = null;
|
|
442
|
+
this.curRect = null;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
const getDirectionByRect = (curRect, preRect) => {
|
|
446
|
+
if (!preRect || !curRect)
|
|
447
|
+
return { horizontal: 0, vertical: 0 };
|
|
448
|
+
return {
|
|
449
|
+
horizontal: curRect.left < preRect.left ? -1 : curRect.left > preRect.left ? 1 : 0,
|
|
450
|
+
vertical: curRect.top < preRect.top ? -1 : curRect.top > preRect.top ? 1 : 0
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
|
|
397
454
|
//
|
|
398
455
|
// utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts;
|
|
399
456
|
//
|
|
@@ -584,49 +641,39 @@ class MetroTemplate {
|
|
|
584
641
|
if (itemObj.uid) {
|
|
585
642
|
this.uidMap[itemObj.uid] = item;
|
|
586
643
|
}
|
|
644
|
+
item.layoutCache.cache({
|
|
645
|
+
left: item.left,
|
|
646
|
+
top: item.top,
|
|
647
|
+
width: item.width,
|
|
648
|
+
height: item.height,
|
|
649
|
+
frameCount: getCurFrameCount()
|
|
650
|
+
});
|
|
587
651
|
return item;
|
|
588
652
|
}
|
|
589
653
|
getBoundingBoxSize() {
|
|
590
654
|
const lastItem = this.templateList[this.templateList.length - 1];
|
|
591
|
-
if (
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
655
|
+
if (lastItem) {
|
|
656
|
+
if (this.direction == VERTICAL) {
|
|
657
|
+
return {
|
|
658
|
+
width: this.lineMax,
|
|
659
|
+
height: lastItem.height + lastItem.top - 1
|
|
660
|
+
};
|
|
661
|
+
} else {
|
|
662
|
+
return {
|
|
663
|
+
height: this.lineMax,
|
|
664
|
+
width: lastItem.width + lastItem.left - 1
|
|
665
|
+
};
|
|
666
|
+
}
|
|
596
667
|
} else {
|
|
597
668
|
return {
|
|
598
|
-
|
|
599
|
-
|
|
669
|
+
width: 0,
|
|
670
|
+
height: 0
|
|
600
671
|
};
|
|
601
672
|
}
|
|
602
673
|
}
|
|
603
674
|
getTailItemIndex() {
|
|
604
675
|
return this.tailItemIndex;
|
|
605
676
|
}
|
|
606
|
-
cacheLayout(start, end) {
|
|
607
|
-
if (typeof end == "undefined") {
|
|
608
|
-
end = this.templateList.length;
|
|
609
|
-
}
|
|
610
|
-
end = Math.min(end, this.templateList.length);
|
|
611
|
-
for (let i = start; i < end; ++i) {
|
|
612
|
-
let item = this.templateList[i];
|
|
613
|
-
item.layoutCache = {
|
|
614
|
-
left: item.left,
|
|
615
|
-
top: item.top,
|
|
616
|
-
width: item.width,
|
|
617
|
-
height: item.height
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
this.cachedLayoutRange.push([start, end]);
|
|
621
|
-
}
|
|
622
|
-
cleanLayoutCache() {
|
|
623
|
-
for (let r of this.cachedLayoutRange) {
|
|
624
|
-
for (let i = r[0]; i < r[1]; ++i) {
|
|
625
|
-
this.templateList[i].layoutCache = null;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
this.cachedLayoutRange = [];
|
|
629
|
-
}
|
|
630
677
|
static getTemplateItem(itemObj) {
|
|
631
678
|
const valid = this.checkMeasureObject(itemObj);
|
|
632
679
|
if (!valid) {
|
|
@@ -667,7 +714,7 @@ class MetroTemplate {
|
|
|
667
714
|
top: -1,
|
|
668
715
|
bottom: -1
|
|
669
716
|
},
|
|
670
|
-
layoutCache:
|
|
717
|
+
layoutCache: new RectCache()
|
|
671
718
|
};
|
|
672
719
|
}
|
|
673
720
|
static checkMeasureObject(obj) {
|
|
@@ -2212,6 +2259,13 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
2212
2259
|
}
|
|
2213
2260
|
for (let i of needChangeList) {
|
|
2214
2261
|
this._addTemplateItem(i);
|
|
2262
|
+
i.layoutCache.cache({
|
|
2263
|
+
left: i.left,
|
|
2264
|
+
top: i.top,
|
|
2265
|
+
width: i.width,
|
|
2266
|
+
height: i.height,
|
|
2267
|
+
frameCount: getCurFrameCount()
|
|
2268
|
+
});
|
|
2215
2269
|
}
|
|
2216
2270
|
}
|
|
2217
2271
|
}
|
|
@@ -2305,6 +2359,23 @@ class PageUpdater {
|
|
|
2305
2359
|
}
|
|
2306
2360
|
}
|
|
2307
2361
|
|
|
2362
|
+
//
|
|
2363
|
+
// utils/JsViewVueTools/ForgeConstDefine.ts;
|
|
2364
|
+
//
|
|
2365
|
+
var ForgeConst;
|
|
2366
|
+
((ForgeConst2) => {
|
|
2367
|
+
let DragFlags;
|
|
2368
|
+
((DragFlags2) => {
|
|
2369
|
+
DragFlags2.TOUCH_RECV_CLICK_BIT = 1;
|
|
2370
|
+
DragFlags2.TOUCH_RECV_LONGPRESS_BIT = 2;
|
|
2371
|
+
DragFlags2.TOUCH_RECV_MOVE_BIT = 4;
|
|
2372
|
+
DragFlags2.TOUCH_RECV_FLING_BIT = 32;
|
|
2373
|
+
DragFlags2.TOUCH_RECV_FIRST_START = 8;
|
|
2374
|
+
DragFlags2.TOUCH_RECV_LAST_END = 16;
|
|
2375
|
+
DragFlags2.DRAG_ANY = 16777215;
|
|
2376
|
+
})(DragFlags = ForgeConst2.DragFlags || (ForgeConst2.DragFlags = {}));
|
|
2377
|
+
})(ForgeConst || (ForgeConst = {}));
|
|
2378
|
+
|
|
2308
2379
|
//
|
|
2309
2380
|
// utils/JsViewEngineWidget/MetroWidget/RenderItem.ts;
|
|
2310
2381
|
//
|
|
@@ -2415,7 +2486,7 @@ class RenderItem {
|
|
|
2415
2486
|
this.divMountedCallback.clear();
|
|
2416
2487
|
if (this.enableTap && this.rootDiv) {
|
|
2417
2488
|
const divView = this.rootDiv.jsvGetProxyView();
|
|
2418
|
-
divView.DragEnables?.(
|
|
2489
|
+
divView.DragEnables?.(ForgeConst.DragFlags.TOUCH_RECV_CLICK_BIT);
|
|
2419
2490
|
}
|
|
2420
2491
|
}
|
|
2421
2492
|
onDivUnmounted() {
|
|
@@ -2745,6 +2816,11 @@ class ConditionPackBuilder {
|
|
|
2745
2816
|
this._CommonInfoValid = false;
|
|
2746
2817
|
return this._BuildPack(ConditionSetBuilder.OnFlingDrop(this._CommonInfo, this._ContorlSlefNexus.token));
|
|
2747
2818
|
}
|
|
2819
|
+
/**
|
|
2820
|
+
* touchCount
|
|
2821
|
+
* 当touchDown时,Count会++,用于解决多次touchDown引发的时序问题
|
|
2822
|
+
* 当native的count计数等于给定的参数设定的count时,触发condition
|
|
2823
|
+
*/
|
|
2748
2824
|
touchCount(count) {
|
|
2749
2825
|
if (!this._CheckCommonInfo()) {
|
|
2750
2826
|
return null;
|
|
@@ -2752,6 +2828,46 @@ class ConditionPackBuilder {
|
|
|
2752
2828
|
this._CommonInfoValid = false;
|
|
2753
2829
|
return this._BuildPack(ConditionSetBuilder.TouchCount(this._CommonInfo, count));
|
|
2754
2830
|
}
|
|
2831
|
+
/**
|
|
2832
|
+
* onMovement
|
|
2833
|
+
* 当FreeMove块移动时,移动了给定的距离值后触发条件, 给定的距离值由sensitivity定义
|
|
2834
|
+
*
|
|
2835
|
+
* @param {float} xSensitivity x轴的敏感度设置,表示移动了多少像素时就触发条件, 最小值为1
|
|
2836
|
+
* @param {float} ySensitivity y轴的敏感度设置,表示移动了多少像素时就触发条件, undefined时等于xSensitivity
|
|
2837
|
+
* @param {int} xyEnables x,y两轴哪个生效, 0b1 为x, 0b10 为y, 默认为都enable
|
|
2838
|
+
*/
|
|
2839
|
+
onMovement(xSensitivity, ySensitivity = void 0, xyEnables = void 0) {
|
|
2840
|
+
if (!this._CheckCommonInfo()) {
|
|
2841
|
+
return null;
|
|
2842
|
+
}
|
|
2843
|
+
this._CommonInfoValid = false;
|
|
2844
|
+
if (!xSensitivity || xSensitivity < 1) {
|
|
2845
|
+
xSensitivity = 1;
|
|
2846
|
+
}
|
|
2847
|
+
if (typeof ySensitivity == "undefined") {
|
|
2848
|
+
ySensitivity = xSensitivity;
|
|
2849
|
+
xyEnables = 3;
|
|
2850
|
+
}
|
|
2851
|
+
if (typeof xyEnables == "undefined") {
|
|
2852
|
+
xyEnables = 3;
|
|
2853
|
+
}
|
|
2854
|
+
return this._BuildPack(ConditionSetBuilder.OnMovement(
|
|
2855
|
+
this._CommonInfo,
|
|
2856
|
+
xSensitivity,
|
|
2857
|
+
ySensitivity,
|
|
2858
|
+
xyEnables
|
|
2859
|
+
));
|
|
2860
|
+
}
|
|
2861
|
+
movementSync(nexusRef) {
|
|
2862
|
+
if (!this._CheckCommonInfo()) {
|
|
2863
|
+
return null;
|
|
2864
|
+
}
|
|
2865
|
+
this._CommonInfoValid = false;
|
|
2866
|
+
return this._BuildPack(ConditionSetBuilder.MovementSyncNexus(
|
|
2867
|
+
this._CommonInfo,
|
|
2868
|
+
nexusRef?.token ? nexusRef.token : 0
|
|
2869
|
+
));
|
|
2870
|
+
}
|
|
2755
2871
|
_CheckCommonInfo() {
|
|
2756
2872
|
if (!this._CommonInfoValid) {
|
|
2757
2873
|
console.error("Error: must call from new conditoin()");
|
|
@@ -3058,6 +3174,28 @@ class ActorPackBuilder {
|
|
|
3058
3174
|
cmdList.push(isExact ? ActionCmdBuilder.StopMovingExact() : ActionCmdBuilder.StopMoving());
|
|
3059
3175
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
3060
3176
|
}
|
|
3177
|
+
/**
|
|
3178
|
+
* ackMovementSync
|
|
3179
|
+
* 只能放在 movementSync 的then中,用于将Sync同步信息按比例转化成
|
|
3180
|
+
* (注意): 如果触发链条上有自己发出的信息,则将不再产生动作,规避循环触发
|
|
3181
|
+
*
|
|
3182
|
+
* @param {int} left 运动识别区域的left, 可以为负
|
|
3183
|
+
* @param {int} top 运动识别区域的top, 可以为负
|
|
3184
|
+
* @param {int} right 运动识别区域的right, 可以为负,必须大于left
|
|
3185
|
+
* @param {int} bottom 运动识别区域的bottom, 可以为负,必须大于bottom
|
|
3186
|
+
* @param {int} xyEnable x,y是否都触发, 0b01对应x, 0b10对应y, 可以或运算在一起
|
|
3187
|
+
* @param {int} syncType 换算公式:
|
|
3188
|
+
* 1: 正比公式:selfPercent = givenPercent
|
|
3189
|
+
* 2: 反比公式:selfPercent = (1 - givenPercent)
|
|
3190
|
+
*/
|
|
3191
|
+
ackMovementSync(left, top, right, bottom, xyEnable, syncType) {
|
|
3192
|
+
if (!this._BasicPreProcess("ackMovementSync")) {
|
|
3193
|
+
return;
|
|
3194
|
+
}
|
|
3195
|
+
let cmdList = [];
|
|
3196
|
+
cmdList.push(ActionCmdBuilder.AckMovementSync(left, top, right, bottom, xyEnable, syncType));
|
|
3197
|
+
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
3198
|
+
}
|
|
3061
3199
|
_BuildAccelOnPole(builderThis, cmdList, nexusRecv, onRevertX, onRevertY) {
|
|
3062
3200
|
if (nexusRecv || onRevertX || onRevertY) {
|
|
3063
3201
|
cmdList.push(
|
|
@@ -3192,6 +3330,59 @@ class StatePackBuilder {
|
|
|
3192
3330
|
fireNexusEvent(nexusRecv, detailEventType) {
|
|
3193
3331
|
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(detailEventType, nexusRecv.token));
|
|
3194
3332
|
}
|
|
3333
|
+
/**
|
|
3334
|
+
* setTouchAttractChild
|
|
3335
|
+
*
|
|
3336
|
+
* 绑定一个子view中的FreeMoveDiv
|
|
3337
|
+
* 当Touch触控到本div时,这个子div会立刻移动到手指按下的位置,并接受焦点
|
|
3338
|
+
*
|
|
3339
|
+
* @param {ActorControl} otherFreeMoveControl 其他FreeMoveDiv的control对象
|
|
3340
|
+
*/
|
|
3341
|
+
setTouchAttractChild(otherFreeMoveControl) {
|
|
3342
|
+
if (otherFreeMoveControl) {
|
|
3343
|
+
let animRef = otherFreeMoveControl.getBindedAnim();
|
|
3344
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetTouchAttractChild(animRef));
|
|
3345
|
+
} else {
|
|
3346
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetTouchAttractChild(null));
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3350
|
+
* startMovementSync
|
|
3351
|
+
*
|
|
3352
|
+
* 发出进度同步信号(可以一个FreeMove绑定多个信号发生器,但目前场景估计只需要一个发生器即可)
|
|
3353
|
+
* 计算当前freeMove的postion和运动识别区域的比值
|
|
3354
|
+
* xPercent = (xPos - left) / (right - left)
|
|
3355
|
+
* yPercent = (yPos - top) / (bottom - top)
|
|
3356
|
+
* x和y可以为负数,也可能>100%
|
|
3357
|
+
*
|
|
3358
|
+
* 当多次调用时,nexusRef相同时,则为更新运动识别区域,nexusRef不同时则为新建信号发起器
|
|
3359
|
+
*
|
|
3360
|
+
* @param {NexusNode} nexusRef 绑定的nexus句柄,接受者用这个句柄来进行监听
|
|
3361
|
+
* @param {int} left 运动识别区域的left, 可以为负
|
|
3362
|
+
* @param {int} top 运动识别区域的top, 可以为负
|
|
3363
|
+
* @param {int} right 运动识别区域的right, 可以为负,必须大于left
|
|
3364
|
+
* @param {int} bottom 运动识别区域的bottom, 可以为负,必须大于bottom
|
|
3365
|
+
* @param {int} xyEnable x,y是否都触发, 0b01对应x, 0b10对应y, 可以或运算在一起
|
|
3366
|
+
*/
|
|
3367
|
+
startMovementSync(nexusRef, left, top, right, bottom, xyEnable) {
|
|
3368
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.StartMovementSync(
|
|
3369
|
+
nexusRef?.token ? nexusRef.token : 0,
|
|
3370
|
+
left,
|
|
3371
|
+
top,
|
|
3372
|
+
right,
|
|
3373
|
+
bottom,
|
|
3374
|
+
xyEnable
|
|
3375
|
+
));
|
|
3376
|
+
}
|
|
3377
|
+
/*
|
|
3378
|
+
* stopMovementSync
|
|
3379
|
+
*
|
|
3380
|
+
* 停止由startMovementSync发起的的同步信号
|
|
3381
|
+
* 目前阶段,为关闭所有的信号发起器
|
|
3382
|
+
*/
|
|
3383
|
+
stopMovementSync() {
|
|
3384
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.StopMovementSync());
|
|
3385
|
+
}
|
|
3195
3386
|
}
|
|
3196
3387
|
|
|
3197
3388
|
//
|
|
@@ -3200,9 +3391,9 @@ class StatePackBuilder {
|
|
|
3200
3391
|
class CallbackInfo {
|
|
3201
3392
|
funcRef;
|
|
3202
3393
|
// 回调函数
|
|
3203
|
-
times;
|
|
3394
|
+
times = 0;
|
|
3204
3395
|
// 回调的次数
|
|
3205
|
-
once;
|
|
3396
|
+
once = false;
|
|
3206
3397
|
// 是否单次回调就销毁
|
|
3207
3398
|
}
|
|
3208
3399
|
class CallbackManager {
|
|
@@ -3282,6 +3473,7 @@ class ActorControl {
|
|
|
3282
3473
|
_BindAnim;
|
|
3283
3474
|
_Callbacks;
|
|
3284
3475
|
_SelfNexusRecv;
|
|
3476
|
+
_SizeMode = false;
|
|
3285
3477
|
_SharedQuickConditionPackBuilder;
|
|
3286
3478
|
_SharedQuickActionPackBuilder;
|
|
3287
3479
|
_StatePackBuilder;
|
|
@@ -3294,6 +3486,13 @@ class ActorControl {
|
|
|
3294
3486
|
this._SharedQuickActionPackBuilder = new ActorPackBuilder(this._Callbacks, this._SelfNexusRecv);
|
|
3295
3487
|
this._StatePackBuilder = new StatePackBuilder();
|
|
3296
3488
|
}
|
|
3489
|
+
asSizeMode() {
|
|
3490
|
+
if (this._BindAnim != null) {
|
|
3491
|
+
console.error("error: asSizeMode should call before bindForgeView");
|
|
3492
|
+
} else {
|
|
3493
|
+
this._SizeMode = true;
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3297
3496
|
// debugGetAnimId() {
|
|
3298
3497
|
// return this._BindAnim?.AnimNativeId;
|
|
3299
3498
|
// }
|
|
@@ -3378,6 +3577,14 @@ class ActorControl {
|
|
|
3378
3577
|
state() {
|
|
3379
3578
|
return this._StatePackBuilder;
|
|
3380
3579
|
}
|
|
3580
|
+
getBindedAnim() {
|
|
3581
|
+
this._EnsureAnim();
|
|
3582
|
+
return this._BindAnim;
|
|
3583
|
+
}
|
|
3584
|
+
getBindedView() {
|
|
3585
|
+
this._EnsureAnim();
|
|
3586
|
+
return this._BindView;
|
|
3587
|
+
}
|
|
3381
3588
|
_OnEchoEvent(retJson) {
|
|
3382
3589
|
let retJsonObject = JSON.parse(retJson);
|
|
3383
3590
|
let echoRetList = retJsonObject["retList"];
|
|
@@ -3393,7 +3600,11 @@ class ActorControl {
|
|
|
3393
3600
|
}
|
|
3394
3601
|
_EnsureAnim() {
|
|
3395
3602
|
if (!this._BindAnim) {
|
|
3396
|
-
this._BindAnim = new FreeMoveAnimClass(
|
|
3603
|
+
this._BindAnim = new FreeMoveAnimClass(
|
|
3604
|
+
this._OnEchoEvent.bind(this),
|
|
3605
|
+
this._SelfNexusRecv.token,
|
|
3606
|
+
this._SizeMode
|
|
3607
|
+
);
|
|
3397
3608
|
this._BindView.StartAnimation(this._BindAnim);
|
|
3398
3609
|
}
|
|
3399
3610
|
}
|
|
@@ -3417,7 +3628,7 @@ class SlideAnimWrapper {
|
|
|
3417
3628
|
} else if (typeof setting.speed == "number") {
|
|
3418
3629
|
duration = Math.round(Math.max(Math.abs(to[0] - from[0]), Math.abs(to[1] - from[1])) / setting.speed);
|
|
3419
3630
|
}
|
|
3420
|
-
this.forgeAnim = new Forge$
|
|
3631
|
+
this.forgeAnim = new Forge$2.TranslateAnimation(
|
|
3421
3632
|
from[0],
|
|
3422
3633
|
to[0],
|
|
3423
3634
|
from[1],
|
|
@@ -3426,7 +3637,7 @@ class SlideAnimWrapper {
|
|
|
3426
3637
|
setting.easing
|
|
3427
3638
|
);
|
|
3428
3639
|
this.forgeAnim.SetAnimationListener(
|
|
3429
|
-
new Forge$
|
|
3640
|
+
new Forge$2.AnimationListener(this.onStart.bind(this), this.onEnd.bind(this), null)
|
|
3430
3641
|
);
|
|
3431
3642
|
}
|
|
3432
3643
|
start() {
|
|
@@ -3452,7 +3663,7 @@ class AnimationManager {
|
|
|
3452
3663
|
animList = [];
|
|
3453
3664
|
frameCount = 0;
|
|
3454
3665
|
startSlideAnim(element, from, to, setting) {
|
|
3455
|
-
let curFrameCount = Forge$
|
|
3666
|
+
let curFrameCount = Forge$2.sFrameCount.count;
|
|
3456
3667
|
if (curFrameCount != this.frameCount) {
|
|
3457
3668
|
this.tryCleanOldAnim();
|
|
3458
3669
|
this.frameCount = curFrameCount;
|
|
@@ -3461,7 +3672,7 @@ class AnimationManager {
|
|
|
3461
3672
|
this.animList.push(obj);
|
|
3462
3673
|
obj.start();
|
|
3463
3674
|
return () => {
|
|
3464
|
-
if (obj.getFrameCount() == Forge$
|
|
3675
|
+
if (obj.getFrameCount() == Forge$2.sFrameCount.count) {
|
|
3465
3676
|
obj.removeListener();
|
|
3466
3677
|
}
|
|
3467
3678
|
obj.stop();
|
|
@@ -3495,33 +3706,65 @@ class CancellableRunner {
|
|
|
3495
3706
|
}
|
|
3496
3707
|
}
|
|
3497
3708
|
var TaskType = /* @__PURE__ */ ((TaskType2) => {
|
|
3498
|
-
TaskType2[TaskType2["RESIZE_ITEM"] =
|
|
3499
|
-
TaskType2[TaskType2["SLIDE"] =
|
|
3500
|
-
TaskType2[TaskType2["ON_FOCUS_CHANGE"] =
|
|
3709
|
+
TaskType2[TaskType2["RESIZE_ITEM"] = 1] = "RESIZE_ITEM";
|
|
3710
|
+
TaskType2[TaskType2["SLIDE"] = 2] = "SLIDE";
|
|
3711
|
+
TaskType2[TaskType2["ON_FOCUS_CHANGE"] = 3] = "ON_FOCUS_CHANGE";
|
|
3501
3712
|
return TaskType2;
|
|
3502
3713
|
})(TaskType || {});
|
|
3714
|
+
var SlideTaskType = /* @__PURE__ */ ((SlideTaskType2) => {
|
|
3715
|
+
SlideTaskType2[SlideTaskType2["SLIDE_BY_POS"] = 1] = "SLIDE_BY_POS";
|
|
3716
|
+
SlideTaskType2[SlideTaskType2["SLIDE_BY_ITEM"] = 2] = "SLIDE_BY_ITEM";
|
|
3717
|
+
SlideTaskType2[SlideTaskType2["SLIDE_BY_DIV"] = 3] = "SLIDE_BY_DIV";
|
|
3718
|
+
SlideTaskType2[SlideTaskType2["SLIDE_BY_RECT"] = 4] = "SLIDE_BY_RECT";
|
|
3719
|
+
return SlideTaskType2;
|
|
3720
|
+
})(SlideTaskType || {});
|
|
3503
3721
|
class TaskManager {
|
|
3504
3722
|
constructor(onAddTask) {
|
|
3505
3723
|
this.onAddTask = onAddTask;
|
|
3506
3724
|
}
|
|
3507
3725
|
frameCount = -1;
|
|
3508
|
-
widgetTaskCacheList = [];
|
|
3509
3726
|
cancellableRunnerList = [];
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3727
|
+
//三类task: 1.slide, 2.resize, 3.focus
|
|
3728
|
+
allTaskList = {
|
|
3729
|
+
slide: [],
|
|
3730
|
+
focus: [],
|
|
3731
|
+
resize: []
|
|
3732
|
+
};
|
|
3733
|
+
cleanTaskCache() {
|
|
3734
|
+
this.allTaskList.slide = [];
|
|
3735
|
+
this.allTaskList.focus = [];
|
|
3736
|
+
this.allTaskList.resize = [];
|
|
3737
|
+
}
|
|
3738
|
+
addTask(type, params, subtype = null) {
|
|
3739
|
+
if (this.frameCount != Forge$2.sFrameCount.count) {
|
|
3740
|
+
this.cleanTaskCache();
|
|
3513
3741
|
this.cancellableRunnerList = [];
|
|
3514
|
-
this.frameCount = Forge$
|
|
3742
|
+
this.frameCount = Forge$2.sFrameCount.count;
|
|
3515
3743
|
}
|
|
3516
3744
|
this.cancellableRunnerList.forEach((t) => {
|
|
3517
3745
|
t.cancel();
|
|
3518
3746
|
});
|
|
3519
|
-
|
|
3747
|
+
const tObj = {
|
|
3520
3748
|
type,
|
|
3749
|
+
subType: subtype,
|
|
3521
3750
|
params,
|
|
3522
|
-
frameCount: Forge$
|
|
3523
|
-
}
|
|
3524
|
-
|
|
3751
|
+
frameCount: Forge$2.sFrameCount.count
|
|
3752
|
+
};
|
|
3753
|
+
switch (type) {
|
|
3754
|
+
case 2:
|
|
3755
|
+
this.allTaskList.slide.push(tObj);
|
|
3756
|
+
break;
|
|
3757
|
+
case 3:
|
|
3758
|
+
this.allTaskList.focus.push(tObj);
|
|
3759
|
+
break;
|
|
3760
|
+
case 1:
|
|
3761
|
+
this.allTaskList.resize.push(tObj);
|
|
3762
|
+
break;
|
|
3763
|
+
default:
|
|
3764
|
+
console.error("undefined type");
|
|
3765
|
+
break;
|
|
3766
|
+
}
|
|
3767
|
+
this.onAddTask(this.allTaskList);
|
|
3525
3768
|
}
|
|
3526
3769
|
run(func) {
|
|
3527
3770
|
const cancellableRunner = new CancellableRunner(func);
|
|
@@ -3588,7 +3831,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3588
3831
|
FLING: 3
|
|
3589
3832
|
};
|
|
3590
3833
|
let innerKeepTraceRange = 0;
|
|
3591
|
-
if (typeof props.keepTraceRange > 0) {
|
|
3834
|
+
if (typeof props.keepTraceRange == "number" && props.keepTraceRange > 0) {
|
|
3592
3835
|
innerKeepTraceRange = props.keepTraceRange;
|
|
3593
3836
|
} else {
|
|
3594
3837
|
if (props.touchFlag > 0) {
|
|
@@ -3649,7 +3892,6 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3649
3892
|
let preEdgeRect = null;
|
|
3650
3893
|
let isFocus = false;
|
|
3651
3894
|
let vertical = props.direction == VERTICAL;
|
|
3652
|
-
let preAnchorItemIndex = -1;
|
|
3653
3895
|
let templateItemAdder = null;
|
|
3654
3896
|
let permanentItemList = [];
|
|
3655
3897
|
let mounted = false;
|
|
@@ -3658,7 +3900,6 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3658
3900
|
let childSlideEventLock = false;
|
|
3659
3901
|
let onKeyDownLock = false;
|
|
3660
3902
|
let visibleInfo = new VisibleInfo();
|
|
3661
|
-
let preSlideDirection = 0;
|
|
3662
3903
|
let alreadyCallItemFocus = false;
|
|
3663
3904
|
let innerSlideSetting = props.slideSetting;
|
|
3664
3905
|
const currentFocusIndex = ref(0);
|
|
@@ -3668,106 +3909,158 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3668
3909
|
let size_key = vertical ? "height" : "width";
|
|
3669
3910
|
return item.templateInfo[pos_key] >= visibleInfo.start && item.templateInfo[pos_key] + item.templateInfo[size_key] - 1 < visibleInfo.end;
|
|
3670
3911
|
};
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3912
|
+
const lastOfArray = (array) => {
|
|
3913
|
+
if (array instanceof Array && array.length > 0) {
|
|
3914
|
+
return array[array.length - 1];
|
|
3915
|
+
}
|
|
3916
|
+
return null;
|
|
3917
|
+
};
|
|
3918
|
+
const onAddTask = (allTask) => {
|
|
3674
3919
|
let resizeTaskMap = {};
|
|
3675
|
-
let slideTask = null;
|
|
3676
3920
|
let minIndex = Infinity;
|
|
3677
|
-
let slideInfo = null;
|
|
3678
3921
|
let mergeTmp = false;
|
|
3679
3922
|
let anchorInfo = null;
|
|
3680
|
-
let duration = 200;
|
|
3681
|
-
let easing = null;
|
|
3682
3923
|
let pos_key = vertical ? "top" : "left";
|
|
3683
3924
|
let size_key = vertical ? "height" : "width";
|
|
3684
|
-
let doAnim = false;
|
|
3685
|
-
let existOnFocusChange = false;
|
|
3686
3925
|
let targetVisibleStart = visibleInfo.start;
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
if (task.type == TaskType.RESIZE_ITEM) {
|
|
3698
|
-
mergeTmp = mergeTmp || task.params?.updateParam?.mergeTmp;
|
|
3926
|
+
let slideDoAnim = false;
|
|
3927
|
+
mRectCache.cacheManually();
|
|
3928
|
+
let resizeAnimInfo = {
|
|
3929
|
+
doAnim: false,
|
|
3930
|
+
duration: 200,
|
|
3931
|
+
easing: ""
|
|
3932
|
+
};
|
|
3933
|
+
let resizeList = allTask.resize.concat();
|
|
3934
|
+
if (resizeList.length > 0) {
|
|
3935
|
+
resizeList.forEach((task) => {
|
|
3699
3936
|
resizeTaskMap[task.params.index] = task;
|
|
3700
|
-
resizeList.push(task);
|
|
3701
3937
|
const { index, animInfo } = task.params;
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
if (index == id2Index(focusId) && typeof animInfo?.anchor != "undefined") {
|
|
3707
|
-
const item = getItemByIndex(index);
|
|
3708
|
-
anchorInfo = {
|
|
3709
|
-
anchorPosition: item.templateInfo[pos_key] + item.templateInfo[size_key] * animInfo.anchor - 1 - targetVisibleStart,
|
|
3710
|
-
anchor: animInfo.anchor
|
|
3711
|
-
};
|
|
3938
|
+
if (animInfo) {
|
|
3939
|
+
resizeAnimInfo.doAnim = true;
|
|
3940
|
+
resizeAnimInfo.duration = animInfo.duration ?? resizeAnimInfo.duration;
|
|
3941
|
+
resizeAnimInfo.easing = animInfo.duration ?? "";
|
|
3712
3942
|
}
|
|
3713
|
-
|
|
3714
|
-
existOnFocusChange = true;
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
|
-
if (slideTask) {
|
|
3718
|
-
slideInfo = {
|
|
3719
|
-
target: slideTask.params.target,
|
|
3720
|
-
animObj: slideTask.params.animObj
|
|
3721
|
-
};
|
|
3722
|
-
}
|
|
3723
|
-
let existItemResize = false;
|
|
3724
|
-
if (resizeList.length > 0) {
|
|
3725
|
-
existItemResize = true;
|
|
3726
|
-
if (templateCacheFrameCount != Forge$1.sFrameCount.count) {
|
|
3727
|
-
metroTemplate.cacheLayout(minIndex, minIndex + 20);
|
|
3728
|
-
templateCacheFrameCount = Forge$1.sFrameCount.count;
|
|
3729
|
-
}
|
|
3730
|
-
resizeList.forEach((task) => {
|
|
3943
|
+
minIndex = Math.min(minIndex, index);
|
|
3731
3944
|
metroTemplate.updateItemSize(task.params.index, {
|
|
3732
3945
|
width: task.params.width,
|
|
3733
3946
|
height: task.params.height
|
|
3734
3947
|
});
|
|
3735
3948
|
});
|
|
3949
|
+
if (resizeTaskMap[id2Index(focusId)]) {
|
|
3950
|
+
const task = resizeTaskMap[id2Index(focusId)];
|
|
3951
|
+
const animInfo = task.params.animInfo;
|
|
3952
|
+
if (typeof animInfo?.anchor == "number") {
|
|
3953
|
+
const preRect = getItemById(focusId)?.templateInfo?.layoutCache.getPreRect();
|
|
3954
|
+
if (preRect) {
|
|
3955
|
+
anchorInfo = {
|
|
3956
|
+
anchorPosition: preRect[pos_key] + preRect[size_key] * animInfo.anchor - 1 - visibleInfo.start,
|
|
3957
|
+
anchor: animInfo.anchor
|
|
3958
|
+
};
|
|
3959
|
+
}
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3963
|
+
let targetRect = null;
|
|
3964
|
+
let direction = void 0;
|
|
3965
|
+
let validSlideTask = false;
|
|
3966
|
+
if (allTask.slide.length > 0) {
|
|
3967
|
+
validSlideTask = true;
|
|
3968
|
+
tryCancelDelayLoad();
|
|
3969
|
+
let slideTask = lastOfArray(allTask.slide);
|
|
3970
|
+
slideDoAnim = slideTask.params.doAnim;
|
|
3971
|
+
switch (slideTask.subType) {
|
|
3972
|
+
case SlideTaskType.SLIDE_BY_DIV:
|
|
3973
|
+
{
|
|
3974
|
+
const div = slideTask.params.div;
|
|
3975
|
+
const item_layout = div.jsvGetRelativePosition(toRaw(locateDiv.value));
|
|
3976
|
+
let fakeItem = {
|
|
3977
|
+
templateInfo: {
|
|
3978
|
+
left: item_layout.left,
|
|
3979
|
+
top: item_layout.top,
|
|
3980
|
+
width: item_layout.width,
|
|
3981
|
+
height: item_layout.height,
|
|
3982
|
+
centerYPos: Math.floor(item_layout.top + item_layout.height / 2),
|
|
3983
|
+
centerXPos: Math.floor(item_layout.left + item_layout.width / 2),
|
|
3984
|
+
index: id2Index(focusId)
|
|
3985
|
+
}
|
|
3986
|
+
};
|
|
3987
|
+
templateItemAdder.tryAddItemByPosition(vertical ? fakeItem.templateInfo.top : fakeItem.templateInfo.left);
|
|
3988
|
+
targetRect = fakeItem.templateInfo;
|
|
3989
|
+
}
|
|
3990
|
+
break;
|
|
3991
|
+
case SlideTaskType.SLIDE_BY_POS:
|
|
3992
|
+
{
|
|
3993
|
+
const position = slideTask.params.position;
|
|
3994
|
+
templateItemAdder.tryAddItemByPosition(position);
|
|
3995
|
+
targetVisibleStart = position;
|
|
3996
|
+
}
|
|
3997
|
+
break;
|
|
3998
|
+
case SlideTaskType.SLIDE_BY_ITEM:
|
|
3999
|
+
{
|
|
4000
|
+
const index = slideTask.params.index;
|
|
4001
|
+
templateItemAdder.tryAddItemByIndex(index);
|
|
4002
|
+
const targetItem = getItemByIndex(index);
|
|
4003
|
+
if (targetItem) {
|
|
4004
|
+
if (typeof slideTask.params.direction != "undefined") {
|
|
4005
|
+
direction = slideTask.params.direction;
|
|
4006
|
+
}
|
|
4007
|
+
targetRect = targetItem.templateInfo;
|
|
4008
|
+
} else {
|
|
4009
|
+
validSlideTask = false;
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
break;
|
|
4013
|
+
case SlideTaskType.SLIDE_BY_RECT:
|
|
4014
|
+
{
|
|
4015
|
+
if (typeof slideTask.params.direction != "undefined") {
|
|
4016
|
+
direction = slideTask.params.direction;
|
|
4017
|
+
}
|
|
4018
|
+
targetRect = slideTask.params.rect;
|
|
4019
|
+
}
|
|
4020
|
+
break;
|
|
4021
|
+
default:
|
|
4022
|
+
break;
|
|
4023
|
+
}
|
|
4024
|
+
mergeTmp = mergeTmp || slideTask.params?.updateParam?.mergeTmp;
|
|
4025
|
+
}
|
|
4026
|
+
if (!validSlideTask && resizeList.length > 0) {
|
|
3736
4027
|
if (anchorInfo) {
|
|
3737
4028
|
const focusItem = getItemById(focusId);
|
|
3738
4029
|
const start = focusItem.templateInfo[pos_key] + focusItem.templateInfo[size_key] * anchorInfo.anchor - 1 - anchorInfo.anchorPosition;
|
|
3739
|
-
targetVisibleStart = normalizeVisibleStart(start, focusItem.templateInfo);
|
|
4030
|
+
targetVisibleStart = normalizeVisibleStart(start, focusItem.templateInfo, focusItem.templateInfo.index);
|
|
3740
4031
|
} else {
|
|
3741
|
-
|
|
4032
|
+
targetRect = getItemById(focusId).templateInfo;
|
|
4033
|
+
}
|
|
4034
|
+
slideDoAnim = resizeAnimInfo.doAnim;
|
|
4035
|
+
}
|
|
4036
|
+
if (targetRect) {
|
|
4037
|
+
const v = visibleInfo.copy();
|
|
4038
|
+
let preInfo = null;
|
|
4039
|
+
if (resizeList.length > 0) {
|
|
4040
|
+
preInfo = mRectCache.getPreRect();
|
|
4041
|
+
if (preInfo) {
|
|
4042
|
+
v.start = targetRect.left - preInfo.left + v.start;
|
|
4043
|
+
preInfo.left += v.start - visibleInfo.start;
|
|
4044
|
+
}
|
|
3742
4045
|
}
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
if (
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
if (slideTask) {
|
|
3756
|
-
slideInfo.animObj = slideTask.params?.animObj;
|
|
3757
|
-
} else {
|
|
3758
|
-
slideInfo.animObj = {
|
|
3759
|
-
//resize无动画时正常slide
|
|
3760
|
-
easing: "",
|
|
3761
|
-
onStart: null,
|
|
3762
|
-
onEnd: null,
|
|
3763
|
-
speed: innerSlideSetting.Speed,
|
|
3764
|
-
duration: innerSlideSetting.Duration
|
|
3765
|
-
};
|
|
3766
|
-
}
|
|
4046
|
+
targetVisibleStart = _calculateVisibleStart(targetRect, direction, targetRect, v, preInfo);
|
|
4047
|
+
} else {
|
|
4048
|
+
if (resizeList.length > 0) {
|
|
4049
|
+
let tRect = getItemById(focusId)?.templateInfo;
|
|
4050
|
+
if (tRect) {
|
|
4051
|
+
mRectCache.cache({
|
|
4052
|
+
left: tRect.left,
|
|
4053
|
+
top: tRect.top,
|
|
4054
|
+
width: tRect.width,
|
|
4055
|
+
height: tRect.height,
|
|
4056
|
+
frameCount: Forge$2.sFrameCount.count
|
|
4057
|
+
});
|
|
3767
4058
|
}
|
|
3768
4059
|
}
|
|
3769
4060
|
}
|
|
4061
|
+
let needSlide = false;
|
|
3770
4062
|
if (targetVisibleStart != visibleInfo.start) {
|
|
4063
|
+
needSlide = true;
|
|
3771
4064
|
taskManager.run(() => {
|
|
3772
4065
|
const preVisibleStart = visibleInfo.start;
|
|
3773
4066
|
visibleInfo.start = targetVisibleStart;
|
|
@@ -3792,45 +4085,57 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3792
4085
|
});
|
|
3793
4086
|
if (resizeList.length > 0) {
|
|
3794
4087
|
updateHandler.applyTmp();
|
|
3795
|
-
if (doAnim) {
|
|
4088
|
+
if (resizeAnimInfo.doAnim) {
|
|
3796
4089
|
const visibleIndexList = Array.from(pageUpdater.getTmpRange());
|
|
3797
4090
|
for (let index of visibleIndexList) {
|
|
3798
4091
|
const renderItem = getItemByIndex(index);
|
|
3799
4092
|
const { left, top } = renderItem.templateInfo;
|
|
3800
4093
|
if (index >= minIndex) {
|
|
3801
|
-
const layoutCache = renderItem.templateInfo.layoutCache;
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
4094
|
+
const layoutCache = renderItem.templateInfo.layoutCache.getPreRect();
|
|
4095
|
+
if (layoutCache) {
|
|
4096
|
+
const doItemSlide = (div) => {
|
|
4097
|
+
taskManager.run(() => {
|
|
4098
|
+
const cancel = animationManager.startSlideAnim(
|
|
4099
|
+
div,
|
|
4100
|
+
[layoutCache.left - left, layoutCache.top - top],
|
|
4101
|
+
[0, 0],
|
|
4102
|
+
resizeTaskMap[index] ? resizeTaskMap[index].params.animInfo : { duration: resizeAnimInfo.duration }
|
|
4103
|
+
);
|
|
4104
|
+
return () => {
|
|
4105
|
+
cancel();
|
|
4106
|
+
};
|
|
4107
|
+
});
|
|
4108
|
+
};
|
|
4109
|
+
if (renderItem.mounted.value) {
|
|
4110
|
+
doItemSlide(renderItem.rootDiv);
|
|
4111
|
+
} else {
|
|
4112
|
+
taskManager.run(() => {
|
|
4113
|
+
const unregister = renderItem.addDivMountedListener((div) => {
|
|
4114
|
+
doItemSlide(div);
|
|
4115
|
+
});
|
|
4116
|
+
return unregister;
|
|
3821
4117
|
});
|
|
3822
|
-
|
|
3823
|
-
});
|
|
4118
|
+
}
|
|
3824
4119
|
}
|
|
3825
4120
|
}
|
|
3826
4121
|
}
|
|
3827
4122
|
}
|
|
3828
4123
|
}
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
4124
|
+
if (needSlide) {
|
|
4125
|
+
let animInfo = void 0;
|
|
4126
|
+
if (slideDoAnim) {
|
|
4127
|
+
animInfo = {
|
|
4128
|
+
easing: null,
|
|
4129
|
+
//resizeAnimInfo.doAnim ? resizeAnimInfo.easing : '' /* innerSlideSetting.Easing */,
|
|
4130
|
+
duration: resizeAnimInfo.doAnim ? resizeAnimInfo.duration : innerSlideSetting.Duration,
|
|
4131
|
+
speed: innerSlideSetting.Speed,
|
|
4132
|
+
onStart: null,
|
|
4133
|
+
onEnd: null
|
|
4134
|
+
};
|
|
4135
|
+
}
|
|
4136
|
+
executeSlide(visibleInfo.start, animInfo, updateHandler);
|
|
3832
4137
|
}
|
|
3833
|
-
if (
|
|
4138
|
+
if (resizeList.length > 0 && props.onAllItemResizeDone) {
|
|
3834
4139
|
taskManager.run(() => {
|
|
3835
4140
|
const handler = setTimeout(() => {
|
|
3836
4141
|
props.onAllItemResizeDone();
|
|
@@ -3840,7 +4145,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3840
4145
|
};
|
|
3841
4146
|
});
|
|
3842
4147
|
}
|
|
3843
|
-
if ((
|
|
4148
|
+
if ((needSlide || allTask.focus.length > 0) && props.onFocusRectChange) {
|
|
3844
4149
|
taskManager.run(() => {
|
|
3845
4150
|
const handler = setTimeout(() => {
|
|
3846
4151
|
props.onFocusRectChange();
|
|
@@ -3851,21 +4156,20 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3851
4156
|
});
|
|
3852
4157
|
}
|
|
3853
4158
|
};
|
|
3854
|
-
const taskManager = new TaskManager(
|
|
4159
|
+
const taskManager = new TaskManager(onAddTask);
|
|
3855
4160
|
const animationManager = new AnimationManager();
|
|
3856
|
-
const executeSlide = (
|
|
4161
|
+
const executeSlide = (target, animObj, updateHandler) => {
|
|
3857
4162
|
let preLeft = slideDivLeft.value;
|
|
3858
4163
|
let preTop = slideDivTop.value;
|
|
3859
4164
|
taskManager.run(() => {
|
|
3860
|
-
slideDivLeft.value = vertical ? 0 : -
|
|
3861
|
-
slideDivTop.value = vertical ? -
|
|
4165
|
+
slideDivLeft.value = vertical ? 0 : -target;
|
|
4166
|
+
slideDivTop.value = vertical ? -target : 0;
|
|
3862
4167
|
return () => {
|
|
3863
4168
|
slideDivLeft.value = preLeft;
|
|
3864
4169
|
slideDivTop.value = preTop;
|
|
3865
4170
|
};
|
|
3866
4171
|
});
|
|
3867
|
-
|
|
3868
|
-
if (slideInfo.animObj) {
|
|
4172
|
+
if (animObj) {
|
|
3869
4173
|
updateHandler.applyTmp();
|
|
3870
4174
|
taskManager.run(() => {
|
|
3871
4175
|
const from = vertical ? [0, preTop - slideDivTop.value] : [preLeft - slideDivLeft.value, 0];
|
|
@@ -3874,7 +4178,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3874
4178
|
from,
|
|
3875
4179
|
[0, 0],
|
|
3876
4180
|
{
|
|
3877
|
-
...
|
|
4181
|
+
...animObj,
|
|
3878
4182
|
onEnd: () => {
|
|
3879
4183
|
updateHandler.apply();
|
|
3880
4184
|
}
|
|
@@ -3895,25 +4199,26 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3895
4199
|
clearTimeout(handler);
|
|
3896
4200
|
};
|
|
3897
4201
|
});
|
|
3898
|
-
return viewSlid;
|
|
3899
4202
|
};
|
|
3900
4203
|
const updateItemSize = (index, newSize, animInfo) => {
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
4204
|
+
const item = getItemByIndex(index);
|
|
4205
|
+
if (item && (item.templateInfo.width !== newSize.width || item.templateInfo.height !== newSize.height)) {
|
|
4206
|
+
taskManager.addTask(
|
|
4207
|
+
TaskType.RESIZE_ITEM,
|
|
4208
|
+
{
|
|
4209
|
+
index,
|
|
4210
|
+
width: newSize.width,
|
|
4211
|
+
height: newSize.height,
|
|
4212
|
+
animInfo,
|
|
4213
|
+
preRect: {
|
|
4214
|
+
left: item.templateInfo.left,
|
|
4215
|
+
top: item.templateInfo.top,
|
|
4216
|
+
width: item.templateInfo.width,
|
|
4217
|
+
height: item.templateInfo.height
|
|
4218
|
+
}
|
|
4219
|
+
}
|
|
4220
|
+
);
|
|
3914
4221
|
}
|
|
3915
|
-
;
|
|
3916
|
-
taskManager.addTask(TaskType.SLIDE, { target: -target, animObj, updateParam });
|
|
3917
4222
|
};
|
|
3918
4223
|
let callFocusAfterUpdate = false;
|
|
3919
4224
|
const _onFocusChange = (id) => {
|
|
@@ -4108,22 +4413,6 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4108
4413
|
const setEnterFocusRect = (rect) => {
|
|
4109
4414
|
enterFocusRect = rect;
|
|
4110
4415
|
};
|
|
4111
|
-
const slideTo = (position, doAnim) => {
|
|
4112
|
-
tryCancelDelayLoad();
|
|
4113
|
-
templateItemAdder.tryAddItemByPosition(position);
|
|
4114
|
-
if (typeof position !== "undefined" && position != null) {
|
|
4115
|
-
let animObj = null;
|
|
4116
|
-
if (doAnim) {
|
|
4117
|
-
animObj = {
|
|
4118
|
-
easing: innerSlideSetting.Easing,
|
|
4119
|
-
onStart: null,
|
|
4120
|
-
speed: innerSlideSetting.Speed,
|
|
4121
|
-
duration: innerSlideSetting.Duration
|
|
4122
|
-
};
|
|
4123
|
-
}
|
|
4124
|
-
_slideTo(position, animObj);
|
|
4125
|
-
}
|
|
4126
|
-
};
|
|
4127
4416
|
const setZIndex = (index, normalZIndex, focusZIndex) => {
|
|
4128
4417
|
const targetItem = getItemByIndex(index);
|
|
4129
4418
|
if (targetItem) {
|
|
@@ -4134,41 +4423,60 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4134
4423
|
setItemZIndex(targetItem, focused ? f : n, focused);
|
|
4135
4424
|
}
|
|
4136
4425
|
};
|
|
4137
|
-
const
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4426
|
+
const slideToInner = (position, doAnim, updateParam = { mergeTmp: false }) => {
|
|
4427
|
+
if (slideLock || position == (vertical ? slideDivTop.value : slideDivLeft.value)) {
|
|
4428
|
+
return;
|
|
4429
|
+
}
|
|
4430
|
+
;
|
|
4431
|
+
taskManager.addTask(TaskType.SLIDE, { position, doAnim, updateParam }, SlideTaskType.SLIDE_BY_POS);
|
|
4432
|
+
};
|
|
4433
|
+
const slideTo = (position, doAnim) => {
|
|
4434
|
+
if (typeof position == "number") {
|
|
4435
|
+
slideToInner(position, doAnim);
|
|
4144
4436
|
}
|
|
4145
4437
|
};
|
|
4438
|
+
const slideToItemInner = (index, doAnim, direction = void 0, preItem = void 0) => {
|
|
4439
|
+
taskManager.addTask(
|
|
4440
|
+
TaskType.SLIDE,
|
|
4441
|
+
{
|
|
4442
|
+
index,
|
|
4443
|
+
doAnim,
|
|
4444
|
+
direction,
|
|
4445
|
+
preItem
|
|
4446
|
+
},
|
|
4447
|
+
SlideTaskType.SLIDE_BY_ITEM
|
|
4448
|
+
);
|
|
4449
|
+
};
|
|
4450
|
+
const slideToItem = (index, doAnim) => {
|
|
4451
|
+
slideToItemInner(index, doAnim);
|
|
4452
|
+
};
|
|
4146
4453
|
const slideToDiv = (div, doAnim) => {
|
|
4147
|
-
|
|
4454
|
+
slideToDivInner(div, doAnim);
|
|
4455
|
+
};
|
|
4456
|
+
const slideToDivInner = (div, doAnim, direction = void 0) => {
|
|
4148
4457
|
if (div) {
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
}
|
|
4458
|
+
taskManager.addTask(
|
|
4459
|
+
TaskType.SLIDE,
|
|
4460
|
+
{
|
|
4461
|
+
div,
|
|
4462
|
+
doAnim,
|
|
4463
|
+
direction
|
|
4464
|
+
},
|
|
4465
|
+
SlideTaskType.SLIDE_BY_DIV
|
|
4466
|
+
);
|
|
4467
|
+
}
|
|
4468
|
+
};
|
|
4469
|
+
const slideToRect = (rect, doAnim, direction = void 0) => {
|
|
4470
|
+
if (rect && typeof rect.left == "number" && typeof rect.top == "number" && typeof rect.width == "number" && typeof rect.height == "number") {
|
|
4471
|
+
taskManager.addTask(
|
|
4472
|
+
TaskType.SLIDE,
|
|
4473
|
+
{
|
|
4474
|
+
rect,
|
|
4475
|
+
doAnim,
|
|
4476
|
+
direction
|
|
4477
|
+
},
|
|
4478
|
+
SlideTaskType.SLIDE_BY_RECT
|
|
4479
|
+
);
|
|
4172
4480
|
}
|
|
4173
4481
|
};
|
|
4174
4482
|
const refreshData = (force_update) => {
|
|
@@ -4246,7 +4554,12 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4246
4554
|
);
|
|
4247
4555
|
updater.apply();
|
|
4248
4556
|
onItemFocus(getItemById(focusId), null);
|
|
4249
|
-
|
|
4557
|
+
let targetRect = mRectCache.getCurRect() ?? mRectCache.getPreRect();
|
|
4558
|
+
if (targetRect) {
|
|
4559
|
+
slideToRect(targetRect, false);
|
|
4560
|
+
} else {
|
|
4561
|
+
slideToItem(id2Index(focusId), false);
|
|
4562
|
+
}
|
|
4250
4563
|
updateTouchBoxCondition();
|
|
4251
4564
|
};
|
|
4252
4565
|
const getVisibleItems = () => {
|
|
@@ -4635,16 +4948,11 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4635
4948
|
index: id2Index(focusId)
|
|
4636
4949
|
}
|
|
4637
4950
|
};
|
|
4638
|
-
let cur_slide = _calculateVisibleStart(fakeItem.templateInfo, direction);
|
|
4951
|
+
let cur_slide = _calculateVisibleStart(fakeItem.templateInfo, direction, fakeItem.templateInfo, visibleInfo);
|
|
4639
4952
|
if (cur_slide != visibleInfo.start) {
|
|
4640
|
-
|
|
4953
|
+
slideToInner(
|
|
4641
4954
|
cur_slide,
|
|
4642
|
-
|
|
4643
|
-
easing: "",
|
|
4644
|
-
onStart: null,
|
|
4645
|
-
speed: innerSlideSetting.Speed,
|
|
4646
|
-
duration: innerSlideSetting.Duration
|
|
4647
|
-
},
|
|
4955
|
+
true,
|
|
4648
4956
|
{
|
|
4649
4957
|
mergeTmp: true
|
|
4650
4958
|
}
|
|
@@ -4656,7 +4964,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4656
4964
|
};
|
|
4657
4965
|
const _changeFocusId = (id, cache_pre = true) => {
|
|
4658
4966
|
preFocusId = cache_pre ? focusId : -1;
|
|
4659
|
-
focusId = id;
|
|
4967
|
+
focusId = id >= 0 && id < metroTemplate.size ? id : 0;
|
|
4660
4968
|
currentFocusIndex.value = id2Index(id);
|
|
4661
4969
|
taskManager.addTask(TaskType.ON_FOCUS_CHANGE);
|
|
4662
4970
|
};
|
|
@@ -4733,20 +5041,12 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4733
5041
|
onItemBlur(preFocusItem);
|
|
4734
5042
|
onItemFocus(next_focus_item, preEdgeRect);
|
|
4735
5043
|
if (next_focus_item.itemConfig.itemSlide == METRO_WIDGET.ITEM_SLIDE.ACT_ITEM_FOCUS) {
|
|
4736
|
-
|
|
4737
|
-
next_focus_item.
|
|
5044
|
+
slideToItemInner(
|
|
5045
|
+
next_focus_item.index,
|
|
5046
|
+
true,
|
|
4738
5047
|
vertical ? vertical_direction : horizontal_direction,
|
|
4739
|
-
preFocusItem
|
|
5048
|
+
preFocusItem
|
|
4740
5049
|
);
|
|
4741
|
-
if (visibleInfo.start !== cur_visible_start2) {
|
|
4742
|
-
let animObj = {
|
|
4743
|
-
easing: "",
|
|
4744
|
-
onStart: null,
|
|
4745
|
-
speed: innerSlideSetting.Speed,
|
|
4746
|
-
duration: innerSlideSetting.Duration
|
|
4747
|
-
};
|
|
4748
|
-
_slideTo(cur_visible_start2, animObj, { mergeTmp: false });
|
|
4749
|
-
}
|
|
4750
5050
|
} else {
|
|
4751
5051
|
const updater = pageUpdater.update(
|
|
4752
5052
|
metroTemplate,
|
|
@@ -4801,7 +5101,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4801
5101
|
});
|
|
4802
5102
|
}
|
|
4803
5103
|
};
|
|
4804
|
-
const normalizeVisibleStart = (origin,
|
|
5104
|
+
const normalizeVisibleStart = (origin, targetRect = void 0, index = void 0) => {
|
|
4805
5105
|
let pos_key = vertical ? "top" : "left";
|
|
4806
5106
|
let size_key = vertical ? "height" : "width";
|
|
4807
5107
|
let visibleStart = origin;
|
|
@@ -4809,7 +5109,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4809
5109
|
if (visibleInfo.start >= 0) {
|
|
4810
5110
|
let boundary = 0;
|
|
4811
5111
|
const headTemplateInfo = getItemByIndex(0).templateInfo;
|
|
4812
|
-
if (
|
|
5112
|
+
if (targetRect && (!headTemplateInfo.focusable || index == headTemplateInfo.index) && targetRect[pos_key] + targetRect[size_key] <= visibleInfo.range) {
|
|
4813
5113
|
boundary = headTemplateInfo[size_key];
|
|
4814
5114
|
}
|
|
4815
5115
|
visibleStart = visibleStart < boundary ? 0 : visibleStart;
|
|
@@ -4823,7 +5123,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4823
5123
|
const lastVisibleStart = Math.max(lastEnd - visibleInfo.range, 0);
|
|
4824
5124
|
if (visibleInfo.end <= lastEnd) {
|
|
4825
5125
|
let boundary = lastVisibleStart;
|
|
4826
|
-
if (
|
|
5126
|
+
if (targetRect && (!lastTemplateInfo.focusable || index == lastTemplateInfo.index) && targetRect[pos_key] - lastVisibleStart >= 0) {
|
|
4827
5127
|
boundary = lastTemplateInfo[pos_key] - visibleInfo.range;
|
|
4828
5128
|
}
|
|
4829
5129
|
visibleStart = visibleStart > boundary ? lastVisibleStart : visibleStart;
|
|
@@ -4833,107 +5133,113 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4833
5133
|
}
|
|
4834
5134
|
return visibleStart;
|
|
4835
5135
|
};
|
|
4836
|
-
|
|
4837
|
-
const _calculateVisibleStart = (
|
|
4838
|
-
if (!
|
|
5136
|
+
const mRectCache = new RectCache();
|
|
5137
|
+
const _calculateVisibleStart = (targetRect, _direction, templateInfo, visibleInfo2, preInfo = null) => {
|
|
5138
|
+
if (!targetRect) {
|
|
4839
5139
|
console.error("MetroWidget: _calculateVisibleStart target item is null");
|
|
4840
5140
|
return 0;
|
|
4841
5141
|
}
|
|
5142
|
+
const curRect = {
|
|
5143
|
+
left: targetRect.left,
|
|
5144
|
+
top: targetRect.top,
|
|
5145
|
+
width: targetRect.width,
|
|
5146
|
+
height: targetRect.height,
|
|
5147
|
+
frameCount: Forge$2.sFrameCount.count
|
|
5148
|
+
};
|
|
5149
|
+
mRectCache.cache(curRect);
|
|
5150
|
+
let preRect = mRectCache.getPreRect();
|
|
4842
5151
|
if (preInfo) {
|
|
4843
|
-
|
|
5152
|
+
preRect = preInfo;
|
|
5153
|
+
}
|
|
5154
|
+
let direction = _direction;
|
|
5155
|
+
if (typeof direction != "number") {
|
|
5156
|
+
let d = getDirectionByRect(curRect, preRect);
|
|
5157
|
+
direction = vertical ? d.vertical : d.horizontal;
|
|
4844
5158
|
}
|
|
4845
|
-
preSlideDirection = direction;
|
|
4846
|
-
preAnchorItemIndex = targetTemplateInfo.index;
|
|
4847
5159
|
let pos_key = vertical ? "top" : "left";
|
|
4848
5160
|
let size_key = vertical ? "height" : "width";
|
|
4849
5161
|
let center_key = vertical ? "centerYPos" : "centerXPos";
|
|
4850
|
-
let new_visible_start =
|
|
5162
|
+
let new_visible_start = visibleInfo2.start;
|
|
4851
5163
|
let needCalculate = true;
|
|
4852
5164
|
switch (innerSlideSetting.Type) {
|
|
4853
5165
|
case SlideSetting.Type.FIX_POSITION:
|
|
4854
5166
|
if (innerSlideSetting.FixFirstPage) {
|
|
4855
|
-
if (
|
|
5167
|
+
if (targetRect[pos_key] + targetRect[size_key] - 1 < visibleInfo2.range) {
|
|
4856
5168
|
new_visible_start = 0;
|
|
4857
5169
|
needCalculate = false;
|
|
4858
5170
|
}
|
|
4859
5171
|
}
|
|
4860
5172
|
if (needCalculate) {
|
|
4861
5173
|
new_visible_start = Math.ceil(
|
|
4862
|
-
|
|
5174
|
+
targetRect[pos_key] + targetRect[size_key] / 2 - visibleInfo2.range * innerSlideSetting.FixPercent
|
|
4863
5175
|
);
|
|
4864
5176
|
}
|
|
4865
5177
|
break;
|
|
4866
5178
|
case SlideSetting.Type.WHOLE_PAGE:
|
|
4867
|
-
if (typeof
|
|
5179
|
+
if (!templateInfo || typeof templateInfo.pageHeadIndex == "undefined") {
|
|
4868
5180
|
console.error(
|
|
4869
5181
|
"child controlled whole page slide type is not supported."
|
|
4870
5182
|
);
|
|
4871
5183
|
} else {
|
|
4872
|
-
new_visible_start = getItemByIndex(
|
|
5184
|
+
new_visible_start = getItemByIndex(templateInfo.pageHeadIndex).templateInfo[pos_key];
|
|
4873
5185
|
}
|
|
4874
5186
|
break;
|
|
4875
5187
|
case SlideSetting.Type.SEAMLESS:
|
|
4876
5188
|
if (innerSlideSetting.FixFirstPage) {
|
|
4877
|
-
if (
|
|
5189
|
+
if (targetRect[pos_key] + targetRect[size_key] - 1 < visibleInfo2.range) {
|
|
4878
5190
|
new_visible_start = 0;
|
|
4879
5191
|
needCalculate = false;
|
|
4880
5192
|
}
|
|
4881
5193
|
}
|
|
4882
5194
|
if (needCalculate) {
|
|
4883
|
-
const
|
|
4884
|
-
const
|
|
4885
|
-
const
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
rect0Result = itemStart;
|
|
4903
|
-
} else {
|
|
4904
|
-
if (direction <= 0) {
|
|
4905
|
-
let pre;
|
|
4906
|
-
if (targetStart < rect0End) {
|
|
4907
|
-
pre = targetStart;
|
|
4908
|
-
} else {
|
|
4909
|
-
pre = rect0End;
|
|
5195
|
+
const itemStart = targetRect[pos_key];
|
|
5196
|
+
const itemEnd = targetRect[pos_key] + targetRect[size_key] - 1;
|
|
5197
|
+
const itemMainSize = targetRect[size_key];
|
|
5198
|
+
if (preRect) {
|
|
5199
|
+
const rect0Start = visibleInfo2.start;
|
|
5200
|
+
const rect0End = visibleInfo2.start + visibleInfo2.range * innerSlideSetting.StartPercent;
|
|
5201
|
+
const rect0Range = rect0End - rect0Start + 1;
|
|
5202
|
+
const rect1Start = visibleInfo2.start + visibleInfo2.range * innerSlideSetting.EndPercent;
|
|
5203
|
+
const rect1End = visibleInfo2.start + visibleInfo2.range - 1;
|
|
5204
|
+
const rect1Range = rect1End - rect1Start + 1;
|
|
5205
|
+
let target0 = Math.min(preRect[pos_key], rect0End);
|
|
5206
|
+
let target1 = Math.max(preRect[pos_key] + preRect[size_key] - 1, rect1Start);
|
|
5207
|
+
let rect0Result = void 0;
|
|
5208
|
+
let rect1Result = void 0;
|
|
5209
|
+
if (itemStart < rect0End) {
|
|
5210
|
+
if (target0 < rect0Start) {
|
|
5211
|
+
} else {
|
|
5212
|
+
if (direction <= 0) {
|
|
5213
|
+
rect0Result = visibleInfo2.start + (itemStart - target0);
|
|
4910
5214
|
}
|
|
4911
|
-
rect0Result = visibleInfo.start + (itemStart - pre);
|
|
4912
5215
|
}
|
|
4913
5216
|
}
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
if (targetEnd > rect1End) {
|
|
4917
|
-
rect1Result = itemEnd - visibleInfo.range;
|
|
4918
|
-
} else {
|
|
4919
|
-
let pre;
|
|
4920
|
-
if (targetEnd > rect1Start) {
|
|
4921
|
-
pre = targetEnd;
|
|
5217
|
+
if (itemEnd > rect1Start) {
|
|
5218
|
+
if (target1 > rect1End) {
|
|
4922
5219
|
} else {
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
rect1Result = visibleInfo.start + (itemEnd - pre);
|
|
5220
|
+
if (direction >= 0) {
|
|
5221
|
+
rect1Result = visibleInfo2.start + (itemEnd - target1);
|
|
5222
|
+
}
|
|
4927
5223
|
}
|
|
4928
5224
|
}
|
|
4929
|
-
|
|
5225
|
+
if (typeof rect0Result !== "undefined" && typeof rect1Result !== "undefined") {
|
|
5226
|
+
new_visible_start = rect0Result;
|
|
5227
|
+
} else if (typeof rect0Result !== "undefined") {
|
|
5228
|
+
new_visible_start = rect0Result;
|
|
5229
|
+
} else if (typeof rect1Result !== "undefined") {
|
|
5230
|
+
new_visible_start = rect1Result;
|
|
5231
|
+
}
|
|
4930
5232
|
}
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
new_visible_start =
|
|
4935
|
-
} else
|
|
4936
|
-
new_visible_start
|
|
5233
|
+
const headSafeArea = innerSlideSetting.HeadSafeArea * visibleInfo2.range;
|
|
5234
|
+
const tailSafeArea = innerSlideSetting.TailSafeArea * visibleInfo2.range;
|
|
5235
|
+
if (itemMainSize > visibleInfo2.range - headSafeArea - tailSafeArea) {
|
|
5236
|
+
new_visible_start = Math.round(itemStart - (visibleInfo2.range - itemMainSize) / 2);
|
|
5237
|
+
} else {
|
|
5238
|
+
if (itemStart < new_visible_start + headSafeArea) {
|
|
5239
|
+
new_visible_start = itemStart - headSafeArea;
|
|
5240
|
+
} else if (itemEnd > new_visible_start + visibleInfo2.range - 1 - tailSafeArea) {
|
|
5241
|
+
new_visible_start = itemEnd - visibleInfo2.range + tailSafeArea;
|
|
5242
|
+
}
|
|
4937
5243
|
}
|
|
4938
5244
|
}
|
|
4939
5245
|
break;
|
|
@@ -4943,8 +5249,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4943
5249
|
innerSlideSetting.Type
|
|
4944
5250
|
);
|
|
4945
5251
|
}
|
|
4946
|
-
|
|
4947
|
-
new_visible_start = normalizeVisibleStart(new_visible_start, targetTemplateInfo);
|
|
5252
|
+
new_visible_start = normalizeVisibleStart(new_visible_start, targetRect, templateInfo?.index);
|
|
4948
5253
|
return Math.round(new_visible_start);
|
|
4949
5254
|
};
|
|
4950
5255
|
const _onFocusableItemEdge = (edge_info) => {
|
|
@@ -4994,17 +5299,27 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4994
5299
|
onItemBlur(getItemById(preFocusId));
|
|
4995
5300
|
props.onBlur?.();
|
|
4996
5301
|
isFocus = false;
|
|
5302
|
+
mRectCache.clean();
|
|
4997
5303
|
};
|
|
4998
5304
|
const _updatePage = (rangeSet) => {
|
|
5305
|
+
let cur = id2Index(focusId);
|
|
5306
|
+
if (cur >= 0) {
|
|
5307
|
+
rangeSet.add(cur);
|
|
5308
|
+
}
|
|
4999
5309
|
const tmpArray = Array.from(rangeSet);
|
|
5000
|
-
|
|
5310
|
+
let newArray = tmpArray.map((item) => {
|
|
5001
5311
|
return getItemByIndex(item);
|
|
5002
5312
|
});
|
|
5313
|
+
const newItemList = newArray.filter((i) => {
|
|
5314
|
+
return !renderData.value?.includes(i);
|
|
5315
|
+
});
|
|
5316
|
+
renderData.value = newArray;
|
|
5003
5317
|
if (props.enableItemRenderBreak) {
|
|
5004
5318
|
itemRender.value = false;
|
|
5005
|
-
|
|
5319
|
+
const f = () => {
|
|
5006
5320
|
itemRender.value = true;
|
|
5007
|
-
}
|
|
5321
|
+
};
|
|
5322
|
+
nextTick(f);
|
|
5008
5323
|
}
|
|
5009
5324
|
};
|
|
5010
5325
|
const _getVisibleFocusableItem = () => {
|
|
@@ -5043,7 +5358,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5043
5358
|
let divPos = -1;
|
|
5044
5359
|
let frameCount = -1;
|
|
5045
5360
|
const getVisibleStart = (moveInfo) => {
|
|
5046
|
-
if (frameCount != Forge$
|
|
5361
|
+
if (frameCount != Forge$2.sFrameCount.count) {
|
|
5047
5362
|
divPos = vertical ? slideDivTop.value : slideDivLeft.value;
|
|
5048
5363
|
}
|
|
5049
5364
|
if (vertical) {
|
|
@@ -5115,7 +5430,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5115
5430
|
permanentItemList
|
|
5116
5431
|
);
|
|
5117
5432
|
updater.apply();
|
|
5118
|
-
const anchorArea = 2 * Forge$
|
|
5433
|
+
const anchorArea = 2 * Forge$2.sRenderBridge.GetScreenInfo().designedWidth;
|
|
5119
5434
|
let anchorPosList = [];
|
|
5120
5435
|
let anchorSpacing = visibleInfo.range * 2 / 3;
|
|
5121
5436
|
let anchorPos = anchorSpacing;
|
|
@@ -5125,7 +5440,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5125
5440
|
anchorPos += anchorSpacing;
|
|
5126
5441
|
}
|
|
5127
5442
|
const reachConditionList = anchorPosList.map((pos) => {
|
|
5128
|
-
actorController.condition(reachAnchorGroup).reachPosition(pos, void 0).then([(data2) => {
|
|
5443
|
+
return actorController.condition(reachAnchorGroup).reachPosition(pos, void 0).then([(data2) => {
|
|
5129
5444
|
updateRenderItems(true, true);
|
|
5130
5445
|
}]);
|
|
5131
5446
|
});
|
|
@@ -5244,7 +5559,9 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5244
5559
|
actorController = new ActorControl();
|
|
5245
5560
|
const divView = touchDiv.value.jsvGetProxyView();
|
|
5246
5561
|
actorController.bindForgeView(divView, true);
|
|
5247
|
-
divView.DragEnables?.(
|
|
5562
|
+
divView.DragEnables?.(
|
|
5563
|
+
ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT | ForgeConst.DragFlags.TOUCH_RECV_FLING_BIT | ForgeConst.DragFlags.TOUCH_RECV_FIRST_START | ForgeConst.DragFlags.TOUCH_RECV_LAST_END
|
|
5564
|
+
);
|
|
5248
5565
|
const walls = getTouchWall();
|
|
5249
5566
|
actorController.run([
|
|
5250
5567
|
actorController.condition(void 0, true).onTouchDown().then([onTouchDown]),
|
|
@@ -5282,23 +5599,24 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5282
5599
|
templateItemAdder.tryAddItem(null, 2);
|
|
5283
5600
|
}
|
|
5284
5601
|
let init_focus_id = 0;
|
|
5285
|
-
let
|
|
5602
|
+
let initVisibleStart = 0;
|
|
5286
5603
|
if (typeof props.initFocusId == "number") {
|
|
5287
5604
|
templateItemAdder.tryAddItemById(props.initFocusId);
|
|
5288
5605
|
const item = getItemById(props.initFocusId);
|
|
5289
5606
|
if (item) {
|
|
5290
5607
|
init_focus_id = props.initFocusId;
|
|
5291
5608
|
if (item.itemConfig.itemSlide == METRO_WIDGET.ITEM_SLIDE.ACT_ITEM_FOCUS) {
|
|
5292
|
-
|
|
5609
|
+
initVisibleStart = _calculateVisibleStart(item.templateInfo, 0, item.templateInfo, visibleInfo);
|
|
5293
5610
|
}
|
|
5294
5611
|
}
|
|
5295
5612
|
}
|
|
5296
5613
|
focusId = init_focus_id;
|
|
5297
|
-
|
|
5614
|
+
let initVisibleInfo = visibleInfo.copy();
|
|
5615
|
+
initVisibleInfo.start = initVisibleStart;
|
|
5298
5616
|
const initUpdater = pageUpdater.update(
|
|
5299
5617
|
metroTemplate,
|
|
5300
|
-
|
|
5301
|
-
|
|
5618
|
+
initVisibleInfo.startWithPadding,
|
|
5619
|
+
initVisibleInfo.endWithPadding,
|
|
5302
5620
|
0,
|
|
5303
5621
|
false,
|
|
5304
5622
|
permanentItemList
|
|
@@ -5307,8 +5625,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5307
5625
|
const delayLoadHandler = setTimeout(() => {
|
|
5308
5626
|
const updateHandler = pageUpdater.update(
|
|
5309
5627
|
metroTemplate,
|
|
5310
|
-
|
|
5311
|
-
|
|
5628
|
+
initVisibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
5629
|
+
initVisibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
5312
5630
|
focusId,
|
|
5313
5631
|
false,
|
|
5314
5632
|
permanentItemList
|
|
@@ -5321,8 +5639,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5321
5639
|
onMounted(() => {
|
|
5322
5640
|
_changeFocusId(focusId, false);
|
|
5323
5641
|
mounted = true;
|
|
5324
|
-
if (
|
|
5325
|
-
|
|
5642
|
+
if (initVisibleStart) {
|
|
5643
|
+
slideToInner(initVisibleStart, false);
|
|
5326
5644
|
}
|
|
5327
5645
|
if (isFocus && !alreadyCallItemFocus) {
|
|
5328
5646
|
onItemFocus(getItemById(focusId), preEdgeRect);
|
|
@@ -5367,7 +5685,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5367
5685
|
|
|
5368
5686
|
|
|
5369
5687
|
*/
|
|
5370
|
-
const _sfc_main$
|
|
5688
|
+
const _sfc_main$I = {
|
|
5371
5689
|
__name: "SlotComponent",
|
|
5372
5690
|
setup(__props) {
|
|
5373
5691
|
onBeforeUpdate(() => {
|
|
@@ -5421,7 +5739,16 @@ const _sfc_main$H = {
|
|
|
5421
5739
|
@constructor {Object} {speed, easing, boundProtect}
|
|
5422
5740
|
SeamlessSlide
|
|
5423
5741
|
@description 无缝滚动的设置类
|
|
5424
|
-
@constructor {Object} {
|
|
5742
|
+
@constructor {Object} {
|
|
5743
|
+
* startPercent: 左/上侧触发滚动的比例 0-1
|
|
5744
|
+
* endPercennt: 右/下侧触发滚动的比例 0-1
|
|
5745
|
+
* headRange: 左/上按键触发滚动的区域比例 0-1
|
|
5746
|
+
* tailRange: 右/下按键触发滚动的区域比例 0-1
|
|
5747
|
+
* speed: 滚动速度, 像素/毫秒
|
|
5748
|
+
* easing: 滚动动画的easing
|
|
5749
|
+
* boundaryProtect: 确定滚动位置能否小于0或者大于最大长度
|
|
5750
|
+
* fixFirstPage: 首页不滚动
|
|
5751
|
+
* }
|
|
5425
5752
|
FixPositionSlide
|
|
5426
5753
|
@description 固定位置滚动的设置类
|
|
5427
5754
|
@constructor {Object} {fixPercent, speed, easing, boundProtect}
|
|
@@ -5635,7 +5962,7 @@ const _sfc_main$H = {
|
|
|
5635
5962
|
|
|
5636
5963
|
|
|
5637
5964
|
*/
|
|
5638
|
-
const _sfc_main$
|
|
5965
|
+
const _sfc_main$H = {
|
|
5639
5966
|
__name: "MetroWidget",
|
|
5640
5967
|
props: {
|
|
5641
5968
|
padding: {
|
|
@@ -5902,7 +6229,7 @@ const _sfc_main$G = {
|
|
|
5902
6229
|
ref: item.slotRef,
|
|
5903
6230
|
id: `${__props.name}_${index}`
|
|
5904
6231
|
}, [
|
|
5905
|
-
createVNode(_sfc_main$
|
|
6232
|
+
createVNode(_sfc_main$I, { key: "__QcodeJsviewFreezeComponent" }, {
|
|
5906
6233
|
default: withCtx(() => [
|
|
5907
6234
|
renderSlot(_ctx.$slots, "renderItem", {
|
|
5908
6235
|
data: item.customerData,
|
|
@@ -5951,7 +6278,7 @@ const _sfc_main$G = {
|
|
|
5951
6278
|
|
|
5952
6279
|
|
|
5953
6280
|
*/
|
|
5954
|
-
const _sfc_main$
|
|
6281
|
+
const _sfc_main$G = {
|
|
5955
6282
|
__name: "ListWidget",
|
|
5956
6283
|
props: {
|
|
5957
6284
|
padding: {
|
|
@@ -6401,7 +6728,7 @@ const HUB_NS_PROVIDE_NAME = "__jsvFocusNameSpace__";
|
|
|
6401
6728
|
|
|
6402
6729
|
|
|
6403
6730
|
*/
|
|
6404
|
-
const _sfc_main$
|
|
6731
|
+
const _sfc_main$F = {
|
|
6405
6732
|
__name: "JsvFocusBlock",
|
|
6406
6733
|
props: {
|
|
6407
6734
|
name: String,
|
|
@@ -6609,7 +6936,7 @@ class JsvFocusManager {
|
|
|
6609
6936
|
}
|
|
6610
6937
|
const doAppMount = this.$_hookMount(app, options[0]);
|
|
6611
6938
|
app.mount = doAppMount;
|
|
6612
|
-
app.component("JsvFocusBlock", _sfc_main$
|
|
6939
|
+
app.component("JsvFocusBlock", _sfc_main$F);
|
|
6613
6940
|
app.config.globalProperties.$jsvFocusManager = this;
|
|
6614
6941
|
app.provide(HUB_NS_PROVIDE_NAME, null);
|
|
6615
6942
|
app.provide(ROOT_HUB_PROVIDE_NAME, new JsvFocusHubApi(this.$_topFDiv.getHub()));
|
|
@@ -7467,7 +7794,7 @@ class AudioProxy {
|
|
|
7467
7794
|
|
|
7468
7795
|
|
|
7469
7796
|
*/
|
|
7470
|
-
const _sfc_main$
|
|
7797
|
+
const _sfc_main$E = {
|
|
7471
7798
|
__name: "JsvAudio",
|
|
7472
7799
|
props: {
|
|
7473
7800
|
/**
|
|
@@ -7614,7 +7941,7 @@ const _sfc_main$D = {
|
|
|
7614
7941
|
|
|
7615
7942
|
|
|
7616
7943
|
*/
|
|
7617
|
-
const _sfc_main$
|
|
7944
|
+
const _sfc_main$D = {
|
|
7618
7945
|
__name: "JsvAudioProxy",
|
|
7619
7946
|
setup(__props) {
|
|
7620
7947
|
const AsyncComp = defineAsyncComponent(() => {
|
|
@@ -7624,7 +7951,7 @@ const _sfc_main$C = {
|
|
|
7624
7951
|
const BrowserAudio = import('./browser/BrowserAudio.vue.mjs');
|
|
7625
7952
|
resolve(BrowserAudio);
|
|
7626
7953
|
} else {
|
|
7627
|
-
resolve(_sfc_main$
|
|
7954
|
+
resolve(_sfc_main$E);
|
|
7628
7955
|
}
|
|
7629
7956
|
});
|
|
7630
7957
|
});
|
|
@@ -7919,7 +8246,7 @@ const cssColor2Android = (cssColor) => {
|
|
|
7919
8246
|
|
|
7920
8247
|
|
|
7921
8248
|
*/
|
|
7922
|
-
const _sfc_main$
|
|
8249
|
+
const _sfc_main$C = {
|
|
7923
8250
|
__name: "JsvLatex",
|
|
7924
8251
|
props: {
|
|
7925
8252
|
latexStr: {
|
|
@@ -7992,11 +8319,11 @@ const _sfc_main$B = {
|
|
|
7992
8319
|
clientWidth = Math.round(props.height * (textureW / textureH));
|
|
7993
8320
|
}
|
|
7994
8321
|
};
|
|
7995
|
-
let layoutView = new Forge$
|
|
7996
|
-
new Forge$
|
|
8322
|
+
let layoutView = new Forge$2.LayoutView(
|
|
8323
|
+
new Forge$2.TextureSetting(pluginTexture)
|
|
7997
8324
|
);
|
|
7998
8325
|
layoutView.EnableAutoSize();
|
|
7999
|
-
innerViewId = Forge$
|
|
8326
|
+
innerViewId = Forge$2.sViewStore.add(new Forge$2.ViewInfo(layoutView));
|
|
8000
8327
|
};
|
|
8001
8328
|
const loadInfo = sPluginLoader.getLoadInfo();
|
|
8002
8329
|
if (loadInfo.done) {
|
|
@@ -8012,7 +8339,7 @@ const _sfc_main$B = {
|
|
|
8012
8339
|
}
|
|
8013
8340
|
onBeforeUnmount(() => {
|
|
8014
8341
|
if (innerViewId !== -1) {
|
|
8015
|
-
Forge$
|
|
8342
|
+
Forge$2.sViewStore.remove(innerViewId);
|
|
8016
8343
|
innerViewId = -1;
|
|
8017
8344
|
}
|
|
8018
8345
|
});
|
|
@@ -8041,7 +8368,7 @@ const _sfc_main$B = {
|
|
|
8041
8368
|
|
|
8042
8369
|
|
|
8043
8370
|
*/
|
|
8044
|
-
const _sfc_main$
|
|
8371
|
+
const _sfc_main$B = {
|
|
8045
8372
|
__name: "JsvLatexProxy",
|
|
8046
8373
|
setup(__props) {
|
|
8047
8374
|
const AsyncComp = defineAsyncComponent(() => {
|
|
@@ -8051,7 +8378,7 @@ const _sfc_main$A = {
|
|
|
8051
8378
|
const BrowserJsvLatex = import('./browser/BrowserJsvLatex.vue.mjs');
|
|
8052
8379
|
resolve(BrowserJsvLatex);
|
|
8053
8380
|
} else {
|
|
8054
|
-
resolve(_sfc_main$
|
|
8381
|
+
resolve(_sfc_main$C);
|
|
8055
8382
|
}
|
|
8056
8383
|
});
|
|
8057
8384
|
});
|
|
@@ -8262,127 +8589,85 @@ function direct_call(name, ...args) {
|
|
|
8262
8589
|
}
|
|
8263
8590
|
return null;
|
|
8264
8591
|
}
|
|
8265
|
-
/*
|
|
8266
|
-
* 获取当前集成JsView的APP目前支持的扩展功能列表
|
|
8267
|
-
*
|
|
8268
|
-
* @returns {string} 功能列表,以逗号隔开,包含:
|
|
8269
|
-
* favourite : 支持加入收藏夹功能
|
|
8270
|
-
* history : 支持浏览后自动进入历史记录功能
|
|
8271
|
-
* textureVideo : 支持将video渲染到texture的方式(JsvVideo高阶控件的usetexture属性控制)
|
|
8272
|
-
*/
|
|
8273
8592
|
function getExtFeatureSupports() {
|
|
8274
8593
|
if (!feature_supports) {
|
|
8275
8594
|
feature_supports = direct_call("getExtFeaturesSupport");
|
|
8276
8595
|
}
|
|
8277
8596
|
return feature_supports;
|
|
8278
8597
|
}
|
|
8279
|
-
/*
|
|
8280
|
-
* 获取设备mac地址,优先获取有线mac,无则获取wifi mac
|
|
8281
|
-
* @returns {string} mac address
|
|
8282
|
-
*
|
|
8283
|
-
*/
|
|
8284
8598
|
function getMac() {
|
|
8285
8599
|
return direct_call("getMac");
|
|
8286
8600
|
}
|
|
8287
|
-
/*
|
|
8288
|
-
* 获取设备有线mac地址
|
|
8289
|
-
* @returns {string} mac address
|
|
8290
|
-
*
|
|
8291
|
-
*/
|
|
8292
8601
|
function getWireMac() {
|
|
8293
8602
|
return direct_call("getWireMac");
|
|
8294
8603
|
}
|
|
8295
|
-
/*
|
|
8296
|
-
* 获取设备wifi mac地址
|
|
8297
|
-
* @returns {string} mac address
|
|
8298
|
-
*
|
|
8299
|
-
*/
|
|
8300
8604
|
function getWifiMac() {
|
|
8301
8605
|
return direct_call("getWifiMac");
|
|
8302
8606
|
}
|
|
8303
|
-
/*
|
|
8304
|
-
* 获取设备UUID
|
|
8305
|
-
* @returns {string} UUID
|
|
8306
|
-
*
|
|
8307
|
-
*/
|
|
8308
8607
|
function getDeviceUUID() {
|
|
8309
8608
|
return direct_call("getDeviceUUID");
|
|
8310
8609
|
}
|
|
8311
|
-
/*
|
|
8312
|
-
* 获取设备Android ID
|
|
8313
|
-
* @returns {string} Android ID
|
|
8314
|
-
*
|
|
8315
|
-
*/
|
|
8316
8610
|
function getAndroidId() {
|
|
8317
8611
|
return direct_call("getAndroidId");
|
|
8318
8612
|
}
|
|
8319
|
-
/*
|
|
8320
|
-
* 打开另外一个小程序
|
|
8321
|
-
* @param {string} url 小程序url
|
|
8322
|
-
* @param {string} startup_image 启动图url
|
|
8323
|
-
* @param {string} startup_video 启动视频url
|
|
8324
|
-
* @param {int} startup_duration 启动图时长,默认0
|
|
8325
|
-
* @param {int} add_history 是否添加历史,0不添加,1添加
|
|
8326
|
-
*
|
|
8327
|
-
*/
|
|
8328
8613
|
function openWindow(url, startup_image, startup_video, startup_duration, add_history) {
|
|
8329
8614
|
let setting = {};
|
|
8330
|
-
if (
|
|
8615
|
+
if (startup_image !== null && startup_image !== "")
|
|
8331
8616
|
setting.startupImage = startup_image;
|
|
8332
|
-
if (
|
|
8617
|
+
if (startup_video !== null && startup_video !== "") {
|
|
8333
8618
|
setting.startupVideo = startup_video;
|
|
8334
8619
|
}
|
|
8335
8620
|
setting.startupDuration = startup_duration;
|
|
8336
8621
|
setting.addHistory = add_history ? 1 : 0;
|
|
8337
|
-
|
|
8622
|
+
return window.jJsvRuntimeBridge.openWindow(url, JSON.stringify(setting));
|
|
8623
|
+
}
|
|
8624
|
+
function startUrlInNewTab(url, startup_image, startup_video, startup_duration, add_history) {
|
|
8625
|
+
let setting = {};
|
|
8626
|
+
if (startup_image !== null && startup_image !== "")
|
|
8627
|
+
setting.startupImage = startup_image;
|
|
8628
|
+
if (startup_video !== null && startup_video !== "") {
|
|
8629
|
+
setting.startupVideo = startup_video;
|
|
8630
|
+
}
|
|
8631
|
+
setting.startupDuration = startup_duration;
|
|
8632
|
+
setting.addHistory = add_history ? 1 : 0;
|
|
8633
|
+
return window.jJsvRuntimeBridge.startUrlInNewTab(url, JSON.stringify(setting));
|
|
8634
|
+
}
|
|
8635
|
+
function onWindowResult(data) {
|
|
8636
|
+
direct_call("onWindowResult", data);
|
|
8637
|
+
}
|
|
8638
|
+
function reloadWindow(url, startup_image, startup_video, startup_duration, add_history) {
|
|
8639
|
+
let setting = {};
|
|
8640
|
+
if (startup_image !== null && startup_image !== "")
|
|
8641
|
+
setting.startupImage = startup_image;
|
|
8642
|
+
if (startup_video !== null && startup_video !== "") {
|
|
8643
|
+
setting.startupVideo = startup_video;
|
|
8644
|
+
}
|
|
8645
|
+
setting.startupDuration = startup_duration;
|
|
8646
|
+
setting.addHistory = add_history ? 1 : 0;
|
|
8647
|
+
return window.jJsvRuntimeBridge.reloadWindow(url, JSON.stringify(setting));
|
|
8338
8648
|
}
|
|
8339
|
-
/*
|
|
8340
|
-
* 关闭当前小程序
|
|
8341
|
-
*
|
|
8342
|
-
*/
|
|
8343
8649
|
function closePage() {
|
|
8344
8650
|
direct_call("closePage");
|
|
8345
8651
|
}
|
|
8346
|
-
/*
|
|
8347
|
-
* 获取设备UUID
|
|
8348
|
-
* @param {string} key 属性名称
|
|
8349
|
-
* @returns {string} 属性值
|
|
8350
|
-
*
|
|
8351
|
-
*/
|
|
8352
8652
|
function getSystemProperty(key) {
|
|
8353
8653
|
return direct_call("getSystemProperty", key);
|
|
8354
8654
|
}
|
|
8355
|
-
/*
|
|
8356
|
-
* 获取已安装应用列表
|
|
8357
|
-
* @returns {string} 应用列表,JSON结构的数组
|
|
8358
|
-
*
|
|
8359
|
-
*/
|
|
8360
8655
|
function getInstalledApps() {
|
|
8361
8656
|
return direct_call("getInstalledApps");
|
|
8362
8657
|
}
|
|
8363
|
-
/*
|
|
8364
|
-
* 启动安卓APP
|
|
8365
|
-
* @param {string} package_name 包名
|
|
8366
|
-
* @param {string} activity Activity方式启动
|
|
8367
|
-
* @param {string} action Action方式启动
|
|
8368
|
-
* @param {string} uri Uri方式启动
|
|
8369
|
-
* @param {Array} flags 数组,用于intent.addFlags
|
|
8370
|
-
* @param {Array} param JSON格式数组,用于intent.putExtra
|
|
8371
|
-
*
|
|
8372
|
-
*/
|
|
8373
8658
|
function startNativeApp(package_name, activity, action, uri, flags, param) {
|
|
8374
8659
|
var obj = {};
|
|
8375
|
-
if (
|
|
8660
|
+
if (package_name !== null && package_name !== "")
|
|
8376
8661
|
obj.packageName = package_name;
|
|
8377
|
-
if (
|
|
8662
|
+
if (activity !== null && activity !== "")
|
|
8378
8663
|
obj.activity = activity;
|
|
8379
|
-
if (
|
|
8664
|
+
if (action !== null && action !== "")
|
|
8380
8665
|
obj.action = action;
|
|
8381
|
-
if (
|
|
8666
|
+
if (uri !== null && uri !== "")
|
|
8382
8667
|
obj.uri = uri;
|
|
8383
|
-
if (
|
|
8668
|
+
if (flags !== null && flags.length > 0)
|
|
8384
8669
|
obj.flags = flags;
|
|
8385
|
-
if (
|
|
8670
|
+
if (param !== null && param.length > 0)
|
|
8386
8671
|
obj.param = param;
|
|
8387
8672
|
direct_call("startNativeApp", JSON.stringify(obj));
|
|
8388
8673
|
}
|
|
@@ -8402,25 +8687,28 @@ function sendNativeBroadcast(package_name, broadcast, action, uri, flags, param)
|
|
|
8402
8687
|
obj.param = param;
|
|
8403
8688
|
direct_call("sendNativeBroadcast", JSON.stringify(obj));
|
|
8404
8689
|
}
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8690
|
+
function startService(package_name, services, action, uri, flags, param, is_foreground) {
|
|
8691
|
+
var obj = {};
|
|
8692
|
+
if (typeof package_name != void 0 && package_name !== null && package_name !== "")
|
|
8693
|
+
obj.packageName = package_name;
|
|
8694
|
+
if (typeof services != void 0 && services !== null && services !== "")
|
|
8695
|
+
obj.services = services;
|
|
8696
|
+
if (typeof action != void 0 && action !== null && action !== "")
|
|
8697
|
+
obj.action = action;
|
|
8698
|
+
if (typeof uri != void 0 && uri !== null && uri !== "")
|
|
8699
|
+
obj.uri = uri;
|
|
8700
|
+
if (typeof flags != void 0 && flags !== null && flags.length > 0)
|
|
8701
|
+
obj.flags = flags;
|
|
8702
|
+
if (typeof param != void 0 && param !== null && param.length > 0)
|
|
8703
|
+
obj.param = param;
|
|
8704
|
+
direct_call("startServices", JSON.stringify(obj), is_foreground);
|
|
8705
|
+
}
|
|
8410
8706
|
function getDeviceInfo() {
|
|
8411
8707
|
return direct_call("getDeviceInfo");
|
|
8412
8708
|
}
|
|
8413
|
-
/*
|
|
8414
|
-
* 获取自己的app信息
|
|
8415
|
-
* @returns
|
|
8416
|
-
*/
|
|
8417
8709
|
function getAppInfo() {
|
|
8418
8710
|
return direct_call("getAppInfo");
|
|
8419
8711
|
}
|
|
8420
|
-
/*
|
|
8421
|
-
* 页面加载成功后调用去除启动图
|
|
8422
|
-
*
|
|
8423
|
-
*/
|
|
8424
8712
|
function notifyPageLoadDone() {
|
|
8425
8713
|
notifyPageLoaded();
|
|
8426
8714
|
}
|
|
@@ -8428,11 +8716,6 @@ function notifyPageLoaded() {
|
|
|
8428
8716
|
window.JsView?.enableReceivingUserInput?.();
|
|
8429
8717
|
direct_call("notifyPageLoaded");
|
|
8430
8718
|
}
|
|
8431
|
-
/*
|
|
8432
|
-
* 是否支持收藏功能
|
|
8433
|
-
* @returns {boolean} true支持,false不支持
|
|
8434
|
-
*
|
|
8435
|
-
*/
|
|
8436
8719
|
function hasFavouriteFunction() {
|
|
8437
8720
|
let features = getExtFeatureSupports();
|
|
8438
8721
|
if (features && features.indexOf("favourite") >= 0) {
|
|
@@ -8440,12 +8723,6 @@ function hasFavouriteFunction() {
|
|
|
8440
8723
|
}
|
|
8441
8724
|
return false;
|
|
8442
8725
|
}
|
|
8443
|
-
/*
|
|
8444
|
-
* 获取启动内核版本和引擎
|
|
8445
|
-
* @returns {Object} 包含
|
|
8446
|
-
* COREVERSIONRANGE: 启动时设定的内核版本范围
|
|
8447
|
-
* ENGINE: 启动时设定的Js引擎的URL
|
|
8448
|
-
*/
|
|
8449
8726
|
function getStartParams() {
|
|
8450
8727
|
let json = direct_call("getStartParams");
|
|
8451
8728
|
if (json) {
|
|
@@ -8454,12 +8731,6 @@ function getStartParams() {
|
|
|
8454
8731
|
return null;
|
|
8455
8732
|
}
|
|
8456
8733
|
}
|
|
8457
|
-
/*
|
|
8458
|
-
* 添加收藏
|
|
8459
|
-
* @param {string} url 收藏的url
|
|
8460
|
-
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
8461
|
-
*
|
|
8462
|
-
*/
|
|
8463
8734
|
function addFavourite(url, callback) {
|
|
8464
8735
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.addFavourite === "function") {
|
|
8465
8736
|
let async_message = window.jJsvRuntimeBridge.addFavourite(url);
|
|
@@ -8474,12 +8745,6 @@ function addFavourite(url, callback) {
|
|
|
8474
8745
|
});
|
|
8475
8746
|
}
|
|
8476
8747
|
}
|
|
8477
|
-
/*
|
|
8478
|
-
* 更新收藏
|
|
8479
|
-
* @param {string} url 收藏的url
|
|
8480
|
-
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
8481
|
-
*
|
|
8482
|
-
*/
|
|
8483
8748
|
function updateFavourite(url, callback) {
|
|
8484
8749
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.updateFavourite === "function") {
|
|
8485
8750
|
let async_message = window.jJsvRuntimeBridge.updateFavourite(url);
|
|
@@ -8494,12 +8759,6 @@ function updateFavourite(url, callback) {
|
|
|
8494
8759
|
});
|
|
8495
8760
|
}
|
|
8496
8761
|
}
|
|
8497
|
-
/*
|
|
8498
|
-
* 删除指定收藏
|
|
8499
|
-
* @param {string} app_name app name 唯一标识
|
|
8500
|
-
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
8501
|
-
*
|
|
8502
|
-
*/
|
|
8503
8762
|
function removeFavourite(app_name, callback) {
|
|
8504
8763
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.removeFavourite === "function") {
|
|
8505
8764
|
let async_message = window.jJsvRuntimeBridge.removeFavourite(app_name);
|
|
@@ -8514,70 +8773,30 @@ function removeFavourite(app_name, callback) {
|
|
|
8514
8773
|
});
|
|
8515
8774
|
}
|
|
8516
8775
|
}
|
|
8517
|
-
/*
|
|
8518
|
-
* 获取指定收藏
|
|
8519
|
-
* @param {string} app_name app name 唯一标识
|
|
8520
|
-
*/
|
|
8521
8776
|
function getFavourite(app_name) {
|
|
8522
8777
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.getFavourite === "function") {
|
|
8523
8778
|
return window.jJsvRuntimeBridge.getFavourite(app_name);
|
|
8524
8779
|
}
|
|
8525
8780
|
return null;
|
|
8526
8781
|
}
|
|
8527
|
-
/*
|
|
8528
|
-
* 获取所有收藏
|
|
8529
|
-
*
|
|
8530
|
-
*/
|
|
8531
8782
|
function getFavouriteAll() {
|
|
8532
8783
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.getFavouriteAll === "function") {
|
|
8533
8784
|
return window.jJsvRuntimeBridge.getFavouriteAll();
|
|
8534
8785
|
}
|
|
8535
8786
|
return null;
|
|
8536
8787
|
}
|
|
8537
|
-
/*
|
|
8538
|
-
* 浮窗控制接口,设置从本浮窗界面进行预热的二级浮窗的启动默认尺寸(若不设置则为全屏)
|
|
8539
|
-
* @param {string} mode 全屏模式还是需要Resize的模式。取值范围: "full" 或者 "mini"
|
|
8540
|
-
* 设置成 "mini" 模式后,启动后的界面内需要调用popupResizePosition来调整尺寸才能可见
|
|
8541
|
-
*/
|
|
8542
8788
|
function setPopupInitSize(mode) {
|
|
8543
8789
|
direct_call("setPopupInitSize", mode);
|
|
8544
8790
|
}
|
|
8545
|
-
/*
|
|
8546
|
-
* 浮窗控制接口,设置浮窗显示区域,以相对定位的方式调整弹出框的位置(弹出框弹出后先以尺寸1x1的方式展现)
|
|
8547
|
-
* @param {string} align 横纵对齐方式,有left, right, bottom, top, center可选择
|
|
8548
|
-
* 例如: 右下角"right bottom", 居中"center center"
|
|
8549
|
-
* @param {number} max_width 显示区域最大宽度(占屏幕百分比)
|
|
8550
|
-
* @param {number} max_height 显示区域最大高度(占屏幕百分比)
|
|
8551
|
-
* @param {number} aspect 横纵比设定
|
|
8552
|
-
* 显示区域根据 max_width, max_height, aspect 来计算出同时满足3个条件的最大区域
|
|
8553
|
-
*/
|
|
8554
8791
|
function popupResizePosition(align, max_width, max_height, aspect) {
|
|
8555
8792
|
direct_call("popupResizePosition", align, max_width, max_height, aspect);
|
|
8556
8793
|
}
|
|
8557
|
-
/*
|
|
8558
|
-
* 浮窗系统认为自己准备好后,调用此接口,获取设备的焦点。若不调用的话,默认浮窗系统捕获的焦点
|
|
8559
|
-
*/
|
|
8560
8794
|
function popupGainFocus() {
|
|
8561
8795
|
direct_call("popupGainFocus");
|
|
8562
8796
|
}
|
|
8563
8797
|
function popupDiscardFocus() {
|
|
8564
8798
|
direct_call("popupGainFocus");
|
|
8565
8799
|
}
|
|
8566
|
-
/*
|
|
8567
|
-
* 页面预热接口,预热页面将会将以一个新的FrameLayout(内含JsView)的方式加载一个新的应用
|
|
8568
|
-
* 但这个应用在warmLoadView之前,不会创建texture/surface的实际描画资源,也不会加载图片
|
|
8569
|
-
* 仅加载所有JS代码,并正常走完所有启动逻辑(包括描画逻辑),但不会走setTimeout对应的延时逻辑,也不会显示
|
|
8570
|
-
* 预热的界面可以极大加速界面切换的时间,例如应用跳转到购物类界面
|
|
8571
|
-
* mode为1表示全预热,app_url不能为空,mode为2表示只预热engine url,如果app_url不为空,engine url来自于app_ur
|
|
8572
|
-
* 否则来自于当前使用的engine url,app_url表示小程序的链接。
|
|
8573
|
-
* 【特别注意】warmUp起来的view,在warmLoadView调用之前,若启动者JsView关闭的话,此View应该在
|
|
8574
|
-
* View管理模块被清理掉,以防泄露,但在warmLoadView完成后,就不需要进行关联清理,请管理模块务必保证此机制。
|
|
8575
|
-
* [参数]
|
|
8576
|
-
* int mode 预热模式,1:全预热,2:半预热
|
|
8577
|
-
* String app_url 要预热的app_url,当半预热时,可以为null
|
|
8578
|
-
* [返回值]
|
|
8579
|
-
* int: 为view_refer_id值,预热后的View的ID,用于后续的warmLoadView和closeWarmView使用
|
|
8580
|
-
*/
|
|
8581
8800
|
function warmUpView(mode, app_url) {
|
|
8582
8801
|
if (mode !== 1 && mode !== 2) {
|
|
8583
8802
|
console.error(`not support mode(${mode})`);
|
|
@@ -8589,48 +8808,41 @@ function warmUpView(mode, app_url) {
|
|
|
8589
8808
|
}
|
|
8590
8809
|
return direct_call("warmUpView", mode, app_url);
|
|
8591
8810
|
}
|
|
8592
|
-
/*
|
|
8593
|
-
* 将warmUpView后的View展示出来
|
|
8594
|
-
* 若warmUpView中app_url不为null,进行了全预热,则本调用的app_url可以为null
|
|
8595
|
-
* 当warmUpView中设置了app_url时,仍可以新的app_url调整history hash(#)部分进行子页面切换
|
|
8596
|
-
*
|
|
8597
|
-
* @param {number} view_refer_id warmUpView调用后返回来的View ID
|
|
8598
|
-
* @param {string} app_url 界面的应用地址,支持?(search)和#(hash)字段
|
|
8599
|
-
* @param {boolean} add_history 启动的界面是否进访问历史列表
|
|
8600
|
-
*/
|
|
8601
8811
|
function warmLoadView(view_refer_id, app_url, add_history) {
|
|
8602
8812
|
direct_call("warmLoadView", view_refer_id, app_url, !!add_history);
|
|
8603
8813
|
}
|
|
8604
|
-
/*
|
|
8605
|
-
* 关闭warmUp后未进行warmLoad的View,释放资源
|
|
8606
|
-
* @param {number} view_refer_id warmUpView调用后返回来的View ID
|
|
8607
|
-
*/
|
|
8608
8814
|
function closeWarmedView(view_refer_id) {
|
|
8609
8815
|
direct_call("closeWarmedView", view_refer_id);
|
|
8610
8816
|
}
|
|
8611
|
-
/*
|
|
8612
|
-
* 触发预下载内核
|
|
8613
|
-
* @param {string} core_version 带branch(主分支版本不带此信息)和版本信息的内核版本,
|
|
8614
|
-
* 例如: 1021265_release_build_xxx
|
|
8615
|
-
* @returns promise 对象,用于监听下载完成与下载失败
|
|
8616
|
-
*/
|
|
8617
8817
|
function preDownloadSdk(core_version) {
|
|
8618
8818
|
return direct_call("preDownloadSdk", core_version);
|
|
8619
8819
|
}
|
|
8620
|
-
|
|
8621
|
-
|
|
8820
|
+
function getNetworkTypeStatusImmediate() {
|
|
8821
|
+
return direct_call("getNetworkTypeStatusImmediate");
|
|
8822
|
+
}
|
|
8823
|
+
function registerNetStateListener(callback) {
|
|
8824
|
+
return direct_call("registerNetStateListener", callback);
|
|
8825
|
+
}
|
|
8826
|
+
function unRegisterNetStateListener(callback) {
|
|
8827
|
+
return direct_call("unRegisterNetStateListener", callback);
|
|
8828
|
+
}
|
|
8829
|
+
const bridge = {
|
|
8622
8830
|
getMac,
|
|
8623
8831
|
getWireMac,
|
|
8624
8832
|
getWifiMac,
|
|
8625
8833
|
getDeviceUUID,
|
|
8626
8834
|
getAndroidId,
|
|
8627
8835
|
openWindow,
|
|
8836
|
+
startUrlInNewTab,
|
|
8837
|
+
onWindowResult,
|
|
8838
|
+
reloadWindow,
|
|
8628
8839
|
closePage,
|
|
8629
8840
|
getStartParams,
|
|
8630
8841
|
getSystemProperty,
|
|
8631
8842
|
getInstalledApps,
|
|
8632
8843
|
startNativeApp,
|
|
8633
8844
|
sendNativeBroadcast,
|
|
8845
|
+
startService,
|
|
8634
8846
|
getDeviceInfo,
|
|
8635
8847
|
getAppInfo,
|
|
8636
8848
|
notifyPageLoadDone,
|
|
@@ -8648,7 +8860,10 @@ const jJsvRuntimeBridge = {
|
|
|
8648
8860
|
warmUpView,
|
|
8649
8861
|
warmLoadView,
|
|
8650
8862
|
closeWarmedView,
|
|
8651
|
-
preDownloadSdk
|
|
8863
|
+
preDownloadSdk,
|
|
8864
|
+
getNetworkTypeStatusImmediate,
|
|
8865
|
+
registerNetStateListener,
|
|
8866
|
+
unRegisterNetStateListener
|
|
8652
8867
|
};
|
|
8653
8868
|
|
|
8654
8869
|
//
|
|
@@ -8865,7 +9080,7 @@ class JsvStyleClass {
|
|
|
8865
9080
|
}
|
|
8866
9081
|
this._StyleGroup.insertRule(`.${this._Name}${css_define}`);
|
|
8867
9082
|
} else {
|
|
8868
|
-
Forge$
|
|
9083
|
+
Forge$2.ReactUtils.StyleClassMap[this._Name] = this;
|
|
8869
9084
|
}
|
|
8870
9085
|
}
|
|
8871
9086
|
_RecycleInner() {
|
|
@@ -8873,7 +9088,7 @@ class JsvStyleClass {
|
|
|
8873
9088
|
if (window.JsvDisableReactWrapper) {
|
|
8874
9089
|
this._StyleGroup.removeRule(`.${this._Name}`);
|
|
8875
9090
|
} else {
|
|
8876
|
-
delete Forge$
|
|
9091
|
+
delete Forge$2.ReactUtils.StyleClassMap[this._Name];
|
|
8877
9092
|
}
|
|
8878
9093
|
this._Name = null;
|
|
8879
9094
|
this._Styles = null;
|
|
@@ -9049,7 +9264,7 @@ window.JsvDebugTools = DebugTools;
|
|
|
9049
9264
|
* Object 句柄,用于传输给 createImpactTracer
|
|
9050
9265
|
*/
|
|
9051
9266
|
function createImpactCallback(on_contact, on_dis_contact) {
|
|
9052
|
-
return new Forge$
|
|
9267
|
+
return new Forge$2.sImpactSensorManager.Callback(on_contact, on_dis_contact);
|
|
9053
9268
|
}
|
|
9054
9269
|
/*
|
|
9055
9270
|
* createImpactTracer 参数说明:
|
|
@@ -9061,7 +9276,7 @@ function createImpactCallback(on_contact, on_dis_contact) {
|
|
|
9061
9276
|
* Object 句柄,提供 Recycle() 函数用于停止碰撞检测,需要再componentWillUnmount进行调用(清理)
|
|
9062
9277
|
*/
|
|
9063
9278
|
function createImpactTracer(ele1, ele2, callback, auto_froze) {
|
|
9064
|
-
return Forge$
|
|
9279
|
+
return Forge$2.sImpactSensorManager.StartTrace(ele1.jsvGetProxyView(), ele2.jsvGetProxyView(), callback, auto_froze);
|
|
9065
9280
|
}
|
|
9066
9281
|
// 创建用于设置碰撞即停管理对象的参数
|
|
9067
9282
|
// 结果用于函数 createImpactAutoFroze 和 updateImpactAutoFroze
|
|
@@ -9092,7 +9307,7 @@ function createImpactAutoFroze(element_auto_froze_pre_impact, element_auto_froze
|
|
|
9092
9307
|
}
|
|
9093
9308
|
const pre_impact_list = _ConvertToViewsList(element_auto_froze_pre_impact);
|
|
9094
9309
|
const on_impact_list = _ConvertToViewsList(element_auto_froze_on_impact);
|
|
9095
|
-
return new Forge$
|
|
9310
|
+
return new Forge$2.sImpactSensorManager.AutoFroze(
|
|
9096
9311
|
pre_impact_list.length > 0 ? pre_impact_list : null,
|
|
9097
9312
|
on_impact_list.length > 0 ? on_impact_list : null
|
|
9098
9313
|
);
|
|
@@ -9106,7 +9321,7 @@ function createImpactAutoFroze(element_auto_froze_pre_impact, element_auto_froze
|
|
|
9106
9321
|
* 无
|
|
9107
9322
|
*/
|
|
9108
9323
|
function updateImpactAutoFroze(handler, element_auto_froze_pre_impact, element_auto_froze_on_impact) {
|
|
9109
|
-
if (handler instanceof Forge$
|
|
9324
|
+
if (handler instanceof Forge$2.sImpactSensorManager.AutoFroze) {
|
|
9110
9325
|
console.error("Error: handler type error");
|
|
9111
9326
|
return;
|
|
9112
9327
|
}
|
|
@@ -9486,9 +9701,12 @@ class TextureBase {
|
|
|
9486
9701
|
}
|
|
9487
9702
|
}
|
|
9488
9703
|
addToStore() {
|
|
9489
|
-
this.storeName =
|
|
9704
|
+
this.storeName = this.getStoreName();
|
|
9490
9705
|
sStore.addToStore(this.storeName, this);
|
|
9491
9706
|
}
|
|
9707
|
+
getStoreName() {
|
|
9708
|
+
return `${this.baseName}-${this.textureRef?.GetTextureId()}`;
|
|
9709
|
+
}
|
|
9492
9710
|
/**
|
|
9493
9711
|
* commit
|
|
9494
9712
|
* 完成绘制设置,出发制作目标texture
|
|
@@ -9498,6 +9716,15 @@ class TextureBase {
|
|
|
9498
9716
|
commit() {
|
|
9499
9717
|
return this.storeName;
|
|
9500
9718
|
}
|
|
9719
|
+
/**
|
|
9720
|
+
* getTextureRef
|
|
9721
|
+
* 内部接口,获取内联的Forge.ImageTexture的句柄
|
|
9722
|
+
*
|
|
9723
|
+
* @return {String} BaseName-textureId 格式的名字,用于 jsvtexturestore:// 的访问链接
|
|
9724
|
+
*/
|
|
9725
|
+
getTextureRef() {
|
|
9726
|
+
return this.textureRef;
|
|
9727
|
+
}
|
|
9501
9728
|
recycle() {
|
|
9502
9729
|
let textureRef = sStore.removeFromStore(this.storeName);
|
|
9503
9730
|
if (textureRef) {
|
|
@@ -9709,9 +9936,9 @@ class CustomPath extends DrawingPath {
|
|
|
9709
9936
|
// utils/JsViewVueTools/JsvTextureDefines.ts;
|
|
9710
9937
|
//
|
|
9711
9938
|
class TextureInstantType {
|
|
9712
|
-
static Auto = Forge$
|
|
9713
|
-
static Sync = Forge$
|
|
9714
|
-
static Async = Forge$
|
|
9939
|
+
static Auto = Forge$1.TextureInstantLoad.AUTO;
|
|
9940
|
+
static Sync = Forge$1.TextureInstantLoad.SYNC;
|
|
9941
|
+
static Async = Forge$1.TextureInstantLoad.ASYNC;
|
|
9715
9942
|
}
|
|
9716
9943
|
|
|
9717
9944
|
//
|
|
@@ -9888,6 +10115,53 @@ class CanvasTexture extends TextureBase {
|
|
|
9888
10115
|
}
|
|
9889
10116
|
}
|
|
9890
10117
|
|
|
10118
|
+
//
|
|
10119
|
+
// utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts;
|
|
10120
|
+
//
|
|
10121
|
+
class CapturedTexture extends TextureBase {
|
|
10122
|
+
_AutoRecycle;
|
|
10123
|
+
_Callback;
|
|
10124
|
+
_CaptureDiv;
|
|
10125
|
+
_Canceled = false;
|
|
10126
|
+
constructor(captureDiv, callback, autoRecycle) {
|
|
10127
|
+
super(null);
|
|
10128
|
+
this._CaptureDiv = captureDiv;
|
|
10129
|
+
this._Callback = callback;
|
|
10130
|
+
this._AutoRecycle = autoRecycle;
|
|
10131
|
+
}
|
|
10132
|
+
// 清理对Callback和div的引用,防止泄露
|
|
10133
|
+
cancel() {
|
|
10134
|
+
if (!this._Canceled) {
|
|
10135
|
+
this._Callback = null;
|
|
10136
|
+
this._CaptureDiv = null;
|
|
10137
|
+
this._Canceled = true;
|
|
10138
|
+
}
|
|
10139
|
+
}
|
|
10140
|
+
commit() {
|
|
10141
|
+
this.textureRef = handles.TextureManager.GetCapturedTexture();
|
|
10142
|
+
this._CaptureDiv.jsvGetProxyView(true).Capture2Texture(
|
|
10143
|
+
this.textureRef,
|
|
10144
|
+
(result) => {
|
|
10145
|
+
let resultObj = JSON.parse(result);
|
|
10146
|
+
if (this._Canceled) {
|
|
10147
|
+
return;
|
|
10148
|
+
}
|
|
10149
|
+
if (!this._AutoRecycle) {
|
|
10150
|
+
this.textureRef.DisableAutoRecycle();
|
|
10151
|
+
this.addToStore();
|
|
10152
|
+
}
|
|
10153
|
+
this._Callback?.(
|
|
10154
|
+
this.getStoreName(),
|
|
10155
|
+
this._AutoRecycle,
|
|
10156
|
+
resultObj.width,
|
|
10157
|
+
resultObj.height
|
|
10158
|
+
);
|
|
10159
|
+
}
|
|
10160
|
+
);
|
|
10161
|
+
return "";
|
|
10162
|
+
}
|
|
10163
|
+
}
|
|
10164
|
+
|
|
9891
10165
|
//
|
|
9892
10166
|
// utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts;
|
|
9893
10167
|
//
|
|
@@ -9917,7 +10191,7 @@ let sTextureStoreApi = {
|
|
|
9917
10191
|
/**
|
|
9918
10192
|
* canvasTexture
|
|
9919
10193
|
* 创建CanvasTexture句柄,执行commit()后, 获取访问名(访问名规则: 输入参数 baseName + 分配id)
|
|
9920
|
-
* 可以在 img.src 或者 div.backgroundImage 通过 "texturestore://访问名"
|
|
10194
|
+
* 可以在 img.src 或者 div.backgroundImage 通过 "texturestore://访问名" 来使用
|
|
9921
10195
|
*
|
|
9922
10196
|
* @param {int} width 此Canvas画布的宽度
|
|
9923
10197
|
* @param {int} height 此Canvas画布的高度
|
|
@@ -9927,14 +10201,41 @@ let sTextureStoreApi = {
|
|
|
9927
10201
|
canvasTexture: (width, height, baseName) => {
|
|
9928
10202
|
return new CanvasTexture(width, height, baseName);
|
|
9929
10203
|
},
|
|
10204
|
+
/**
|
|
10205
|
+
* capture2Texture
|
|
10206
|
+
* 对给定div做截图并生成一个Texture, 在回调函数中返回此Texture的访问名,
|
|
10207
|
+
* 此访问名可以在 img.src 或者 div.backgroundImage 通过 "texturestore://访问名" 来使用
|
|
10208
|
+
* 注意: PC模拟环境下,无法截取运动物体的中间状态,但盒子端可以正常截取
|
|
10209
|
+
*
|
|
10210
|
+
* 关于 autoRecycle:
|
|
10211
|
+
* true(默认值): 收到callback的访问名后,请立即设置给使用的地方,若此宏任务结束(其触发的所有微任务全完成后)时,
|
|
10212
|
+
* 若资源未被div和img使用,则会自动回收,回收后此访问名对应内容为黑屏
|
|
10213
|
+
* false: 截图资源永久存在,可被反复使用,直到 JsvTextureStoreApi.deleteTexture(访问名) 进行清理
|
|
10214
|
+
*
|
|
10215
|
+
* @param {DivVueRef} captureDiv 要截图的div
|
|
10216
|
+
* @param {CapturedCallback} callback 完成截屏后的回调, 函数参数:
|
|
10217
|
+
* (textureAccessName: string, // 访问名
|
|
10218
|
+
* autoRecycleSet: boolean, // 通知是否为自动删除(和入参时一致)
|
|
10219
|
+
* width: number, // 截取div的宽
|
|
10220
|
+
* height: number) => void // 截取div的高
|
|
10221
|
+
* @param {boolean} autoRecycle 可选, 是否当无div/img引用时会自动释放
|
|
10222
|
+
* 为true的场景在callback收到资源名后, 需要使用完毕后调用 deleteTexture 手动释放
|
|
10223
|
+
* 在手动释放之前,可以赋给其他div/img来复用
|
|
10224
|
+
* @return {CapturedTexture} 用于cancel的句柄,当cancel时,会清理对div和Callback的引用
|
|
10225
|
+
*/
|
|
10226
|
+
capture2Texture: (captureDiv, callback, autoRecycle = true) => {
|
|
10227
|
+
let texture = new CapturedTexture(captureDiv, callback, autoRecycle);
|
|
10228
|
+
texture.commit();
|
|
10229
|
+
return texture;
|
|
10230
|
+
},
|
|
9930
10231
|
/**
|
|
9931
10232
|
* deleteTexture
|
|
9932
|
-
*
|
|
10233
|
+
* 删除访问名对应的texture资源
|
|
9933
10234
|
*
|
|
9934
|
-
* @param {String}
|
|
10235
|
+
* @param {String} accessName 此Texture的访问名,访问名来自: CanvasTexture.commit 或 capture2Texture 的回调
|
|
9935
10236
|
*/
|
|
9936
|
-
deleteTexture: (
|
|
9937
|
-
let textureRef = sStore.getFromStore(
|
|
10237
|
+
deleteTexture: (accessName) => {
|
|
10238
|
+
let textureRef = sStore.getFromStore(accessName);
|
|
9938
10239
|
if (textureRef) {
|
|
9939
10240
|
textureRef.recycle();
|
|
9940
10241
|
}
|
|
@@ -10013,13 +10314,13 @@ class ActorControlBase {
|
|
|
10013
10314
|
}
|
|
10014
10315
|
}
|
|
10015
10316
|
startFpsTesting() {
|
|
10016
|
-
Forge$
|
|
10317
|
+
Forge$2.sRenderBridge.SetStepFpsSwitch(true);
|
|
10017
10318
|
}
|
|
10018
10319
|
stopFpsTesting() {
|
|
10019
|
-
Forge$
|
|
10320
|
+
Forge$2.sRenderBridge.SetStepFpsSwitch(false);
|
|
10020
10321
|
}
|
|
10021
10322
|
altStraightSpeedInner(newSpeedPerSecond, time) {
|
|
10022
|
-
Forge$
|
|
10323
|
+
Forge$2.AnimFireCommand.AltSpeed(this._SpriteView, newSpeedPerSecond, time);
|
|
10023
10324
|
}
|
|
10024
10325
|
_WrapBuildAnimation(repeat_start_array, current_array, tos_array, start_params) {
|
|
10025
10326
|
console.warn("Should Override", repeat_start_array, current_array, tos_array, start_params);
|
|
@@ -10065,7 +10366,7 @@ class ActorControlBase {
|
|
|
10065
10366
|
const anim = this._WrapBuildAnimation(froms, tos, start_params);
|
|
10066
10367
|
const memo_tos = [...tos];
|
|
10067
10368
|
const that = this;
|
|
10068
|
-
const listener = new Forge$
|
|
10369
|
+
const listener = new Forge$2.AnimationListener().OnFinalProgress(
|
|
10069
10370
|
(progress) => {
|
|
10070
10371
|
that._OnPaused(
|
|
10071
10372
|
froms,
|
|
@@ -10088,7 +10389,7 @@ class ActorControlBase {
|
|
|
10088
10389
|
}
|
|
10089
10390
|
this._WrapAddExtraListener(listener, start_params);
|
|
10090
10391
|
anim.AddAnimationListener(listener);
|
|
10091
|
-
anim.Enable(Forge$
|
|
10392
|
+
anim.Enable(Forge$2.AnimationEnable.KeepTransform);
|
|
10092
10393
|
this._SpriteView.StartAnimation(anim);
|
|
10093
10394
|
return true;
|
|
10094
10395
|
}
|
|
@@ -10344,7 +10645,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10344
10645
|
return start_params;
|
|
10345
10646
|
}
|
|
10346
10647
|
_BuildAccelAnimation(current_array, tos_array, start_params) {
|
|
10347
|
-
const anim = new Forge$
|
|
10648
|
+
const anim = new Forge$2.ThrowAnimation(
|
|
10348
10649
|
current_array[0],
|
|
10349
10650
|
current_array[1],
|
|
10350
10651
|
start_params.xOrY,
|
|
@@ -10372,7 +10673,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10372
10673
|
console.error(`Error: current=${from_pos} out of repeat range[${repeat_set.start}-${to_pos}]`);
|
|
10373
10674
|
return null;
|
|
10374
10675
|
}
|
|
10375
|
-
anim = new Forge$
|
|
10676
|
+
anim = new Forge$2.TranslateFrameAnimation(
|
|
10376
10677
|
repeat_set.start,
|
|
10377
10678
|
to_pos,
|
|
10378
10679
|
start_params.speed,
|
|
@@ -10383,7 +10684,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10383
10684
|
anim.SetStartPos(start_percent);
|
|
10384
10685
|
anim.EnableInfinite();
|
|
10385
10686
|
} else {
|
|
10386
|
-
anim = new Forge$
|
|
10687
|
+
anim = new Forge$2.TranslateFrameAnimation(
|
|
10387
10688
|
from_pos,
|
|
10388
10689
|
to_pos,
|
|
10389
10690
|
start_params.speed,
|
|
@@ -10395,7 +10696,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10395
10696
|
return anim;
|
|
10396
10697
|
}
|
|
10397
10698
|
_BuildJumpAnimation(current_array, tos_array) {
|
|
10398
|
-
const anim = new Forge$
|
|
10699
|
+
const anim = new Forge$2.TranslateAnimation(
|
|
10399
10700
|
tos_array[0],
|
|
10400
10701
|
tos_array[0],
|
|
10401
10702
|
tos_array[1],
|
|
@@ -10539,7 +10840,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10539
10840
|
|
|
10540
10841
|
|
|
10541
10842
|
*/
|
|
10542
|
-
const _sfc_main$
|
|
10843
|
+
const _sfc_main$A = {
|
|
10543
10844
|
__name: "JsvActorMove",
|
|
10544
10845
|
props: {
|
|
10545
10846
|
control: {
|
|
@@ -10583,18 +10884,43 @@ const _sfc_main$z = {
|
|
|
10583
10884
|
|
|
10584
10885
|
<!--
|
|
10585
10886
|
* 【模块 export 内容】
|
|
10586
|
-
* JsvFreeMoveActor
|
|
10587
|
-
*
|
|
10588
|
-
*
|
|
10887
|
+
* JsvFreeMoveActor/JsvFreeMoveDiv:
|
|
10888
|
+
* 帧动画控制组件,通过control
|
|
10889
|
+
* .action() 单一运动指令,新指令发生时会冲掉旧指令
|
|
10890
|
+
* .condition() 条件设置,有时间维度,X/Y维度
|
|
10891
|
+
* .state() 状态调整指令
|
|
10589
10892
|
*
|
|
10893
|
+
* props说明:
|
|
10894
|
+
* class: String, 等同于div的class设置(目前未实装,后续支持...)
|
|
10895
|
+
* style: Object, 等同于div的style设置
|
|
10896
|
+
* 特别注意: 在sizeMode模式下,非hidden,控制的是background/image的展示区域,
|
|
10897
|
+
* overflow:hidden时,控制的是剪切区域,展示区域保持最初的width/height
|
|
10898
|
+
* sizeMode: Boolean, 从控制div左上角坐标的模式改为改为通过div矩形宽高
|
|
10899
|
+
* (指令控制右下角坐标,实现对[0,0]->[右下角x,y]的矩形的宽高调整,另外,不支持负坐标)
|
|
10900
|
+
* expose说明:
|
|
10901
|
+
* control: Object 控制器句柄,具体参考 ActorControl
|
|
10590
10902
|
-->
|
|
10591
10903
|
|
|
10592
10904
|
|
|
10593
10905
|
|
|
10594
10906
|
*/
|
|
10595
|
-
const _sfc_main$
|
|
10907
|
+
const _sfc_main$z = {
|
|
10596
10908
|
__name: "FreeMoveActor",
|
|
10597
10909
|
props: {
|
|
10910
|
+
// div的style设置,
|
|
10911
|
+
// 其中top, left会作用于父节点,其余内容作用于子节点
|
|
10912
|
+
// width和height在size模式下为初始尺寸
|
|
10913
|
+
// 例如backgroundColor/backgroundImage/overflowHidden
|
|
10914
|
+
style: {
|
|
10915
|
+
type: Object,
|
|
10916
|
+
default: {}
|
|
10917
|
+
},
|
|
10918
|
+
// 动画转而控制width/height,而不是x,y
|
|
10919
|
+
sizeMode: {
|
|
10920
|
+
default: false,
|
|
10921
|
+
type: Boolean
|
|
10922
|
+
},
|
|
10923
|
+
// Deprecated
|
|
10598
10924
|
// 设置给父节点,动画节点必须top/left为0, 以保证PC端模拟通过style直接获取当前位置信息的逻辑能通过
|
|
10599
10925
|
top: {
|
|
10600
10926
|
default: 0,
|
|
@@ -10604,7 +10930,9 @@ const _sfc_main$y = {
|
|
|
10604
10930
|
default: 0,
|
|
10605
10931
|
type: Number
|
|
10606
10932
|
},
|
|
10607
|
-
//
|
|
10933
|
+
// Deprecated
|
|
10934
|
+
// 设置给实际的动画节点, 在size模式下为初始尺寸
|
|
10935
|
+
// 可能会被style.width, style.height替代
|
|
10608
10936
|
width: {
|
|
10609
10937
|
default: 0,
|
|
10610
10938
|
type: Number
|
|
@@ -10618,8 +10946,11 @@ const _sfc_main$y = {
|
|
|
10618
10946
|
const props = __props;
|
|
10619
10947
|
let mainDivRef = shallowRef(null);
|
|
10620
10948
|
let controller = new ActorControl();
|
|
10949
|
+
if (props.sizeMode) {
|
|
10950
|
+
controller.asSizeMode();
|
|
10951
|
+
}
|
|
10621
10952
|
onMounted(() => {
|
|
10622
|
-
controller.bindForgeView(mainDivRef.value.jsvGetProxyView());
|
|
10953
|
+
controller.bindForgeView(mainDivRef.value.jsvGetProxyView(true));
|
|
10623
10954
|
});
|
|
10624
10955
|
expose({
|
|
10625
10956
|
control: controller
|
|
@@ -10627,18 +10958,19 @@ const _sfc_main$y = {
|
|
|
10627
10958
|
return (_ctx, _cache) => {
|
|
10628
10959
|
return openBlock(), createElementBlock("div", {
|
|
10629
10960
|
style: normalizeStyle({
|
|
10630
|
-
top: props.top,
|
|
10631
|
-
left: props.left
|
|
10961
|
+
top: props.style.top ? props.style.top : props.top,
|
|
10962
|
+
left: props.style.left ? props.style.left : props.left
|
|
10632
10963
|
})
|
|
10633
10964
|
}, [
|
|
10634
10965
|
createElementVNode("div", {
|
|
10635
10966
|
ref_key: "mainDivRef",
|
|
10636
10967
|
ref: mainDivRef,
|
|
10637
10968
|
style: normalizeStyle({
|
|
10638
|
-
top: 0,
|
|
10639
|
-
left: 0,
|
|
10640
10969
|
width: props.width,
|
|
10641
|
-
height: props.height
|
|
10970
|
+
height: props.height,
|
|
10971
|
+
...props.style,
|
|
10972
|
+
top: 0,
|
|
10973
|
+
left: 0
|
|
10642
10974
|
})
|
|
10643
10975
|
}, [
|
|
10644
10976
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -10682,7 +11014,7 @@ const KeepFlags = {
|
|
|
10682
11014
|
|
|
10683
11015
|
|
|
10684
11016
|
*/
|
|
10685
|
-
const _sfc_main$
|
|
11017
|
+
const _sfc_main$y = {
|
|
10686
11018
|
__name: "JsvEnvBlocker",
|
|
10687
11019
|
props: {
|
|
10688
11020
|
// (支持reactive)位置信息
|
|
@@ -10749,7 +11081,7 @@ const _sfc_main$x = {
|
|
|
10749
11081
|
});
|
|
10750
11082
|
onMounted(() => {
|
|
10751
11083
|
console.log("JsvEnvBlocker: on mounted");
|
|
10752
|
-
sensorRef = new Forge$
|
|
11084
|
+
sensorRef = new Forge$2.EnvBlockerSensor(
|
|
10753
11085
|
toRaw(viewRef.value).jsvGetProxyView()
|
|
10754
11086
|
);
|
|
10755
11087
|
viewMounted.status = true;
|
|
@@ -10789,7 +11121,8 @@ let FreeMoveDef = {
|
|
|
10789
11121
|
KeepFlags
|
|
10790
11122
|
};
|
|
10791
11123
|
let FreeMoveFunc = {
|
|
10792
|
-
newNexus
|
|
11124
|
+
newNexus,
|
|
11125
|
+
ActControlDebug: ActorControl
|
|
10793
11126
|
};
|
|
10794
11127
|
|
|
10795
11128
|
//
|
|
@@ -10832,7 +11165,7 @@ let FreeMoveFunc = {
|
|
|
10832
11165
|
|
|
10833
11166
|
|
|
10834
11167
|
*/
|
|
10835
|
-
const _sfc_main$
|
|
11168
|
+
const _sfc_main$x = {
|
|
10836
11169
|
__name: "JsvFlexDiv",
|
|
10837
11170
|
props: {
|
|
10838
11171
|
style: Object,
|
|
@@ -10939,7 +11272,7 @@ const _sfc_main$w = {
|
|
|
10939
11272
|
|
|
10940
11273
|
|
|
10941
11274
|
*/
|
|
10942
|
-
const _sfc_main$
|
|
11275
|
+
const _sfc_main$w = {
|
|
10943
11276
|
props: {
|
|
10944
11277
|
src: String,
|
|
10945
11278
|
style: Object,
|
|
@@ -11031,7 +11364,7 @@ const _sfc_main$v = {
|
|
|
11031
11364
|
}
|
|
11032
11365
|
}
|
|
11033
11366
|
};
|
|
11034
|
-
function _sfc_render$
|
|
11367
|
+
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11035
11368
|
return openBlock(), createElementBlock("img", {
|
|
11036
11369
|
"data-jsv-disable-apic-autoplay": "",
|
|
11037
11370
|
alt: "",
|
|
@@ -11040,7 +11373,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11040
11373
|
style: normalizeStyle($props.style)
|
|
11041
11374
|
}, null, 12, ["src"]);
|
|
11042
11375
|
}
|
|
11043
|
-
const JsvApic = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11376
|
+
const JsvApic = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$a]]);
|
|
11044
11377
|
|
|
11045
11378
|
//
|
|
11046
11379
|
// utils/JsViewVueWidget/JsvApic/JsvApic/index.js;
|
|
@@ -11091,7 +11424,7 @@ const _JsvApic$1 = _JsvApic;
|
|
|
11091
11424
|
|
|
11092
11425
|
|
|
11093
11426
|
*/
|
|
11094
|
-
const _sfc_main$
|
|
11427
|
+
const _sfc_main$v = {
|
|
11095
11428
|
props: {
|
|
11096
11429
|
src: String,
|
|
11097
11430
|
style: Object,
|
|
@@ -11180,7 +11513,7 @@ const _sfc_main$u = {
|
|
|
11180
11513
|
}
|
|
11181
11514
|
}
|
|
11182
11515
|
};
|
|
11183
|
-
function _sfc_render$
|
|
11516
|
+
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11184
11517
|
return openBlock(), createElementBlock("img", {
|
|
11185
11518
|
"data-jsv-disable-apic-autoplay": "",
|
|
11186
11519
|
alt: "",
|
|
@@ -11189,7 +11522,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11189
11522
|
style: normalizeStyle($props.style)
|
|
11190
11523
|
}, null, 12, ["src"]);
|
|
11191
11524
|
}
|
|
11192
|
-
const JsvApic2 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11525
|
+
const JsvApic2 = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$9]]);
|
|
11193
11526
|
|
|
11194
11527
|
//
|
|
11195
11528
|
// utils/JsViewVueWidget/JsvApic/JsvApic2/index.js;
|
|
@@ -11216,7 +11549,7 @@ const _JsvApic2$1 = _JsvApic2;
|
|
|
11216
11549
|
|
|
11217
11550
|
|
|
11218
11551
|
*/
|
|
11219
|
-
const _sfc_main$
|
|
11552
|
+
const _sfc_main$u = {
|
|
11220
11553
|
props: {
|
|
11221
11554
|
left: {
|
|
11222
11555
|
type: Number,
|
|
@@ -11258,7 +11591,7 @@ const _sfc_main$t = {
|
|
|
11258
11591
|
this._cleanInterval();
|
|
11259
11592
|
}
|
|
11260
11593
|
};
|
|
11261
|
-
function _sfc_render$
|
|
11594
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11262
11595
|
return openBlock(), createElementBlock("div", {
|
|
11263
11596
|
style: normalizeStyle({
|
|
11264
11597
|
left: $props.left,
|
|
@@ -11270,7 +11603,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11270
11603
|
})
|
|
11271
11604
|
}, null, 4);
|
|
11272
11605
|
}
|
|
11273
|
-
const CursorVue = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11606
|
+
const CursorVue = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$8]]);
|
|
11274
11607
|
|
|
11275
11608
|
//
|
|
11276
11609
|
// utils/JsViewVueWidget/JsvInput/JsvInput.vue;
|
|
@@ -11285,9 +11618,9 @@ const CursorVue = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_rend
|
|
|
11285
11618
|
|
|
11286
11619
|
*/
|
|
11287
11620
|
const InputType = {
|
|
11288
|
-
TEXT: Forge$
|
|
11289
|
-
NUMBER: Forge$
|
|
11290
|
-
PASSWORD: Forge$
|
|
11621
|
+
TEXT: Forge$2.TextInputType.TEXT,
|
|
11622
|
+
NUMBER: Forge$2.TextInputType.NUMBER,
|
|
11623
|
+
PASSWORD: Forge$2.TextInputType.PASSWORD
|
|
11291
11624
|
};
|
|
11292
11625
|
const ifDigital = (char) => "0".charCodeAt() <= char.charCodeAt() && char.charCodeAt() <= "9".charCodeAt();
|
|
11293
11626
|
const ifDirectionKeyCode = (code) => code >= 37 && code <= 40;
|
|
@@ -11298,7 +11631,7 @@ const edgeMap = {
|
|
|
11298
11631
|
40: EdgeDirection.bottom
|
|
11299
11632
|
};
|
|
11300
11633
|
const MAX_WIDTH = 1920;
|
|
11301
|
-
const _sfc_main$
|
|
11634
|
+
const _sfc_main$t = {
|
|
11302
11635
|
components: {
|
|
11303
11636
|
CursorVue
|
|
11304
11637
|
},
|
|
@@ -11473,7 +11806,7 @@ const _sfc_main$s = {
|
|
|
11473
11806
|
const alignment = this.fontStyle.textAlign;
|
|
11474
11807
|
const italic = this.fontStyle.fontStyle === "italic";
|
|
11475
11808
|
const bold = this.fontStyle.fontWeight === "bold";
|
|
11476
|
-
return Forge$
|
|
11809
|
+
return Forge$2.sTextUtils.StringWithFont(
|
|
11477
11810
|
str,
|
|
11478
11811
|
size,
|
|
11479
11812
|
font,
|
|
@@ -11485,7 +11818,7 @@ const _sfc_main$s = {
|
|
|
11485
11818
|
);
|
|
11486
11819
|
},
|
|
11487
11820
|
_getFullStringLength(str) {
|
|
11488
|
-
return Forge$
|
|
11821
|
+
return Forge$2.sTextUtils.GetTextWidth(this._getStringWithFont(str));
|
|
11489
11822
|
},
|
|
11490
11823
|
add(string) {
|
|
11491
11824
|
if (this.type === InputType.NUMBER && !ifDigital(string)) {
|
|
@@ -11522,9 +11855,9 @@ const _sfc_main$s = {
|
|
|
11522
11855
|
const target_str = this._GetRealText(full_str);
|
|
11523
11856
|
const font_params = this._getStringWithFont(target_str);
|
|
11524
11857
|
const max_width = MAX_WIDTH;
|
|
11525
|
-
const max_rect = new Forge$
|
|
11526
|
-
const text_attr = Forge$
|
|
11527
|
-
const cur_pos = Forge$
|
|
11858
|
+
const max_rect = new Forge$2.RectArea(0, 0, max_width, this.height);
|
|
11859
|
+
const text_attr = Forge$2.sTextUtils.TextAttr("none", "none");
|
|
11860
|
+
const cur_pos = Forge$2.sTextUtils.GetCursorPosition(
|
|
11528
11861
|
target_str,
|
|
11529
11862
|
max_rect,
|
|
11530
11863
|
font_params,
|
|
@@ -11805,7 +12138,7 @@ const _sfc_main$s = {
|
|
|
11805
12138
|
},
|
|
11806
12139
|
_GetRealText(src_str) {
|
|
11807
12140
|
let value = src_str;
|
|
11808
|
-
if (this.type === Forge$
|
|
12141
|
+
if (this.type === Forge$2.TextInputType.PASSWORD) {
|
|
11809
12142
|
value = value.replace(/\w/g, "*");
|
|
11810
12143
|
}
|
|
11811
12144
|
return value;
|
|
@@ -11815,11 +12148,11 @@ const _sfc_main$s = {
|
|
|
11815
12148
|
}
|
|
11816
12149
|
},
|
|
11817
12150
|
created() {
|
|
11818
|
-
this.editControlView = new Forge$
|
|
12151
|
+
this.editControlView = new Forge$2.EditControlView();
|
|
11819
12152
|
this.editControlView.OnTextChanged = this._onTextChanged;
|
|
11820
12153
|
this.editControlView.OnStatusChanged = this._onStatusChanged;
|
|
11821
|
-
this.editControlViewId = Forge$
|
|
11822
|
-
new Forge$
|
|
12154
|
+
this.editControlViewId = Forge$2.sViewStore.add(
|
|
12155
|
+
new Forge$2.ViewInfo(this.editControlView)
|
|
11823
12156
|
);
|
|
11824
12157
|
const cur_position = this._calculateCursorPosition(
|
|
11825
12158
|
this.value,
|
|
@@ -11836,13 +12169,13 @@ const _sfc_main$s = {
|
|
|
11836
12169
|
},
|
|
11837
12170
|
beforeUnmount() {
|
|
11838
12171
|
if (this.editControlViewId != -1) {
|
|
11839
|
-
Forge$
|
|
12172
|
+
Forge$2.sViewStore.remove(this.editControlViewId);
|
|
11840
12173
|
this.editControlViewId = -1;
|
|
11841
12174
|
}
|
|
11842
12175
|
this.clearCursorPauseTimer();
|
|
11843
12176
|
}
|
|
11844
12177
|
};
|
|
11845
|
-
function _sfc_render$
|
|
12178
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11846
12179
|
const _component_cursor_vue = resolveComponent("cursor-vue");
|
|
11847
12180
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
11848
12181
|
return openBlock(), createBlock(_component_jsv_focus_block, {
|
|
@@ -11901,7 +12234,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11901
12234
|
_: 1
|
|
11902
12235
|
}, 8, ["name", "onAction", "style"]);
|
|
11903
12236
|
}
|
|
11904
|
-
const JsvInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12237
|
+
const JsvInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$7]]);
|
|
11905
12238
|
|
|
11906
12239
|
//
|
|
11907
12240
|
// utils/JsViewVueWidget/JsvInput/index.js;
|
|
@@ -11972,7 +12305,7 @@ const buildDownloadInfo$1 = (url, net_setting = null, get_image_size) => {
|
|
|
11972
12305
|
// 用于格式校验
|
|
11973
12306
|
};
|
|
11974
12307
|
};
|
|
11975
|
-
const _sfc_main$
|
|
12308
|
+
const _sfc_main$s = {
|
|
11976
12309
|
__name: "JsvPreload",
|
|
11977
12310
|
props: {
|
|
11978
12311
|
preloadList: Object,
|
|
@@ -12006,7 +12339,7 @@ const _sfc_main$r = {
|
|
|
12006
12339
|
view_info.textureRef?.UnregisterLoadImageCallback(
|
|
12007
12340
|
view_info.callToken
|
|
12008
12341
|
);
|
|
12009
|
-
Forge$
|
|
12342
|
+
Forge$2.sViewStore.remove(id);
|
|
12010
12343
|
}
|
|
12011
12344
|
}
|
|
12012
12345
|
}
|
|
@@ -12024,7 +12357,7 @@ const _sfc_main$r = {
|
|
|
12024
12357
|
view_info.textureRef?.UnregisterLoadImageCallback(
|
|
12025
12358
|
view_info.callToken
|
|
12026
12359
|
);
|
|
12027
|
-
Forge$
|
|
12360
|
+
Forge$2.sViewStore.remove(id);
|
|
12028
12361
|
}
|
|
12029
12362
|
}
|
|
12030
12363
|
}
|
|
@@ -12109,10 +12442,10 @@ const _sfc_main$r = {
|
|
|
12109
12442
|
_checkPreload();
|
|
12110
12443
|
});
|
|
12111
12444
|
texture.EnableBackgroundLoad();
|
|
12112
|
-
const texture_setting = new Forge$
|
|
12113
|
-
const preload_view = new Forge$
|
|
12445
|
+
const texture_setting = new Forge$2.ExternalTextureSetting(texture);
|
|
12446
|
+
const preload_view = new Forge$2.PreloadView(texture_setting);
|
|
12114
12447
|
return {
|
|
12115
|
-
viewId: Forge$
|
|
12448
|
+
viewId: Forge$2.sViewStore.add(new Forge$2.ViewInfo(preload_view)),
|
|
12116
12449
|
textureRef: texture,
|
|
12117
12450
|
callToken: callback_token
|
|
12118
12451
|
};
|
|
@@ -12179,10 +12512,10 @@ const _sfc_main$r = {
|
|
|
12179
12512
|
}
|
|
12180
12513
|
);
|
|
12181
12514
|
texture.EnableBackgroundLoad();
|
|
12182
|
-
const texture_setting = new Forge$
|
|
12183
|
-
const preload_view = new Forge$
|
|
12515
|
+
const texture_setting = new Forge$2.TextureSetting(texture);
|
|
12516
|
+
const preload_view = new Forge$2.PreloadView(texture_setting);
|
|
12184
12517
|
return {
|
|
12185
|
-
viewId: Forge$
|
|
12518
|
+
viewId: Forge$2.sViewStore.add(new Forge$2.ViewInfo(preload_view)),
|
|
12186
12519
|
textureRef: texture,
|
|
12187
12520
|
callToken: callback_token
|
|
12188
12521
|
};
|
|
@@ -12253,7 +12586,7 @@ const _sfc_main$r = {
|
|
|
12253
12586
|
// 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
12254
12587
|
let _JsvPreload;
|
|
12255
12588
|
if (window.JsView) {
|
|
12256
|
-
_JsvPreload = _sfc_main$
|
|
12589
|
+
_JsvPreload = _sfc_main$s;
|
|
12257
12590
|
} else {
|
|
12258
12591
|
const BrowserPreload = await import('./browser/BrowserPreload.vue.mjs');
|
|
12259
12592
|
_JsvPreload = BrowserPreload.default;
|
|
@@ -12287,7 +12620,7 @@ const JsvPreload = _JsvPreload;
|
|
|
12287
12620
|
|
|
12288
12621
|
|
|
12289
12622
|
*/
|
|
12290
|
-
const _sfc_main$
|
|
12623
|
+
const _sfc_main$r = {
|
|
12291
12624
|
props: {
|
|
12292
12625
|
value: String,
|
|
12293
12626
|
size: Number,
|
|
@@ -12348,11 +12681,11 @@ const _sfc_main$q = {
|
|
|
12348
12681
|
this.size,
|
|
12349
12682
|
this.size,
|
|
12350
12683
|
instantLoad,
|
|
12351
|
-
Forge$
|
|
12684
|
+
Forge$2.QRCodeLevel[this.level],
|
|
12352
12685
|
this.bgColor,
|
|
12353
12686
|
this.fgColor
|
|
12354
12687
|
);
|
|
12355
|
-
view = new Forge$
|
|
12688
|
+
view = new Forge$2.LayoutView(new Forge$2.TextureSetting(qrcode_texture));
|
|
12356
12689
|
const calculatedImageSettings = this.getImageSettings();
|
|
12357
12690
|
if (this.imageSettings && calculatedImageSettings) {
|
|
12358
12691
|
let url = this.imageSettings.src;
|
|
@@ -12360,12 +12693,12 @@ const _sfc_main$q = {
|
|
|
12360
12693
|
url = new window.JsView.Dom.UrlRef(this.imageSettings.src).href;
|
|
12361
12694
|
}
|
|
12362
12695
|
const img_texture = texture_manager.GetImage(url);
|
|
12363
|
-
const img_view = new Forge$
|
|
12364
|
-
new Forge$
|
|
12696
|
+
const img_view = new Forge$2.LayoutView(
|
|
12697
|
+
new Forge$2.TextureSetting(img_texture)
|
|
12365
12698
|
);
|
|
12366
12699
|
view.AddView(
|
|
12367
12700
|
img_view,
|
|
12368
|
-
new Forge$
|
|
12701
|
+
new Forge$2.LayoutParams({
|
|
12369
12702
|
x: calculatedImageSettings.x,
|
|
12370
12703
|
y: calculatedImageSettings.y,
|
|
12371
12704
|
width: calculatedImageSettings.w,
|
|
@@ -12374,7 +12707,7 @@ const _sfc_main$q = {
|
|
|
12374
12707
|
);
|
|
12375
12708
|
console.log("view = " + view);
|
|
12376
12709
|
}
|
|
12377
|
-
lp_params = new Forge$
|
|
12710
|
+
lp_params = new Forge$2.LayoutParams({
|
|
12378
12711
|
x: 0,
|
|
12379
12712
|
y: 0,
|
|
12380
12713
|
width: this.size,
|
|
@@ -12394,9 +12727,9 @@ const _sfc_main$q = {
|
|
|
12394
12727
|
imageSettings: this.imageSettings
|
|
12395
12728
|
};
|
|
12396
12729
|
if (this.jsvBaseView === null) {
|
|
12397
|
-
this.jsvBaseView = new Forge$
|
|
12398
|
-
this.innerViewId = Forge$
|
|
12399
|
-
new Forge$
|
|
12730
|
+
this.jsvBaseView = new Forge$2.LayoutView();
|
|
12731
|
+
this.innerViewId = Forge$2.sViewStore.add(
|
|
12732
|
+
new Forge$2.ViewInfo(this.jsvBaseView)
|
|
12400
12733
|
);
|
|
12401
12734
|
}
|
|
12402
12735
|
if (this.oldProps !== propsData) {
|
|
@@ -12413,17 +12746,17 @@ const _sfc_main$q = {
|
|
|
12413
12746
|
},
|
|
12414
12747
|
beforeUnmount() {
|
|
12415
12748
|
if (this.innerViewId !== -1) {
|
|
12416
|
-
Forge$
|
|
12749
|
+
Forge$2.sViewStore.remove(this.innerViewId);
|
|
12417
12750
|
this.innerViewId = -1;
|
|
12418
12751
|
this.jsvBaseView = null;
|
|
12419
12752
|
console.log("success remove innerview");
|
|
12420
12753
|
}
|
|
12421
12754
|
}
|
|
12422
12755
|
};
|
|
12423
|
-
function _sfc_render$
|
|
12756
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12424
12757
|
return openBlock(), createElementBlock("div", { "data-jsv-vw-innerview": $data.innerViewId }, null, 8, ["data-jsv-vw-innerview"]);
|
|
12425
12758
|
}
|
|
12426
|
-
const JsvQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12759
|
+
const JsvQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$6]]);
|
|
12427
12760
|
|
|
12428
12761
|
//
|
|
12429
12762
|
// utils/JsViewVueWidget/JsvQrcode/index.js;
|
|
@@ -12487,7 +12820,7 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
12487
12820
|
const texture_manager = handles.TextureManager;
|
|
12488
12821
|
let texture_setting;
|
|
12489
12822
|
if (pointRes.trim().startsWith("#") || pointRes.trim().startsWith("rgba")) {
|
|
12490
|
-
texture_setting = new Forge$
|
|
12823
|
+
texture_setting = new Forge$2.TextureSetting(
|
|
12491
12824
|
texture_manager.GetColorTexture(pointRes)
|
|
12492
12825
|
);
|
|
12493
12826
|
} else {
|
|
@@ -12498,11 +12831,11 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
12498
12831
|
} else if (window.JsView.Dom.UrlRef) {
|
|
12499
12832
|
image_url = new window.JsView.Dom.UrlRef(pointRes).href;
|
|
12500
12833
|
}
|
|
12501
|
-
texture_setting = new Forge$
|
|
12834
|
+
texture_setting = new Forge$2.ExternalTextureSetting(
|
|
12502
12835
|
texture_manager.GetImage2(image_url, false, null, "RGB_8888", null)
|
|
12503
12836
|
);
|
|
12504
12837
|
}
|
|
12505
|
-
const spray_view = new Forge$
|
|
12838
|
+
const spray_view = new Forge$2.SprayView(texture_setting);
|
|
12506
12839
|
const add_num_per_frame = sprayStyle.addNumSpeed ? sprayStyle.addNumSpeed : 1e-3;
|
|
12507
12840
|
const accelerate_x = typeof sprayStyle.accelerateX !== "undefined" ? sprayStyle.accelerateX : 0;
|
|
12508
12841
|
const accelerate_y = typeof sprayStyle.accelerateY !== "undefined" ? sprayStyle.accelerateY : -100;
|
|
@@ -12549,9 +12882,9 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
12549
12882
|
const view_height = sprayStyle.deltaHeight === 0 ? 1 : 2 * sprayStyle.deltaHeight;
|
|
12550
12883
|
sizeRef.width = view_width;
|
|
12551
12884
|
sizeRef.height = view_height;
|
|
12552
|
-
return Forge$
|
|
12885
|
+
return Forge$2.sViewStore.add(new Forge$2.ViewInfo(spray_view, null));
|
|
12553
12886
|
};
|
|
12554
|
-
const _sfc_main$
|
|
12887
|
+
const _sfc_main$q = {
|
|
12555
12888
|
props: {
|
|
12556
12889
|
pointRes: {
|
|
12557
12890
|
type: String,
|
|
@@ -12578,7 +12911,7 @@ const _sfc_main$p = {
|
|
|
12578
12911
|
methods: {
|
|
12579
12912
|
unloadView() {
|
|
12580
12913
|
if (this.viewId != -1) {
|
|
12581
|
-
Forge$
|
|
12914
|
+
Forge$2.sViewStore.remove(this.viewId);
|
|
12582
12915
|
this.viewId = -1;
|
|
12583
12916
|
}
|
|
12584
12917
|
}
|
|
@@ -12604,13 +12937,13 @@ const _sfc_main$p = {
|
|
|
12604
12937
|
this.unloadView();
|
|
12605
12938
|
}
|
|
12606
12939
|
};
|
|
12607
|
-
function _sfc_render$
|
|
12940
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12608
12941
|
return openBlock(), createElementBlock("div", {
|
|
12609
12942
|
style: normalizeStyle({ width: $data.size.width, height: $data.size.height }),
|
|
12610
12943
|
"data-jsv-vw-innerview": $data.viewId
|
|
12611
12944
|
}, null, 12, ["data-jsv-vw-innerview"]);
|
|
12612
12945
|
}
|
|
12613
|
-
const JsvSpray = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12946
|
+
const JsvSpray = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$5]]);
|
|
12614
12947
|
|
|
12615
12948
|
//
|
|
12616
12949
|
// utils/JsViewVueWidget/JsvSpray/index.js;
|
|
@@ -12866,7 +13199,7 @@ const JsvSpriteAnim_vue_vue_type_style_index_0_scoped_00add5ef_lang = "";
|
|
|
12866
13199
|
|
|
12867
13200
|
|
|
12868
13201
|
*/
|
|
12869
|
-
const _sfc_main$
|
|
13202
|
+
const _sfc_main$p = {
|
|
12870
13203
|
__name: "JsvSpriteAnim",
|
|
12871
13204
|
props: {
|
|
12872
13205
|
spriteInfo: Object,
|
|
@@ -13203,7 +13536,7 @@ const _sfc_main$o = {
|
|
|
13203
13536
|
};
|
|
13204
13537
|
const styleSheetsContent$1 = { "0": { "sprite-tag-00add5ef": "@keyframes sprite-tag-00add5ef {}" } };
|
|
13205
13538
|
window.JsvCode.Dom.DeclareStyleSheets(styleSheetsContent$1);
|
|
13206
|
-
const JsvSpriteAnim = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13539
|
+
const JsvSpriteAnim = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-00add5ef"]]);
|
|
13207
13540
|
|
|
13208
13541
|
//
|
|
13209
13542
|
// utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue;
|
|
@@ -13223,7 +13556,7 @@ const JsvSpriteAnim = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "d
|
|
|
13223
13556
|
|
|
13224
13557
|
|
|
13225
13558
|
*/
|
|
13226
|
-
const _sfc_main$
|
|
13559
|
+
const _sfc_main$o = {
|
|
13227
13560
|
__name: "JsvSpriteLoader",
|
|
13228
13561
|
props: {
|
|
13229
13562
|
imageUrl: String,
|
|
@@ -13429,7 +13762,7 @@ let JsvSpriteTools = {
|
|
|
13429
13762
|
|
|
13430
13763
|
|
|
13431
13764
|
*/
|
|
13432
|
-
const _sfc_main$
|
|
13765
|
+
const _sfc_main$n = {
|
|
13433
13766
|
__name: "JsvVisibleSensor",
|
|
13434
13767
|
props: {
|
|
13435
13768
|
// (支持reactive)可视区域设定
|
|
@@ -13504,7 +13837,7 @@ const _sfc_main$m = {
|
|
|
13504
13837
|
};
|
|
13505
13838
|
onMounted(() => {
|
|
13506
13839
|
console.log("JsvVisibleSensor: on mounted");
|
|
13507
|
-
sensorRef = new Forge$
|
|
13840
|
+
sensorRef = new Forge$2.VisibleSensor(
|
|
13508
13841
|
toRaw(viewRef.value).jsvGetProxyView(),
|
|
13509
13842
|
(old_h, new_h, old_v, new_v) => {
|
|
13510
13843
|
visibleChange(old_h, new_h, old_v, new_v);
|
|
@@ -13552,7 +13885,7 @@ const _sfc_main$m = {
|
|
|
13552
13885
|
|
|
13553
13886
|
var JsvVisibleSensor$1 = /*#__PURE__*/Object.freeze({
|
|
13554
13887
|
__proto__: null,
|
|
13555
|
-
default: _sfc_main$
|
|
13888
|
+
default: _sfc_main$n
|
|
13556
13889
|
});
|
|
13557
13890
|
|
|
13558
13891
|
//
|
|
@@ -13627,8 +13960,8 @@ const keyCode2EdgeDirection = (keyCode) => {
|
|
|
13627
13960
|
return null;
|
|
13628
13961
|
}
|
|
13629
13962
|
};
|
|
13630
|
-
const _sfc_main$
|
|
13631
|
-
components: { JsvActorMove: _sfc_main$
|
|
13963
|
+
const _sfc_main$m = {
|
|
13964
|
+
components: { JsvActorMove: _sfc_main$A, JsvVisibleSensor },
|
|
13632
13965
|
props: {
|
|
13633
13966
|
showIndicator: {
|
|
13634
13967
|
type: Boolean,
|
|
@@ -13943,7 +14276,7 @@ const _sfc_main$l = {
|
|
|
13943
14276
|
case "translate":
|
|
13944
14277
|
if (smooth) {
|
|
13945
14278
|
const speed = (this.vertical ? this.layoutInfo.height : this.layoutInfo.width) / this.animation.duration * 1e3;
|
|
13946
|
-
curViewAnimation = new Forge$
|
|
14279
|
+
curViewAnimation = new Forge$2.TranslateFrameAnimation(
|
|
13947
14280
|
this.vertical ? direction * this.layoutInfo.height : direction * this.layoutInfo.width,
|
|
13948
14281
|
0,
|
|
13949
14282
|
speed,
|
|
@@ -13951,7 +14284,7 @@ const _sfc_main$l = {
|
|
|
13951
14284
|
this.vertical ? 0 : direction * this.layoutInfo.width,
|
|
13952
14285
|
this.vertical ? direction * this.layoutInfo.height : 0
|
|
13953
14286
|
);
|
|
13954
|
-
preViewAnimation = new Forge$
|
|
14287
|
+
preViewAnimation = new Forge$2.TranslateFrameAnimation(
|
|
13955
14288
|
this.vertical ? direction * this.layoutInfo.height : direction * this.layoutInfo.width,
|
|
13956
14289
|
0,
|
|
13957
14290
|
speed,
|
|
@@ -13960,7 +14293,7 @@ const _sfc_main$l = {
|
|
|
13960
14293
|
this.vertical ? direction * this.layoutInfo.height : 0
|
|
13961
14294
|
);
|
|
13962
14295
|
} else {
|
|
13963
|
-
curViewAnimation = new Forge$
|
|
14296
|
+
curViewAnimation = new Forge$2.TranslateAnimation(
|
|
13964
14297
|
this.vertical ? 0 : direction * this.layoutInfo.width,
|
|
13965
14298
|
0,
|
|
13966
14299
|
this.vertical ? direction * this.layoutInfo.height : 0,
|
|
@@ -13968,7 +14301,7 @@ const _sfc_main$l = {
|
|
|
13968
14301
|
duration,
|
|
13969
14302
|
null
|
|
13970
14303
|
);
|
|
13971
|
-
preViewAnimation = new Forge$
|
|
14304
|
+
preViewAnimation = new Forge$2.TranslateAnimation(
|
|
13972
14305
|
this.vertical ? 0 : direction * this.layoutInfo.width,
|
|
13973
14306
|
0,
|
|
13974
14307
|
this.vertical ? direction * this.layoutInfo.height : 0,
|
|
@@ -13984,7 +14317,7 @@ const _sfc_main$l = {
|
|
|
13984
14317
|
break;
|
|
13985
14318
|
}
|
|
13986
14319
|
curViewAnimation.SetAnimationListener(
|
|
13987
|
-
new Forge$
|
|
14320
|
+
new Forge$2.AnimationListener(null, this._onAnimationEnd, null)
|
|
13988
14321
|
);
|
|
13989
14322
|
this.$refs.element?.[this.currentViewIndex]?.jsvGetProxyView(true).StartAnimation(curViewAnimation);
|
|
13990
14323
|
this.$refs.element?.[modToRange(this.currentViewIndex - direction, VIEW_NUM)]?.jsvGetProxyView(true).StartAnimation(preViewAnimation);
|
|
@@ -14015,7 +14348,7 @@ const _sfc_main$l = {
|
|
|
14015
14348
|
this.stopAutoplay();
|
|
14016
14349
|
}
|
|
14017
14350
|
};
|
|
14018
|
-
function _sfc_render$
|
|
14351
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14019
14352
|
const _component_jsv_visible_sensor = resolveComponent("jsv-visible-sensor");
|
|
14020
14353
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
14021
14354
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -14115,7 +14448,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14115
14448
|
}, 8, ["name", "style", "onAction"])
|
|
14116
14449
|
], 64);
|
|
14117
14450
|
}
|
|
14118
|
-
const JsvSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14451
|
+
const JsvSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$4]]);
|
|
14119
14452
|
|
|
14120
14453
|
//
|
|
14121
14454
|
// utils/JsViewVueWidget/JsvSwiper/index.js;
|
|
@@ -14148,7 +14481,7 @@ const JsvSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_rend
|
|
|
14148
14481
|
|
|
14149
14482
|
|
|
14150
14483
|
*/
|
|
14151
|
-
const _sfc_main$
|
|
14484
|
+
const _sfc_main$l = {
|
|
14152
14485
|
__name: "JsvSwiper",
|
|
14153
14486
|
props: {
|
|
14154
14487
|
dispNumber: { type: Number, require: true },
|
|
@@ -14594,7 +14927,7 @@ const TexAlignAnchor$1 = {
|
|
|
14594
14927
|
CENTER_BOTTOM: 8,
|
|
14595
14928
|
RIGHT_BOTTOM: 9
|
|
14596
14929
|
};
|
|
14597
|
-
const _sfc_main$
|
|
14930
|
+
const _sfc_main$k = {
|
|
14598
14931
|
props: {
|
|
14599
14932
|
src: String,
|
|
14600
14933
|
top: Number,
|
|
@@ -14650,8 +14983,8 @@ const _sfc_main$j = {
|
|
|
14650
14983
|
decorate_setting
|
|
14651
14984
|
);
|
|
14652
14985
|
} else {
|
|
14653
|
-
let texture_set = new Forge$
|
|
14654
|
-
return new Forge$
|
|
14986
|
+
let texture_set = new Forge$2.ExternalTextureSetting(view_texture);
|
|
14987
|
+
return new Forge$2.LayoutView(texture_set);
|
|
14655
14988
|
}
|
|
14656
14989
|
},
|
|
14657
14990
|
_readRadius(setting) {
|
|
@@ -14700,8 +15033,8 @@ const _sfc_main$j = {
|
|
|
14700
15033
|
},
|
|
14701
15034
|
_createNinePatchAlphaMixView(view_texture, decorate_setting) {
|
|
14702
15035
|
const textureManager = handles.TextureManager;
|
|
14703
|
-
let texture_set = new Forge$
|
|
14704
|
-
let nine_patch_view = new Forge$
|
|
15036
|
+
let texture_set = new Forge$2.ExternalTextureSetting(view_texture);
|
|
15037
|
+
let nine_patch_view = new Forge$2.NinePatchView(texture_set);
|
|
14705
15038
|
if (decorate_setting.url) {
|
|
14706
15039
|
let converted_url = urlCheckSet(decorate_setting.url);
|
|
14707
15040
|
let view_texture2 = textureManager.GetImage2(converted_url);
|
|
@@ -14725,17 +15058,17 @@ const _sfc_main$j = {
|
|
|
14725
15058
|
return nine_patch_view;
|
|
14726
15059
|
},
|
|
14727
15060
|
_createBorderRadius(view_texture, decorate_setting) {
|
|
14728
|
-
let texture_mask = new Forge$
|
|
15061
|
+
let texture_mask = new Forge$2.ViewRoundCornerMask(
|
|
14729
15062
|
numberCheckSet(decorate_setting.topLeft),
|
|
14730
15063
|
numberCheckSet(decorate_setting.topRight),
|
|
14731
15064
|
numberCheckSet(decorate_setting.bottomLeft),
|
|
14732
15065
|
numberCheckSet(decorate_setting.bottomRight)
|
|
14733
15066
|
);
|
|
14734
|
-
let texture_set = new Forge$
|
|
15067
|
+
let texture_set = new Forge$2.ExternalTextureSetting(
|
|
14735
15068
|
view_texture,
|
|
14736
15069
|
texture_mask
|
|
14737
15070
|
);
|
|
14738
|
-
return new Forge$
|
|
15071
|
+
return new Forge$2.LayoutView(texture_set);
|
|
14739
15072
|
},
|
|
14740
15073
|
_onAnimationEnd() {
|
|
14741
15074
|
this.onAnimationEnd?.();
|
|
@@ -14797,7 +15130,7 @@ const _sfc_main$j = {
|
|
|
14797
15130
|
}
|
|
14798
15131
|
this._updateTexCoord();
|
|
14799
15132
|
if (this.animation) {
|
|
14800
|
-
this.forgeAnimation = new Forge$
|
|
15133
|
+
this.forgeAnimation = new Forge$2.CssKeyframeAnimation(
|
|
14801
15134
|
"@keyframes texAnimDef" + this.animation,
|
|
14802
15135
|
this.duration,
|
|
14803
15136
|
null,
|
|
@@ -14805,20 +15138,21 @@ const _sfc_main$j = {
|
|
|
14805
15138
|
1
|
|
14806
15139
|
);
|
|
14807
15140
|
this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
|
|
15141
|
+
this.forgeAnimation.Enable(Forge$2.AnimationEnable.ReleaseAfterEndCallback);
|
|
14808
15142
|
this.forgeAnimation.SetAnimationListener(
|
|
14809
|
-
new Forge$
|
|
15143
|
+
new Forge$2.AnimationListener(null, this._onAnimationEnd, null)
|
|
14810
15144
|
);
|
|
14811
15145
|
} else {
|
|
14812
15146
|
this.forgeAnimation = null;
|
|
14813
15147
|
}
|
|
14814
|
-
this.innerViewId = Forge$
|
|
14815
|
-
new Forge$
|
|
15148
|
+
this.innerViewId = Forge$2.sViewStore.add(
|
|
15149
|
+
new Forge$2.ViewInfo(this.innerView)
|
|
14816
15150
|
);
|
|
14817
15151
|
}
|
|
14818
15152
|
},
|
|
14819
15153
|
beforeUnmount() {
|
|
14820
15154
|
if (this.innerViewId !== -1) {
|
|
14821
|
-
Forge$
|
|
15155
|
+
Forge$2.sViewStore.remove(this.innerViewId);
|
|
14822
15156
|
this.innerViewId = -1;
|
|
14823
15157
|
}
|
|
14824
15158
|
},
|
|
@@ -14830,7 +15164,7 @@ const _sfc_main$j = {
|
|
|
14830
15164
|
activated() {
|
|
14831
15165
|
if (this.innerView) {
|
|
14832
15166
|
if (this.animation && this.forgeAnimation == null) {
|
|
14833
|
-
this.forgeAnimation = new Forge$
|
|
15167
|
+
this.forgeAnimation = new Forge$2.CssKeyframeAnimation(
|
|
14834
15168
|
"@keyframes texAnimDef" + this.animation,
|
|
14835
15169
|
this.duration,
|
|
14836
15170
|
null,
|
|
@@ -14838,8 +15172,9 @@ const _sfc_main$j = {
|
|
|
14838
15172
|
1
|
|
14839
15173
|
);
|
|
14840
15174
|
this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
|
|
15175
|
+
this.forgeAnimation.Enable(Forge$2.AnimationEnable.ReleaseAfterEndCallback);
|
|
14841
15176
|
this.forgeAnimation.SetAnimationListener(
|
|
14842
|
-
new Forge$
|
|
15177
|
+
new Forge$2.AnimationListener(null, this._onAnimationEnd, null)
|
|
14843
15178
|
);
|
|
14844
15179
|
this.innerView.StartTextureAnimation(this.forgeAnimation);
|
|
14845
15180
|
} else {
|
|
@@ -14854,7 +15189,7 @@ const _sfc_main$j = {
|
|
|
14854
15189
|
this.forgeAnimation = null;
|
|
14855
15190
|
}
|
|
14856
15191
|
};
|
|
14857
|
-
function _sfc_render$
|
|
15192
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14858
15193
|
return openBlock(), createElementBlock("div", {
|
|
14859
15194
|
style: normalizeStyle({
|
|
14860
15195
|
top: $props.top,
|
|
@@ -14866,7 +15201,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14866
15201
|
"data-jsv-vw-innerview": $setup.innerViewId
|
|
14867
15202
|
}, null, 12, ["data-jsv-vw-innerview"]);
|
|
14868
15203
|
}
|
|
14869
|
-
const JsvTextureAnim = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15204
|
+
const JsvTextureAnim = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$3]]);
|
|
14870
15205
|
|
|
14871
15206
|
//
|
|
14872
15207
|
// utils/JsViewVueWidget/JsvTextureAnim/index.js;
|
|
@@ -14899,7 +15234,7 @@ const TexAlignAnchor = TexAlignAnchor$1;
|
|
|
14899
15234
|
|
|
14900
15235
|
|
|
14901
15236
|
*/
|
|
14902
|
-
const _sfc_main$
|
|
15237
|
+
const _sfc_main$j = {
|
|
14903
15238
|
__name: "JsvFilterView",
|
|
14904
15239
|
props: {
|
|
14905
15240
|
width: {
|
|
@@ -14923,8 +15258,8 @@ const _sfc_main$i = {
|
|
|
14923
15258
|
},
|
|
14924
15259
|
setup(__props) {
|
|
14925
15260
|
const props = __props;
|
|
14926
|
-
let filterView = new Forge$
|
|
14927
|
-
let viewId = Forge$
|
|
15261
|
+
let filterView = new Forge$2.FilterView();
|
|
15262
|
+
let viewId = Forge$2.sViewStore.add(new Forge$2.ViewInfo(filterView, null));
|
|
14928
15263
|
watchEffect(() => {
|
|
14929
15264
|
if (filterView) {
|
|
14930
15265
|
console.log(`filterType change to ${props.filterType}`);
|
|
@@ -14939,7 +15274,7 @@ const _sfc_main$i = {
|
|
|
14939
15274
|
});
|
|
14940
15275
|
onBeforeUnmount(() => {
|
|
14941
15276
|
if (viewId > 0) {
|
|
14942
|
-
Forge$
|
|
15277
|
+
Forge$2.sViewStore.remove(viewId);
|
|
14943
15278
|
viewId = -1;
|
|
14944
15279
|
}
|
|
14945
15280
|
});
|
|
@@ -15052,7 +15387,7 @@ class LineType extends UpdateType {
|
|
|
15052
15387
|
this.end = end;
|
|
15053
15388
|
}
|
|
15054
15389
|
}
|
|
15055
|
-
const _sfc_main$
|
|
15390
|
+
const _sfc_main$i = {
|
|
15056
15391
|
props: {
|
|
15057
15392
|
left: {
|
|
15058
15393
|
type: Number
|
|
@@ -15514,7 +15849,7 @@ const _sfc_main$h = {
|
|
|
15514
15849
|
}
|
|
15515
15850
|
}
|
|
15516
15851
|
};
|
|
15517
|
-
function _sfc_render$
|
|
15852
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15518
15853
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
15519
15854
|
return openBlock(), createBlock(_component_jsv_focus_block, {
|
|
15520
15855
|
ref: "focusBlock",
|
|
@@ -15552,101 +15887,252 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15552
15887
|
_: 3
|
|
15553
15888
|
}, 8, ["name", "onAction", "style"]);
|
|
15554
15889
|
}
|
|
15555
|
-
const JsvGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15890
|
+
const JsvGrid = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$2]]);
|
|
15556
15891
|
|
|
15557
15892
|
//
|
|
15558
|
-
// utils/JsViewVueWidget/
|
|
15893
|
+
// utils/JsViewVueWidget/JsvNinePatch.vue;
|
|
15559
15894
|
//
|
|
15560
15895
|
/* <!--
|
|
15561
|
-
*
|
|
15562
|
-
*
|
|
15563
|
-
*
|
|
15564
|
-
*
|
|
15565
|
-
*
|
|
15566
|
-
*
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
|
|
15575
|
-
|
|
15576
|
-
|
|
15577
|
-
|
|
15578
|
-
|
|
15579
|
-
|
|
15580
|
-
|
|
15581
|
-
|
|
15582
|
-
|
|
15583
|
-
|
|
15584
|
-
|
|
15585
|
-
|
|
15896
|
+
* 【模块 export 内容】
|
|
15897
|
+
* JsvNinePatch:Vue高阶组件,.9图展示控件,该控件的原图要求为正方形,延展后可为长方形
|
|
15898
|
+
* props说明:
|
|
15899
|
+
* style {Object} 同div的Style,通过width/height来控制.9图片延展后的显示尺寸,另外通过top/left控制坐标
|
|
15900
|
+
* imageUrl {String} (必填)显示图片的加载地址
|
|
15901
|
+
* imageWidth {int} (必填)原图信息: 原图的宽度(由于正方形,宽高相同)
|
|
15902
|
+
* contentWidth {int} (废弃)此值为了兼容,会赋值给centerWidth
|
|
15903
|
+
* centerWidth {int} (必填)原图信息: .9图的中心区域宽度(repeat区域)
|
|
15904
|
+
* imageDspWidth {int} 原图缩放后的显示宽度,计算方法:
|
|
15905
|
+
* 四角为90度圆弧时: imageDspWidth = 显示图形的圆弧半径 / 原图中圆弧的半径 * 原图宽度
|
|
15906
|
+
* 原图中圆弧半径 = (原图宽度 - borderOutset * 2) / 2
|
|
15907
|
+
* 四角为其他形状时,原图.9图的四角区域,缩放到要和显示图形重合后的宽度。
|
|
15908
|
+
* borderOutset {int} (必填)原图信息: 图片边缘到中心内容区域边缘的距离, 快速计算: (原图宽度 - 原图中放内容宽度) / 2
|
|
15909
|
+
* animTime {int} (必填)缩放动画的时长(单位秒)
|
|
15910
|
+
* waitForInit {boolean} (选填)尺寸为0时是否进行描画(例如: 首次显示不展示动画的场合,设置为true),默认值为true
|
|
15911
|
+
* onTransitionEnd { Function } (选填)transition动画结束的回调
|
|
15912
|
+
* imageBlendType {String} (选填) alpha合并模式,默认为普通合成,可设置"alphaOverride", 用于Video挖洞操作
|
|
15913
|
+
-->
|
|
15914
|
+
|
|
15915
|
+
|
|
15916
|
+
|
|
15917
|
+
|
|
15918
|
+
*/
|
|
15919
|
+
const _sfc_main$h = {
|
|
15920
|
+
__name: "JsvNinePatch",
|
|
15921
|
+
props: {
|
|
15922
|
+
style: {
|
|
15923
|
+
type: Object,
|
|
15924
|
+
default: () => {
|
|
15925
|
+
return {};
|
|
15926
|
+
}
|
|
15927
|
+
},
|
|
15928
|
+
top: { type: Number, default: 0 },
|
|
15929
|
+
left: { type: Number, default: 0 },
|
|
15930
|
+
waitForInit: { type: Boolean, default: true },
|
|
15931
|
+
imageUrl: { type: String, required: true },
|
|
15932
|
+
imageWidth: { type: Number, required: true },
|
|
15933
|
+
imageDspWidth: { type: Number, default: 0 },
|
|
15934
|
+
contentWidth: { type: Number, default: -1 },
|
|
15935
|
+
centerWidth: { type: Number, default: -1, required: true },
|
|
15936
|
+
borderOutset: { type: Number, required: true },
|
|
15937
|
+
animTime: { type: Number, default: 0 },
|
|
15938
|
+
onTransitionEnd: { type: Function },
|
|
15939
|
+
animation: { type: String },
|
|
15940
|
+
imageBlendType: { type: String, default: null }
|
|
15586
15941
|
},
|
|
15587
|
-
setup() {
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
|
|
15942
|
+
setup(__props) {
|
|
15943
|
+
const props = __props;
|
|
15944
|
+
const isReady = () => {
|
|
15945
|
+
if (!props.waitForInit) {
|
|
15946
|
+
return true;
|
|
15947
|
+
}
|
|
15948
|
+
return props.style && props.style.width !== 0 && props.style.height !== 0;
|
|
15592
15949
|
};
|
|
15593
|
-
|
|
15594
|
-
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
null,
|
|
15604
|
-
null,
|
|
15605
|
-
false
|
|
15606
|
-
);
|
|
15950
|
+
const getTransition = () => {
|
|
15951
|
+
let transition = "";
|
|
15952
|
+
if (props.animTime && props.animTime > 0) {
|
|
15953
|
+
transition = `left ${props.animTime}s, top ${props.animTime}s, width ${props.animTime}s, height ${props.animTime}s`;
|
|
15954
|
+
}
|
|
15955
|
+
return transition;
|
|
15956
|
+
};
|
|
15957
|
+
let centerWidth = props.contentWidth > 0 ? props.contentWidth : 1;
|
|
15958
|
+
if (props.centerWidth >= 0) {
|
|
15959
|
+
centerWidth = props.centerWidth > 0 ? props.centerWidth : 1;
|
|
15607
15960
|
}
|
|
15608
|
-
|
|
15609
|
-
|
|
15610
|
-
|
|
15961
|
+
const imageDspWidthInner = computed(
|
|
15962
|
+
() => props.imageDspWidth > 0 ? props.imageDspWidth : props.imageWidth
|
|
15963
|
+
);
|
|
15964
|
+
const sliceWidth = ref(
|
|
15965
|
+
Math.ceil(Math.max(0, (props.imageWidth - centerWidth) / 2))
|
|
15966
|
+
);
|
|
15967
|
+
const borderDspWidth = ref(
|
|
15968
|
+
Math.ceil(sliceWidth.value * imageDspWidthInner.value / props.imageWidth)
|
|
15969
|
+
);
|
|
15970
|
+
const convertedBorderOutset = ref(
|
|
15971
|
+
Math.ceil(props.borderOutset * imageDspWidthInner.value / props.imageWidth)
|
|
15611
15972
|
);
|
|
15612
|
-
|
|
15613
|
-
if (
|
|
15614
|
-
|
|
15973
|
+
watchEffect(() => {
|
|
15974
|
+
if (props.style?.width && props.style.width <= imageDspWidthInner.value || props.style?.height && props.style.height <= imageDspWidthInner.value) {
|
|
15975
|
+
console.warn(
|
|
15976
|
+
"JsvNinePatch: style size must be larger than imageDspWidth. style is",
|
|
15977
|
+
props.style,
|
|
15978
|
+
"imageDspWidth is",
|
|
15979
|
+
imageDspWidthInner.value
|
|
15980
|
+
);
|
|
15615
15981
|
}
|
|
15616
|
-
|
|
15982
|
+
});
|
|
15983
|
+
return (_ctx, _cache) => {
|
|
15984
|
+
return isReady() ? (openBlock(), createElementBlock("div", {
|
|
15985
|
+
key: 0,
|
|
15986
|
+
style: normalizeStyle({
|
|
15987
|
+
...__props.style,
|
|
15988
|
+
transition: !!__props.animation ? null : getTransition(),
|
|
15989
|
+
animation: __props.animation,
|
|
15990
|
+
borderImage: `url(${__props.imageUrl}) ${sliceWidth.value} fill`,
|
|
15991
|
+
borderImageWidth: `${borderDspWidth.value}px`,
|
|
15992
|
+
borderImageOutset: `${convertedBorderOutset.value}px`,
|
|
15993
|
+
JsvImageBlendType: props.imageBlendType
|
|
15994
|
+
}),
|
|
15995
|
+
onTransitionend: _cache[0] || (_cache[0] = (...args) => props.onTransitionEnd && props.onTransitionEnd(...args))
|
|
15996
|
+
}, null, 36)) : createCommentVNode("", true);
|
|
15997
|
+
};
|
|
15998
|
+
}
|
|
15999
|
+
};
|
|
16000
|
+
|
|
16001
|
+
//
|
|
16002
|
+
// utils/JsViewVueWidget/JsvNativeSharedDiv.vue;
|
|
16003
|
+
//
|
|
16004
|
+
/* <!--
|
|
16005
|
+
* 【控件介绍】
|
|
16006
|
+
* JsvNativeSharedDiv:创建一个Native端可以跟进显示位置的div,用于Native端外挂插件的开发
|
|
16007
|
+
* style {Object} 布局样式(必须),必须包含的信息为{left, top, width, height}
|
|
16008
|
+
* getId {function} 回调函数,用于接收ID信息,ID信息用于Native端对该view进行跟踪的标识
|
|
16009
|
+
* setId {String} 给定命名ID,避免同进程不同context重名要和Context相关,
|
|
16010
|
+
* 例如`${window.JsView?.getJsContextId()}_${you_name}`
|
|
16011
|
+
* corner {Number} 圆角的尺寸,默认为0
|
|
16012
|
+
*
|
|
16013
|
+
-->
|
|
16014
|
+
|
|
16015
|
+
|
|
16016
|
+
|
|
16017
|
+
|
|
16018
|
+
*/
|
|
16019
|
+
const _sfc_main$g = {
|
|
16020
|
+
__name: "JsvNativeSharedDiv",
|
|
16021
|
+
props: {
|
|
16022
|
+
style: {
|
|
16023
|
+
type: Object,
|
|
16024
|
+
default: () => {
|
|
16025
|
+
return {};
|
|
16026
|
+
}
|
|
16027
|
+
},
|
|
16028
|
+
getId: Function,
|
|
16029
|
+
setId: String,
|
|
16030
|
+
corner: {
|
|
16031
|
+
type: Number,
|
|
16032
|
+
default: 0
|
|
15617
16033
|
}
|
|
15618
16034
|
},
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
15622
|
-
|
|
15623
|
-
|
|
15624
|
-
|
|
15625
|
-
|
|
15626
|
-
|
|
16035
|
+
setup(__props) {
|
|
16036
|
+
const props = __props;
|
|
16037
|
+
let isBrowserDebug = window.jsvIsBrowserDebug;
|
|
16038
|
+
let jsvMainView = void 0;
|
|
16039
|
+
let innerViewId = -1;
|
|
16040
|
+
let ninePatchSet = null;
|
|
16041
|
+
if (!isBrowserDebug) {
|
|
16042
|
+
if (props.corner > 0) {
|
|
16043
|
+
let presetGap = 1;
|
|
16044
|
+
ninePatchSet = {
|
|
16045
|
+
imageSize: (props.corner + presetGap) * 2,
|
|
16046
|
+
// 半径 + 中心点1像素
|
|
16047
|
+
textureName: null
|
|
16048
|
+
};
|
|
16049
|
+
let sampleImageWidth = ninePatchSet.imageSize;
|
|
16050
|
+
let innerRadius2 = sampleImageWidth;
|
|
16051
|
+
let circleLineWidth = 1.5 * props.corner + presetGap - props.corner;
|
|
16052
|
+
let canvasRef;
|
|
16053
|
+
canvasRef = sTextureStoreApi.canvasTexture(
|
|
16054
|
+
sampleImageWidth,
|
|
16055
|
+
sampleImageWidth
|
|
16056
|
+
);
|
|
16057
|
+
let circleRadius = Math.floor(innerRadius2 / 2) + Math.floor(circleLineWidth / 2) - presetGap;
|
|
16058
|
+
let customPath = canvasRef.circlePath(
|
|
16059
|
+
Math.floor(sampleImageWidth / 2),
|
|
16060
|
+
Math.floor(sampleImageWidth / 2),
|
|
16061
|
+
circleRadius
|
|
16062
|
+
);
|
|
16063
|
+
canvasRef.drawColor("rgba(0,0,0,0)");
|
|
16064
|
+
customPath.stroke(circleLineWidth, "#FF0000FF");
|
|
16065
|
+
ninePatchSet.textureName = canvasRef.commit();
|
|
16066
|
+
}
|
|
16067
|
+
jsvMainView = new Forge$2.NativeSharedView();
|
|
16068
|
+
innerViewId = Forge$2.sViewStore.add(new Forge$2.ViewInfo(jsvMainView));
|
|
16069
|
+
if (typeof jsvMainView != "undefined" && jsvMainView) {
|
|
16070
|
+
if (props.setId) {
|
|
16071
|
+
jsvMainView.SetTrackId(props.setId);
|
|
16072
|
+
}
|
|
16073
|
+
props.getId?.(jsvMainView.GetTrackId());
|
|
16074
|
+
}
|
|
15627
16075
|
}
|
|
16076
|
+
onUnmounted(() => {
|
|
16077
|
+
if (isBrowserDebug) {
|
|
16078
|
+
return;
|
|
16079
|
+
}
|
|
16080
|
+
if (innerViewId !== -1) {
|
|
16081
|
+
Forge$2.sViewStore.remove(innerViewId);
|
|
16082
|
+
innerViewId = -1;
|
|
16083
|
+
jsvMainView = null;
|
|
16084
|
+
}
|
|
16085
|
+
if (ninePatchSet != null) {
|
|
16086
|
+
sTextureStoreApi.deleteTexture(ninePatchSet.textureName);
|
|
16087
|
+
}
|
|
16088
|
+
});
|
|
16089
|
+
return (_ctx, _cache) => {
|
|
16090
|
+
return !unref(isBrowserDebug) ? (openBlock(), createElementBlock("div", {
|
|
16091
|
+
key: 0,
|
|
16092
|
+
style: normalizeStyle({
|
|
16093
|
+
left: __props.style.left,
|
|
16094
|
+
top: __props.style.top
|
|
16095
|
+
})
|
|
16096
|
+
}, [
|
|
16097
|
+
unref(ninePatchSet) != null ? (openBlock(), createBlock(_sfc_main$h, {
|
|
16098
|
+
key: 0,
|
|
16099
|
+
style: normalizeStyle({
|
|
16100
|
+
width: __props.style.width,
|
|
16101
|
+
height: __props.style.height
|
|
16102
|
+
}),
|
|
16103
|
+
imageUrl: `jsvtexturestore://${unref(ninePatchSet).textureName}`,
|
|
16104
|
+
imageWidth: unref(ninePatchSet).imageSize,
|
|
16105
|
+
centerWidth: 1,
|
|
16106
|
+
borderOutset: 0,
|
|
16107
|
+
waitForInit: false,
|
|
16108
|
+
imageBlendType: "alphaOverride"
|
|
16109
|
+
}, null, 8, ["style", "imageUrl", "imageWidth"])) : (openBlock(), createElementBlock("div", {
|
|
16110
|
+
key: 1,
|
|
16111
|
+
style: normalizeStyle({
|
|
16112
|
+
width: __props.style.width,
|
|
16113
|
+
height: __props.style.height,
|
|
16114
|
+
backgroundColor: "rgba(0,0,0,0)",
|
|
16115
|
+
JsvImageBlendType: "alphaOverride"
|
|
16116
|
+
})
|
|
16117
|
+
}, null, 4)),
|
|
16118
|
+
createElementVNode("div", {
|
|
16119
|
+
style: normalizeStyle({
|
|
16120
|
+
width: __props.style.width,
|
|
16121
|
+
height: __props.style.height
|
|
16122
|
+
}),
|
|
16123
|
+
"data-jsv-vw-innerview": unref(innerViewId)
|
|
16124
|
+
}, [
|
|
16125
|
+
renderSlot(_ctx.$slots, "default")
|
|
16126
|
+
], 12, ["data-jsv-vw-innerview"])
|
|
16127
|
+
], 4)) : (openBlock(), createElementBlock("div", {
|
|
16128
|
+
key: 1,
|
|
16129
|
+
style: normalizeStyle({ ...__props.style })
|
|
16130
|
+
}, [
|
|
16131
|
+
renderSlot(_ctx.$slots, "default")
|
|
16132
|
+
], 4));
|
|
16133
|
+
};
|
|
15628
16134
|
}
|
|
15629
16135
|
};
|
|
15630
|
-
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15631
|
-
return !$setup.isBrowserDebug ? (openBlock(), createElementBlock("div", {
|
|
15632
|
-
key: 0,
|
|
15633
|
-
style: normalizeStyle({
|
|
15634
|
-
left: $props.style.left,
|
|
15635
|
-
top: $props.style.top,
|
|
15636
|
-
width: $props.style.width,
|
|
15637
|
-
height: $props.style.height
|
|
15638
|
-
}),
|
|
15639
|
-
"data-jsv-vw-innerview": $setup.innerViewId
|
|
15640
|
-
}, [
|
|
15641
|
-
renderSlot(_ctx.$slots, "default")
|
|
15642
|
-
], 12, ["data-jsv-vw-innerview"])) : (openBlock(), createElementBlock("div", {
|
|
15643
|
-
key: 1,
|
|
15644
|
-
style: normalizeStyle({ ...$props.style })
|
|
15645
|
-
}, [
|
|
15646
|
-
renderSlot(_ctx.$slots, "default")
|
|
15647
|
-
], 4));
|
|
15648
|
-
}
|
|
15649
|
-
const JsvTransparentDiv = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$2]]);
|
|
15650
16136
|
|
|
15651
16137
|
//
|
|
15652
16138
|
// utils/JsViewVueWidget/JsvHole.js;
|
|
@@ -15822,7 +16308,7 @@ const _sfc_main$f = {
|
|
|
15822
16308
|
};
|
|
15823
16309
|
sureNum();
|
|
15824
16310
|
const baseSlide = (refObj, startPos, endPos, callback) => {
|
|
15825
|
-
const anim = new Forge$
|
|
16311
|
+
const anim = new Forge$2.TranslateFrameAnimation(
|
|
15826
16312
|
startPos,
|
|
15827
16313
|
endPos,
|
|
15828
16314
|
props.slideSpeed,
|
|
@@ -15831,7 +16317,7 @@ const _sfc_main$f = {
|
|
|
15831
16317
|
0
|
|
15832
16318
|
);
|
|
15833
16319
|
anim.SetAnimationListener(
|
|
15834
|
-
new Forge$
|
|
16320
|
+
new Forge$2.AnimationListener(
|
|
15835
16321
|
null,
|
|
15836
16322
|
(ended) => {
|
|
15837
16323
|
if (ended) {
|
|
@@ -15841,7 +16327,7 @@ const _sfc_main$f = {
|
|
|
15841
16327
|
null
|
|
15842
16328
|
)
|
|
15843
16329
|
);
|
|
15844
|
-
anim.Enable(Forge$
|
|
16330
|
+
anim.Enable(Forge$2.AnimationEnable.ReleaseAfterEndCallback);
|
|
15845
16331
|
toRaw(refObj.value)?.jsvGetProxyView(true).StartAnimation(anim);
|
|
15846
16332
|
};
|
|
15847
16333
|
const slideTimer = () => {
|
|
@@ -16080,6 +16566,7 @@ const _sfc_main$f = {
|
|
|
16080
16566
|
|
|
16081
16567
|
|
|
16082
16568
|
*/
|
|
16569
|
+
const renderDocument = window.JsvCode.Dom.RenderDocument ? window.JsvCode.Dom.RenderDocument : window.JsvCode.Dom.BrowserDocument;
|
|
16083
16570
|
const _sfc_main$e = {
|
|
16084
16571
|
props: {
|
|
16085
16572
|
class: {
|
|
@@ -16168,7 +16655,7 @@ const _sfc_main$e = {
|
|
|
16168
16655
|
_initForHtml() {
|
|
16169
16656
|
let _this = this;
|
|
16170
16657
|
this.$refs.innerViewDiv?.jsvGetProxyView(true).RegisterOnProxyReady(() => {
|
|
16171
|
-
const canvas =
|
|
16658
|
+
const canvas = renderDocument.createElement("canvas");
|
|
16172
16659
|
canvas.style.width = _this.style.width + "px";
|
|
16173
16660
|
canvas.style.height = _this.style.height + "px";
|
|
16174
16661
|
_this.$refs.innerViewDiv?.jsvGetProxyView(true).HtmlGetElement().appendChild(canvas);
|
|
@@ -16190,9 +16677,9 @@ const _sfc_main$e = {
|
|
|
16190
16677
|
},
|
|
16191
16678
|
_updateInnerView() {
|
|
16192
16679
|
if (this.innerView === null) {
|
|
16193
|
-
this.innerView = new Forge$
|
|
16194
|
-
this.innerViewId = Forge$
|
|
16195
|
-
new Forge$
|
|
16680
|
+
this.innerView = new Forge$2.LayoutView();
|
|
16681
|
+
this.innerViewId = Forge$2.sViewStore.add(
|
|
16682
|
+
new Forge$2.ViewInfo(this.innerView, null)
|
|
16196
16683
|
);
|
|
16197
16684
|
}
|
|
16198
16685
|
if (this.viewSrc !== this.cache.viewSrc || this.maskSrc !== this.cache.maskSrc) {
|
|
@@ -16230,7 +16717,7 @@ const _sfc_main$e = {
|
|
|
16230
16717
|
},
|
|
16231
16718
|
beforeUnmount() {
|
|
16232
16719
|
if (this.innerViewId !== -1) {
|
|
16233
|
-
Forge$
|
|
16720
|
+
Forge$2.sViewStore.remove(this.innerViewId);
|
|
16234
16721
|
this.innerViewId = -1;
|
|
16235
16722
|
this.innerView = null;
|
|
16236
16723
|
}
|
|
@@ -16257,112 +16744,6 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16257
16744
|
}
|
|
16258
16745
|
const JsvMaskClipDiv = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1]]);
|
|
16259
16746
|
|
|
16260
|
-
//
|
|
16261
|
-
// utils/JsViewVueWidget/JsvNinePatch.vue;
|
|
16262
|
-
//
|
|
16263
|
-
/* <!--
|
|
16264
|
-
* 【模块 export 内容】
|
|
16265
|
-
* JsvNinePatch:Vue高阶组件,.9图展示控件,该控件的原图要求为正方形,延展后可为长方形
|
|
16266
|
-
* props说明:
|
|
16267
|
-
* style {Object} 同div的Style,通过width/height来控制.9图片延展后的显示尺寸,另外通过top/left控制坐标
|
|
16268
|
-
* imageUrl {String} (必填)显示图片的加载地址
|
|
16269
|
-
* imageWidth {int} (必填)原图信息: 原图的宽度(由于正方形,宽高相同)
|
|
16270
|
-
* contentWidth {int} (废弃)此值为了兼容,会赋值给centerWidth
|
|
16271
|
-
* centerWidth {int} (必填)原图信息: .9图的中心区域宽度(repeat区域)
|
|
16272
|
-
* imageDspWidth {int} 原图缩放后的显示宽度,计算方法:
|
|
16273
|
-
* 四角为90度圆弧时: imageDspWidth = 显示图形的圆弧半径 / 原图中圆弧的半径 * 原图宽度
|
|
16274
|
-
* 原图中圆弧半径 = (原图宽度 - borderOutset * 2) / 2
|
|
16275
|
-
* 四角为其他形状时,原图.9图的四角区域,缩放到要和显示图形重合后的宽度。
|
|
16276
|
-
* borderOutset {int} (必填)原图信息: 图片边缘到中心内容区域边缘的距离, 快速计算: (原图宽度 - 原图中放内容宽度) / 2
|
|
16277
|
-
* animTime {int} (必填)缩放动画的时长(单位秒)
|
|
16278
|
-
* waitForInit {boolean} (选填)尺寸为0时是否进行描画(例如: 首次显示不展示动画的场合,设置为true),默认值为true
|
|
16279
|
-
* onTransitionEnd { Function } (选填)transition动画结束的回调
|
|
16280
|
-
-->
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
*/
|
|
16286
|
-
const _sfc_main$d = {
|
|
16287
|
-
__name: "JsvNinePatch",
|
|
16288
|
-
props: {
|
|
16289
|
-
style: {
|
|
16290
|
-
type: Object,
|
|
16291
|
-
default: () => {
|
|
16292
|
-
return {};
|
|
16293
|
-
}
|
|
16294
|
-
},
|
|
16295
|
-
top: { type: Number, default: 0 },
|
|
16296
|
-
left: { type: Number, default: 0 },
|
|
16297
|
-
waitForInit: { type: Boolean, default: true },
|
|
16298
|
-
imageUrl: { type: String, required: true },
|
|
16299
|
-
imageWidth: { type: Number, required: true },
|
|
16300
|
-
imageDspWidth: { type: Number, default: 0 },
|
|
16301
|
-
contentWidth: { type: Number, default: -1 },
|
|
16302
|
-
centerWidth: { type: Number, default: -1, required: true },
|
|
16303
|
-
borderOutset: { type: Number, required: true },
|
|
16304
|
-
animTime: { type: Number, default: 0 },
|
|
16305
|
-
onTransitionEnd: { type: Function },
|
|
16306
|
-
animation: { type: String }
|
|
16307
|
-
},
|
|
16308
|
-
setup(__props) {
|
|
16309
|
-
const props = __props;
|
|
16310
|
-
const isReady = () => {
|
|
16311
|
-
if (!props.waitForInit) {
|
|
16312
|
-
return true;
|
|
16313
|
-
}
|
|
16314
|
-
return props.style && props.style.width !== 0 && props.style.height !== 0;
|
|
16315
|
-
};
|
|
16316
|
-
const getTransition = () => {
|
|
16317
|
-
let transition = "";
|
|
16318
|
-
if (props.animTime && props.animTime > 0) {
|
|
16319
|
-
transition = `left ${props.animTime}s, top ${props.animTime}s, width ${props.animTime}s, height ${props.animTime}s`;
|
|
16320
|
-
}
|
|
16321
|
-
return transition;
|
|
16322
|
-
};
|
|
16323
|
-
let centerWidth = props.contentWidth > 0 ? props.contentWidth : 1;
|
|
16324
|
-
if (props.centerWidth >= 0) {
|
|
16325
|
-
centerWidth = props.centerWidth > 0 ? props.centerWidth : 1;
|
|
16326
|
-
}
|
|
16327
|
-
const imageDspWidthInner = computed(
|
|
16328
|
-
() => props.imageDspWidth > 0 ? props.imageDspWidth : props.imageWidth
|
|
16329
|
-
);
|
|
16330
|
-
const sliceWidth = ref(
|
|
16331
|
-
Math.ceil(Math.max(0, (props.imageWidth - centerWidth) / 2))
|
|
16332
|
-
);
|
|
16333
|
-
const borderDspWidth = ref(
|
|
16334
|
-
Math.ceil(sliceWidth.value * imageDspWidthInner.value / props.imageWidth)
|
|
16335
|
-
);
|
|
16336
|
-
const convertedBorderOutset = ref(
|
|
16337
|
-
Math.ceil(props.borderOutset * imageDspWidthInner.value / props.imageWidth)
|
|
16338
|
-
);
|
|
16339
|
-
watchEffect(() => {
|
|
16340
|
-
if (props.style?.width && props.style.width <= imageDspWidthInner.value || props.style?.height && props.style.height <= imageDspWidthInner.value) {
|
|
16341
|
-
console.warn(
|
|
16342
|
-
"JsvNinePatch: style size must be larger than imageDspWidth. style is",
|
|
16343
|
-
props.style,
|
|
16344
|
-
"imageDspWidth is",
|
|
16345
|
-
imageDspWidthInner.value
|
|
16346
|
-
);
|
|
16347
|
-
}
|
|
16348
|
-
});
|
|
16349
|
-
return (_ctx, _cache) => {
|
|
16350
|
-
return isReady() ? (openBlock(), createElementBlock("div", {
|
|
16351
|
-
key: 0,
|
|
16352
|
-
style: normalizeStyle({
|
|
16353
|
-
...__props.style,
|
|
16354
|
-
transition: !!__props.animation ? null : getTransition(),
|
|
16355
|
-
animation: __props.animation,
|
|
16356
|
-
borderImage: `url(${__props.imageUrl}) ${sliceWidth.value} fill`,
|
|
16357
|
-
borderImageWidth: `${borderDspWidth.value}px`,
|
|
16358
|
-
borderImageOutset: `${convertedBorderOutset.value}px`
|
|
16359
|
-
}),
|
|
16360
|
-
onTransitionend: _cache[0] || (_cache[0] = (...args) => props.onTransitionEnd && props.onTransitionEnd(...args))
|
|
16361
|
-
}, null, 36)) : createCommentVNode("", true);
|
|
16362
|
-
};
|
|
16363
|
-
}
|
|
16364
|
-
};
|
|
16365
|
-
|
|
16366
16747
|
//
|
|
16367
16748
|
// utils/JsViewVueWidget/JsvPosterDiv.vue;
|
|
16368
16749
|
//
|
|
@@ -16380,7 +16761,7 @@ const _sfc_main$d = {
|
|
|
16380
16761
|
|
|
16381
16762
|
|
|
16382
16763
|
*/
|
|
16383
|
-
const _sfc_main$
|
|
16764
|
+
const _sfc_main$d = {
|
|
16384
16765
|
__name: "JsvPosterDiv",
|
|
16385
16766
|
props: {
|
|
16386
16767
|
style: Object
|
|
@@ -16421,16 +16802,19 @@ const _sfc_main$c = {
|
|
|
16421
16802
|
* 【模块 export 内容】
|
|
16422
16803
|
* JsvPosterImage:Vue高阶组件,海报描画,可设置color space 和 texture size
|
|
16423
16804
|
* props说明:
|
|
16424
|
-
* colorSpace {String} 颜色空间,默认RGBA_8888
|
|
16425
16805
|
* style {Object} 包含left/top/width/height/border-radius的style设置
|
|
16806
|
+
* colorSpace {String} 颜色空间,调整其他颜色空间可以节省内存,默认RGBA_8888
|
|
16426
16807
|
* imageCompress {boolean} 是否压缩图片, 默认打开
|
|
16808
|
+
* src {string} 图片的加载地址
|
|
16809
|
+
* fadeIn: {boolean} 图片加载完成是否有淡入效果,默认为打开
|
|
16810
|
+
* isPosterImage: 标识是否用于海报位,对于海报位的内容,可以有下载线程控制等策略来优化整体体验
|
|
16427
16811
|
-->
|
|
16428
16812
|
|
|
16429
16813
|
|
|
16430
16814
|
|
|
16431
16815
|
|
|
16432
16816
|
*/
|
|
16433
|
-
const _sfc_main$
|
|
16817
|
+
const _sfc_main$c = {
|
|
16434
16818
|
__name: "JsvPosterImage",
|
|
16435
16819
|
props: {
|
|
16436
16820
|
colorSpace: {
|
|
@@ -16468,7 +16852,15 @@ const _sfc_main$b = {
|
|
|
16468
16852
|
let show_background_holder = !!window.JsView;
|
|
16469
16853
|
watchEffect(() => {
|
|
16470
16854
|
if (props.style) {
|
|
16471
|
-
let {
|
|
16855
|
+
let {
|
|
16856
|
+
left,
|
|
16857
|
+
top,
|
|
16858
|
+
width,
|
|
16859
|
+
height,
|
|
16860
|
+
backgroundImage,
|
|
16861
|
+
backgroundColor,
|
|
16862
|
+
...others
|
|
16863
|
+
} = props.style;
|
|
16472
16864
|
common_style.left = left;
|
|
16473
16865
|
common_style.top = top;
|
|
16474
16866
|
image_style.width = width;
|
|
@@ -16513,7 +16905,7 @@ const _sfc_main$b = {
|
|
|
16513
16905
|
|
|
16514
16906
|
|
|
16515
16907
|
*/
|
|
16516
|
-
const _sfc_main$
|
|
16908
|
+
const _sfc_main$b = {
|
|
16517
16909
|
props: {
|
|
16518
16910
|
definitionScale: {
|
|
16519
16911
|
type: String
|
|
@@ -16525,7 +16917,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16525
16917
|
renderSlot(_ctx.$slots, "default")
|
|
16526
16918
|
], 8, ["data-jsv-vw-text-definition"]);
|
|
16527
16919
|
}
|
|
16528
|
-
const JsvScaleTextBox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16920
|
+
const JsvScaleTextBox = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render]]);
|
|
16529
16921
|
|
|
16530
16922
|
//
|
|
16531
16923
|
// utils/JsViewVueWidget/JsvSoundPool.js;
|
|
@@ -16756,7 +17148,7 @@ class JsvSoundPool {
|
|
|
16756
17148
|
/* <!--
|
|
16757
17149
|
* Created by chunfeng.luo@qcast.cn on 10/13/20.
|
|
16758
17150
|
*/
|
|
16759
|
-
const _sfc_main$
|
|
17151
|
+
const _sfc_main$a = {
|
|
16760
17152
|
__name: "JsvTextBox",
|
|
16761
17153
|
props: {
|
|
16762
17154
|
style: Object,
|
|
@@ -16769,10 +17161,13 @@ const _sfc_main$9 = {
|
|
|
16769
17161
|
default: "middle"
|
|
16770
17162
|
},
|
|
16771
17163
|
enableLatex: Boolean,
|
|
16772
|
-
className: String,
|
|
16773
17164
|
textDirection: {
|
|
16774
17165
|
type: String,
|
|
16775
17166
|
default: "unset"
|
|
17167
|
+
},
|
|
17168
|
+
syncDraw: {
|
|
17169
|
+
type: String,
|
|
17170
|
+
default: "auto"
|
|
16776
17171
|
}
|
|
16777
17172
|
},
|
|
16778
17173
|
setup(__props) {
|
|
@@ -16799,7 +17194,7 @@ const _sfc_main$9 = {
|
|
|
16799
17194
|
return props.enableLatex ? 1 : 0;
|
|
16800
17195
|
});
|
|
16801
17196
|
return (_ctx, _cache) => {
|
|
16802
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
17197
|
+
return openBlock(), createBlock(unref(_sfc_main$x), {
|
|
16803
17198
|
style: normalizeStyle({
|
|
16804
17199
|
...props.style,
|
|
16805
17200
|
flexDirection: "row",
|
|
@@ -16813,10 +17208,11 @@ const _sfc_main$9 = {
|
|
|
16813
17208
|
JsvTextLatex: unref(jsvTextLatexValue),
|
|
16814
17209
|
JsvTextLineAlign: __props.lineAlign,
|
|
16815
17210
|
JsvTextInnerDirection: __props.textDirection
|
|
16816
|
-
})
|
|
17211
|
+
}),
|
|
17212
|
+
"data-jsv-perf-loadtex": props.syncDraw
|
|
16817
17213
|
}, [
|
|
16818
17214
|
renderSlot(_ctx.$slots, "default")
|
|
16819
|
-
],
|
|
17215
|
+
], 12, ["data-jsv-perf-loadtex"])
|
|
16820
17216
|
]),
|
|
16821
17217
|
_: 3
|
|
16822
17218
|
}, 8, ["style"]);
|
|
@@ -16846,7 +17242,7 @@ const _sfc_main$9 = {
|
|
|
16846
17242
|
-->
|
|
16847
17243
|
|
|
16848
17244
|
*/
|
|
16849
|
-
const _sfc_main$
|
|
17245
|
+
const _sfc_main$9 = {
|
|
16850
17246
|
__name: "JsvRadarChart",
|
|
16851
17247
|
props: {
|
|
16852
17248
|
style: {
|
|
@@ -17090,7 +17486,7 @@ const JsvRippleShape = {
|
|
|
17090
17486
|
|
|
17091
17487
|
|
|
17092
17488
|
*/
|
|
17093
|
-
const _sfc_main$
|
|
17489
|
+
const _sfc_main$8 = {
|
|
17094
17490
|
__name: "JsvRipple",
|
|
17095
17491
|
props: {
|
|
17096
17492
|
width: {
|
|
@@ -17115,8 +17511,8 @@ const _sfc_main$7 = {
|
|
|
17115
17511
|
setup(__props, { expose }) {
|
|
17116
17512
|
const props = __props;
|
|
17117
17513
|
const TAG = "JsvRipple";
|
|
17118
|
-
let filterView = new Forge$
|
|
17119
|
-
let viewId = Forge$
|
|
17514
|
+
let filterView = new Forge$2.FilterView(null, Forge$2.FilterView.Type.WAVE);
|
|
17515
|
+
let viewId = Forge$2.sViewStore.add(new Forge$2.ViewInfo(filterView, null));
|
|
17120
17516
|
watchEffect(() => {
|
|
17121
17517
|
if (filterView) {
|
|
17122
17518
|
filterView.FilterSwitch(!!props.enable);
|
|
@@ -17124,7 +17520,7 @@ const _sfc_main$7 = {
|
|
|
17124
17520
|
});
|
|
17125
17521
|
onBeforeUnmount(() => {
|
|
17126
17522
|
if (viewId > 0) {
|
|
17127
|
-
Forge$
|
|
17523
|
+
Forge$2.sViewStore.remove(viewId);
|
|
17128
17524
|
viewId = -1;
|
|
17129
17525
|
}
|
|
17130
17526
|
});
|
|
@@ -17264,7 +17660,7 @@ const JsvLine_vue_vue_type_style_index_0_scoped_10b9ebcf_lang = "";
|
|
|
17264
17660
|
|
|
17265
17661
|
|
|
17266
17662
|
*/
|
|
17267
|
-
const _sfc_main$
|
|
17663
|
+
const _sfc_main$7 = {
|
|
17268
17664
|
__name: "JsvLine",
|
|
17269
17665
|
props: {
|
|
17270
17666
|
startPos: { type: Object, require: true },
|
|
@@ -17325,7 +17721,7 @@ const _sfc_main$6 = {
|
|
|
17325
17721
|
};
|
|
17326
17722
|
const styleSheetsContent = { "0": { "fadeIn-10b9ebcf": "@keyframes fadeIn-10b9ebcf {0%{opacity:0;}100%{opacity:1;}}", "fadeOut-10b9ebcf": "@keyframes fadeOut-10b9ebcf {0%{opacity:1;}100%{opacity:0;}}" } };
|
|
17327
17723
|
window.JsvCode.Dom.DeclareStyleSheets(styleSheetsContent);
|
|
17328
|
-
const JsvLine = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17724
|
+
const JsvLine = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-10b9ebcf"]]);
|
|
17329
17725
|
|
|
17330
17726
|
//
|
|
17331
17727
|
// utils/JsViewVueWidget/JsvLine/index.js;
|
|
@@ -17351,7 +17747,7 @@ const JsvLine = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
|
17351
17747
|
|
|
17352
17748
|
|
|
17353
17749
|
*/
|
|
17354
|
-
const _sfc_main$
|
|
17750
|
+
const _sfc_main$6 = {
|
|
17355
17751
|
__name: "JsvSector",
|
|
17356
17752
|
props: {
|
|
17357
17753
|
centerPosition: { type: Object, require: true },
|
|
@@ -17465,7 +17861,7 @@ const _sfc_main$5 = {
|
|
|
17465
17861
|
|
|
17466
17862
|
|
|
17467
17863
|
*/
|
|
17468
|
-
const _sfc_main$
|
|
17864
|
+
const _sfc_main$5 = {
|
|
17469
17865
|
__name: "JsvPieChart",
|
|
17470
17866
|
props: {
|
|
17471
17867
|
centerPosition: { type: Object, required: true },
|
|
@@ -17551,7 +17947,7 @@ const _sfc_main$4 = {
|
|
|
17551
17947
|
}, [
|
|
17552
17948
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(finalData).slice().reverse(), (item, index) => {
|
|
17553
17949
|
return openBlock(), createElementBlock("div", null, [
|
|
17554
|
-
(openBlock(), createBlock(_sfc_main$
|
|
17950
|
+
(openBlock(), createBlock(_sfc_main$6, {
|
|
17555
17951
|
radius: props.radius,
|
|
17556
17952
|
config: {
|
|
17557
17953
|
startAngle: Number(item.startAngle),
|
|
@@ -17659,7 +18055,7 @@ class ConnectLineTexture {
|
|
|
17659
18055
|
|
|
17660
18056
|
|
|
17661
18057
|
*/
|
|
17662
|
-
const _sfc_main$
|
|
18058
|
+
const _sfc_main$4 = {
|
|
17663
18059
|
__name: "JsvConnectLine",
|
|
17664
18060
|
props: {
|
|
17665
18061
|
startPos: {
|
|
@@ -17927,7 +18323,7 @@ const _sfc_main$3 = {
|
|
|
17927
18323
|
|
|
17928
18324
|
|
|
17929
18325
|
*/
|
|
17930
|
-
const _sfc_main$
|
|
18326
|
+
const _sfc_main$3 = {
|
|
17931
18327
|
__name: "JsvProgressBar",
|
|
17932
18328
|
props: {
|
|
17933
18329
|
width: { type: Number, required: true },
|
|
@@ -18004,7 +18400,7 @@ const _sfc_main$2 = {
|
|
|
18004
18400
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
18005
18401
|
props.isCanvas ? (openBlock(), createElementBlock("div", { key: 0 }, [
|
|
18006
18402
|
withDirectives(createElementVNode("div", null, [
|
|
18007
|
-
createVNode(_sfc_main$
|
|
18403
|
+
createVNode(_sfc_main$h, {
|
|
18008
18404
|
style: normalizeStyle({
|
|
18009
18405
|
left: 0,
|
|
18010
18406
|
top: 0,
|
|
@@ -18046,7 +18442,7 @@ const _sfc_main$2 = {
|
|
|
18046
18442
|
}, null, 4)
|
|
18047
18443
|
], 4)
|
|
18048
18444
|
])),
|
|
18049
|
-
createVNode(_sfc_main$
|
|
18445
|
+
createVNode(_sfc_main$h, {
|
|
18050
18446
|
style: normalizeStyle({
|
|
18051
18447
|
left: 0,
|
|
18052
18448
|
top: 0,
|
|
@@ -18071,7 +18467,7 @@ const _sfc_main$2 = {
|
|
|
18071
18467
|
/*
|
|
18072
18468
|
|
|
18073
18469
|
*/
|
|
18074
|
-
const _sfc_main$
|
|
18470
|
+
const _sfc_main$2 = {
|
|
18075
18471
|
__name: "JsvEnableRenderBreak",
|
|
18076
18472
|
setup(__props) {
|
|
18077
18473
|
const itemMounted = shallowRef(false);
|
|
@@ -19288,7 +19684,7 @@ function multiSelect(arr, left, right, n, compare) {
|
|
|
19288
19684
|
|
|
19289
19685
|
|
|
19290
19686
|
*/
|
|
19291
|
-
const _sfc_main = {
|
|
19687
|
+
const _sfc_main$1 = {
|
|
19292
19688
|
__name: "JsvMindMap",
|
|
19293
19689
|
props: {
|
|
19294
19690
|
name: {
|
|
@@ -19778,6 +20174,273 @@ const _sfc_main = {
|
|
|
19778
20174
|
// utils/JsViewVueWidget/JsvMindMap/index.js;
|
|
19779
20175
|
//
|
|
19780
20176
|
|
|
20177
|
+
//
|
|
20178
|
+
// utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts;
|
|
20179
|
+
//
|
|
20180
|
+
const ScrollStyle = {
|
|
20181
|
+
// 运动模式
|
|
20182
|
+
DrawerMode: Symbol("DrawerMode"),
|
|
20183
|
+
PinMode: Symbol("PinMode"),
|
|
20184
|
+
// 同步模式
|
|
20185
|
+
SyncParallel: Symbol("AckParallel"),
|
|
20186
|
+
// 百分比完全对齐的同步模式
|
|
20187
|
+
SyncRevert: Symbol("SyncRevert")
|
|
20188
|
+
// (1-百分比)的同步模式
|
|
20189
|
+
};
|
|
20190
|
+
|
|
20191
|
+
//
|
|
20192
|
+
// utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue?vue&type=script&setup=true&lang.ts;
|
|
20193
|
+
//
|
|
20194
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20195
|
+
__name: "JsvScrollBox",
|
|
20196
|
+
props: {
|
|
20197
|
+
// 底座的尺寸
|
|
20198
|
+
style: {
|
|
20199
|
+
type: Object,
|
|
20200
|
+
require: true
|
|
20201
|
+
},
|
|
20202
|
+
// 滑动允许方向(VERTICAL / HORIZONTAL)
|
|
20203
|
+
direction: {
|
|
20204
|
+
type: Symbol,
|
|
20205
|
+
require: true
|
|
20206
|
+
},
|
|
20207
|
+
// 滑块的尺寸,垂直于direction的轴不用设置
|
|
20208
|
+
sliderSize: {
|
|
20209
|
+
type: Object,
|
|
20210
|
+
// {width, height}
|
|
20211
|
+
require: true
|
|
20212
|
+
},
|
|
20213
|
+
// 滑块模式
|
|
20214
|
+
// ScrollStyle.PinMode: 滑块小于底座
|
|
20215
|
+
// ScrollStyle.DrawerMode: 滑块大于底座
|
|
20216
|
+
mode: {
|
|
20217
|
+
type: Symbol,
|
|
20218
|
+
default: ScrollStyle.PinMode
|
|
20219
|
+
},
|
|
20220
|
+
// 初始进度条的进度
|
|
20221
|
+
initPercent: {
|
|
20222
|
+
type: Number,
|
|
20223
|
+
default: 0
|
|
20224
|
+
},
|
|
20225
|
+
enableFling: {
|
|
20226
|
+
type: Boolean,
|
|
20227
|
+
default: false
|
|
20228
|
+
}
|
|
20229
|
+
},
|
|
20230
|
+
setup(__props, { expose }) {
|
|
20231
|
+
const rProps = __props;
|
|
20232
|
+
const cDirection = rProps.direction;
|
|
20233
|
+
const cMode = rProps.mode;
|
|
20234
|
+
const cInitPercent = rProps.initPercent;
|
|
20235
|
+
const cEnableFling = rProps.enableFling;
|
|
20236
|
+
const cSliderActor = new ActorControl();
|
|
20237
|
+
const cFixedBoxActor = cMode == ScrollStyle.PinMode ? new ActorControl() : null;
|
|
20238
|
+
const cWallConditionGroup = 1;
|
|
20239
|
+
const cSensorConditionGroup = 2;
|
|
20240
|
+
let vMounted = false;
|
|
20241
|
+
let vHorizontalGap = 0;
|
|
20242
|
+
let vVerticalGap = 0;
|
|
20243
|
+
let vSubSyncList = [];
|
|
20244
|
+
let rFixedBoxWidth = shallowRef(NaN);
|
|
20245
|
+
let rFixedBoxHeight = shallowRef(NaN);
|
|
20246
|
+
let rFixedViewRef = shallowRef(null);
|
|
20247
|
+
let rSliderWidth = shallowRef(NaN);
|
|
20248
|
+
let rSliderHeight = shallowRef(NaN);
|
|
20249
|
+
let rSliderViewRef = shallowRef(null);
|
|
20250
|
+
watchEffect(() => {
|
|
20251
|
+
let fixedBoxSize = {
|
|
20252
|
+
width: rProps.style.width,
|
|
20253
|
+
height: rProps.style.height
|
|
20254
|
+
};
|
|
20255
|
+
let sliderSize = {
|
|
20256
|
+
width: rProps.sliderSize.width,
|
|
20257
|
+
height: rProps.sliderSize.height
|
|
20258
|
+
};
|
|
20259
|
+
if (cDirection == VERTICAL) {
|
|
20260
|
+
sliderSize.width = fixedBoxSize.width;
|
|
20261
|
+
} else {
|
|
20262
|
+
sliderSize.height = fixedBoxSize.height;
|
|
20263
|
+
}
|
|
20264
|
+
if (cMode == ScrollStyle.PinMode && (sliderSize.height > fixedBoxSize.height || sliderSize.width > fixedBoxSize.width)) {
|
|
20265
|
+
console.error(
|
|
20266
|
+
`slider oversize in pin-mode bw=${fixedBoxSize.width} bh=${fixedBoxSize.height} sw=${sliderSize.width} sh=${sliderSize.height}`
|
|
20267
|
+
);
|
|
20268
|
+
return;
|
|
20269
|
+
} else if (cMode == ScrollStyle.DrawerMode && (sliderSize.height < fixedBoxSize.height || sliderSize.width < fixedBoxSize.width)) {
|
|
20270
|
+
console.error(
|
|
20271
|
+
`box oversize in drawer-mode bw=${fixedBoxSize.width} bh=${fixedBoxSize.height} sw=${sliderSize.width} sh=${sliderSize.height}`
|
|
20272
|
+
);
|
|
20273
|
+
return;
|
|
20274
|
+
}
|
|
20275
|
+
if (sliderSize.width != rSliderWidth.value || sliderSize.height != rSliderHeight.value || fixedBoxSize.width != rFixedBoxWidth.value || fixedBoxSize.height != rFixedBoxHeight.value) {
|
|
20276
|
+
rSliderWidth.value = sliderSize.width;
|
|
20277
|
+
rSliderHeight.value = sliderSize.height;
|
|
20278
|
+
rFixedBoxWidth.value = fixedBoxSize.width;
|
|
20279
|
+
rFixedBoxHeight.value = fixedBoxSize.height;
|
|
20280
|
+
rebuildSliderSet();
|
|
20281
|
+
}
|
|
20282
|
+
});
|
|
20283
|
+
function rebuildSliderSet() {
|
|
20284
|
+
if (vMounted) {
|
|
20285
|
+
vHorizontalGap = rFixedBoxWidth.value - rSliderWidth.value;
|
|
20286
|
+
vVerticalGap = rFixedBoxHeight.value - rSliderHeight.value;
|
|
20287
|
+
cSliderActor.run([
|
|
20288
|
+
cSliderActor.state().removeConditionByGroup(cWallConditionGroup),
|
|
20289
|
+
cSliderActor.condition(cWallConditionGroup, true).boxPosition(
|
|
20290
|
+
vHorizontalGap > 0 ? 0 : vHorizontalGap,
|
|
20291
|
+
// left
|
|
20292
|
+
vVerticalGap > 0 ? 0 : vVerticalGap,
|
|
20293
|
+
// top
|
|
20294
|
+
vHorizontalGap < 0 ? 0 : vHorizontalGap,
|
|
20295
|
+
// right
|
|
20296
|
+
vVerticalGap < 0 ? 0 : vVerticalGap
|
|
20297
|
+
// bottom
|
|
20298
|
+
).then([cSliderActor.action().stopMoving(true)])
|
|
20299
|
+
]);
|
|
20300
|
+
}
|
|
20301
|
+
}
|
|
20302
|
+
function setSensor(callback, sensitivity) {
|
|
20303
|
+
cSliderActor.run([
|
|
20304
|
+
cSliderActor.state().removeConditionByGroup(cSensorConditionGroup)
|
|
20305
|
+
]);
|
|
20306
|
+
if (callback != null) {
|
|
20307
|
+
cSliderActor.run([
|
|
20308
|
+
cSliderActor.condition(cSensorConditionGroup, true).onMovement(sensitivity).then([
|
|
20309
|
+
(pointInfo) => {
|
|
20310
|
+
let percent = cDirection == HORIZONTAL ? pointInfo.xPos / vHorizontalGap : pointInfo.yPos / vVerticalGap;
|
|
20311
|
+
callback(percent, pointInfo.xPos, pointInfo.yPos);
|
|
20312
|
+
}
|
|
20313
|
+
])
|
|
20314
|
+
]);
|
|
20315
|
+
}
|
|
20316
|
+
}
|
|
20317
|
+
function updatePercent(percent) {
|
|
20318
|
+
let xPos = 0;
|
|
20319
|
+
let yPos = 0;
|
|
20320
|
+
if (cDirection == HORIZONTAL) {
|
|
20321
|
+
xPos = Math.floor(percent * vHorizontalGap);
|
|
20322
|
+
} else {
|
|
20323
|
+
yPos = Math.floor(percent * vVerticalGap);
|
|
20324
|
+
}
|
|
20325
|
+
cSliderActor.run([cSliderActor.action().teleportTo(xPos, yPos)]);
|
|
20326
|
+
}
|
|
20327
|
+
onMounted(() => {
|
|
20328
|
+
vMounted = true;
|
|
20329
|
+
let sliderView = rSliderViewRef.value.jsvGetProxyView();
|
|
20330
|
+
cSliderActor.bindForgeView(sliderView, true);
|
|
20331
|
+
sliderView.DragEnables?.(
|
|
20332
|
+
ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT | (cEnableFling ? ForgeConst.DragFlags.TOUCH_RECV_FLING_BIT : 0) | ForgeConst.DragFlags.TOUCH_RECV_FIRST_START | ForgeConst.DragFlags.TOUCH_RECV_LAST_END
|
|
20333
|
+
);
|
|
20334
|
+
if (cInitPercent != 0) {
|
|
20335
|
+
updatePercent(cInitPercent);
|
|
20336
|
+
}
|
|
20337
|
+
if (cFixedBoxActor != null) {
|
|
20338
|
+
let fixedBoxView = rFixedViewRef.value.jsvGetProxyView();
|
|
20339
|
+
cFixedBoxActor.bindForgeView(fixedBoxView, true);
|
|
20340
|
+
fixedBoxView.DragEnables?.(ForgeConst.DragFlags.TOUCH_RECV_FIRST_START);
|
|
20341
|
+
cFixedBoxActor.run([
|
|
20342
|
+
cFixedBoxActor.state().setTouchAttractChild(cSliderActor)
|
|
20343
|
+
]);
|
|
20344
|
+
}
|
|
20345
|
+
rebuildSliderSet();
|
|
20346
|
+
});
|
|
20347
|
+
expose({
|
|
20348
|
+
setSensor,
|
|
20349
|
+
updatePercent
|
|
20350
|
+
});
|
|
20351
|
+
return (_ctx, _cache) => {
|
|
20352
|
+
return openBlock(), createElementBlock("div", {
|
|
20353
|
+
style: normalizeStyle({
|
|
20354
|
+
top: unref(rProps).style?.top,
|
|
20355
|
+
left: unref(rProps).style?.left
|
|
20356
|
+
})
|
|
20357
|
+
}, [
|
|
20358
|
+
createElementVNode("div", {
|
|
20359
|
+
ref_key: "rFixedViewRef",
|
|
20360
|
+
ref: rFixedViewRef,
|
|
20361
|
+
style: normalizeStyle({
|
|
20362
|
+
width: unref(rFixedBoxWidth),
|
|
20363
|
+
height: unref(rFixedBoxHeight)
|
|
20364
|
+
})
|
|
20365
|
+
}, [
|
|
20366
|
+
renderSlot(_ctx.$slots, "FixedBox", {
|
|
20367
|
+
boxWidth: unref(rFixedBoxWidth),
|
|
20368
|
+
boxHeight: unref(rFixedBoxHeight)
|
|
20369
|
+
}),
|
|
20370
|
+
createElementVNode("div", {
|
|
20371
|
+
ref_key: "rSliderViewRef",
|
|
20372
|
+
ref: rSliderViewRef,
|
|
20373
|
+
style: normalizeStyle({
|
|
20374
|
+
width: unref(rSliderWidth),
|
|
20375
|
+
height: unref(rSliderHeight)
|
|
20376
|
+
})
|
|
20377
|
+
}, [
|
|
20378
|
+
renderSlot(_ctx.$slots, "SliderBox", {
|
|
20379
|
+
boxWidth: unref(rSliderWidth),
|
|
20380
|
+
boxHeight: unref(rSliderHeight)
|
|
20381
|
+
})
|
|
20382
|
+
], 4)
|
|
20383
|
+
], 4)
|
|
20384
|
+
], 4);
|
|
20385
|
+
};
|
|
20386
|
+
}
|
|
20387
|
+
});
|
|
20388
|
+
|
|
20389
|
+
//
|
|
20390
|
+
// utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue;
|
|
20391
|
+
//
|
|
20392
|
+
/* <!--
|
|
20393
|
+
* 【模块 export 内容】
|
|
20394
|
+
* JsvScrollBox:Vue高阶组件,支持触控拖动的滚动型组件。
|
|
20395
|
+
* props说明:
|
|
20396
|
+
* style {Object} (必填,响应式) 其中的width/height为必填项目, 决定scroll固定的底座的尺寸
|
|
20397
|
+
* sliderSize {Object} (必填,响应式) 滑动区域的尺寸,滑块的尺寸在非滑动方向不能大于组件尺寸
|
|
20398
|
+
* {
|
|
20399
|
+
* width {number}, 当VERTICAL滑动模式时为选填,HORIZONTAL为必填
|
|
20400
|
+
* height {number}, 当HORIZONTAL滑动模式时为选填,VERTICAL为必填
|
|
20401
|
+
* }
|
|
20402
|
+
* mode {ScrollStyle.DrawerMode/ScrollStyle.PinMode}
|
|
20403
|
+
* 选填, 非响应式, 默认为 PinMode
|
|
20404
|
+
* 运动模式选择, DrawerMode: 抽屉模式,内容尺寸大于固定底座
|
|
20405
|
+
* PinMode: 滚动杆模式,内容尺寸小于固定底座
|
|
20406
|
+
* direction {import VERTICAL/HORIZONTAL} (必填,非响应式) 滑动方向
|
|
20407
|
+
* enableFling {boolean} (选填,非响应式) 是否需要支持fling,默认为false
|
|
20408
|
+
* initPercent {Number} (选填,非响应式) 滑块起始位置,等同于mount后进行updatePercent()
|
|
20409
|
+
*
|
|
20410
|
+
* template说明:
|
|
20411
|
+
* FfixedBox={boxWidth, boxHeight}: 以本组件底座左上角0,0对齐的一个slot
|
|
20412
|
+
* SliderBox={boxWidth, boxHeight}: 以滑块div的左上角0,0对齐的一个slot,
|
|
20413
|
+
*
|
|
20414
|
+
* expose函数说明:
|
|
20415
|
+
* setSensor(sensitivity:number, callback:Function<percent:number, x:number, y:number>) 设置运动后触发的回调
|
|
20416
|
+
* sensitivity为回调敏感度, 每移动多少像素进行回调,适当放大(推荐10以上)可以极大减小对js回调过多引起的性能降低
|
|
20417
|
+
* updatePercent(percent:number) 设置滚动调位置(百分比),百分比 = (SliderTop - 底座Top) / Slider可滑动总区域
|
|
20418
|
+
* Slider可滑动总区域 = 底座Height - SliderHeight
|
|
20419
|
+
* 当为横向运动时,Top被Left代换,Height被Width代换
|
|
20420
|
+
* syncWith(otherScrollBox: JsvScrollBox, syncMode: ScrollStyle)
|
|
20421
|
+
* 本滚动条的进度跟随给定的滚动条的进度移动
|
|
20422
|
+
* otherScrollBox: 控制者
|
|
20423
|
+
* syncMode: 同步模式,有 SyncParallel, SyncRevert
|
|
20424
|
+
* addSubSync(view: div|JsvNinePatch, syncMode: ScrollStyle)
|
|
20425
|
+
* 将外部的div或者JsvNinePatch加入到同步尺寸同步改动器中。
|
|
20426
|
+
* view只能是div或者JsvNinePatch, 并且不能有style.animation的控制
|
|
20427
|
+
* 当SyncParallel模式时, 这个div的初始位置要和本组件的0,0对齐
|
|
20428
|
+
* 当SyncRevert模式时, 这个div的初始位置要和本组件尾部位置(0, height/width)对齐
|
|
20429
|
+
*
|
|
20430
|
+
*
|
|
20431
|
+
-->
|
|
20432
|
+
|
|
20433
|
+
|
|
20434
|
+
|
|
20435
|
+
|
|
20436
|
+
|
|
20437
|
+
|
|
20438
|
+
*/
|
|
20439
|
+
|
|
20440
|
+
//
|
|
20441
|
+
// utils/JsViewVueWidget/JsvScrollBox/index.js;
|
|
20442
|
+
//
|
|
20443
|
+
|
|
19781
20444
|
//
|
|
19782
20445
|
// utils/JsViewVueWidget/index.js;
|
|
19783
20446
|
//
|
|
@@ -19786,4 +20449,4 @@ const _sfc_main = {
|
|
|
19786
20449
|
// utils/index.js;
|
|
19787
20450
|
//
|
|
19788
20451
|
|
|
19789
|
-
export { BaseDispatcher, DECORATE_BORDER_RADIUS, DECORATE_NINEPATCH_ALPHA_MIX, DebugObjectRefer, DebugTools, DebugWrap81ErrorStack, DebugWrap81WarnStack, DefaultKeyCodeMap, EdgeDirection, FixPositionSlide, FocusMoveType, FreeMoveDef, FreeMoveFunc, HORIZONTAL, InputType, instance as JSBridge, JsvAccount, _sfc_main$
|
|
20452
|
+
export { BaseDispatcher, DECORATE_BORDER_RADIUS, DECORATE_NINEPATCH_ALPHA_MIX, DebugObjectRefer, DebugTools, DebugWrap81ErrorStack, DebugWrap81WarnStack, DefaultKeyCodeMap, EdgeDirection, FixPositionSlide, FocusMoveType, ForgeConst, FreeMoveDef, FreeMoveFunc, HORIZONTAL, InputType, instance as JSBridge, JsvAccount, _sfc_main$A as JsvActorMove, JsvActorMoveControl, _JsvApic$1 as JsvApic, _JsvApic2$1 as JsvApic2, _sfc_main$D as JsvAudio, _sfc_main$4 as JsvConnectLine, _sfc_main$2 as JsvEnableRenderBreak, _sfc_main$y as JsvEnvBlocker, JsvFederationTools, _sfc_main$j as JsvFilterView, _sfc_main$x as JsvFlexDiv, _sfc_main$F as JsvFocusBlock, _sfc_main$z as JsvFreeMoveActor, _sfc_main$z as JsvFreeMoveDiv, JsvGrid, _sfc_main$g as JsvHole, JsvInput, _sfc_main$B as JsvLatex, JsvLine, _sfc_main$f as JsvMarquee, JsvMaskClipDiv, _sfc_main$1 as JsvMindMap, _sfc_main$g as JsvNativeSharedDiv, _sfc_main$h as JsvNinePatch, JsvPerformance, _sfc_main$5 as JsvPieChart, _sfc_main$d as JsvPosterDiv, _sfc_main$c as JsvPosterImage, exportObj as JsvPreDownloader, JsvPreload, _sfc_main$3 as JsvProgressBar, _JsvQrcode$1 as JsvQrcode, _sfc_main$9 as JsvRadarChart, _sfc_main$8 as JsvRipple, JsvRippleShape, JsvScaleTextBox, _sfc_main as JsvScrollBox, _sfc_main$6 as JsvSector, JsvSoundPool, _JsvSpray$1 as JsvSpray, JsvSpriteAnim, _sfc_main$o as JsvSpriteLoader, JsvSpriteAnim as JsvSpriteStatic, JsvSpriteTools, JsvStyleClass, JsvStyleSheetsDeclarer, JsvSwiper, _sfc_main$l as JsvSwiper3D, _sfc_main$a as JsvTextBox, JsvTextStyleClass, _JsvTextureAnim$1 as JsvTextureAnim, sJsvTextureConst as JsvTextureConst, sTextureStoreApi as JsvTextureStoreApi, _sfc_main$g as JsvTransparentDiv, JsvVisibleSensor, LineType, _sfc_main$G as ListWidget, LoopType, METRO_WIDGET, METRO_WIDGET as METRO_WIDGET_CONST, _sfc_main$H as MetroWidget, PageType, RENDER_ITEM_BREAK_KEY, Dispatcher as SWidgetDispatcher, ScrollStyle, SeamlessSlide, _sfc_main$H as SimpleWidget, SlideSetting, SlideStyle, SpriteController, TexAlignAnchor, TextTools, TextureInstantType, VERTICAL, WholePageSlide, buildDownloadInfo, buildPreloadInfo, combinedStyles, createImpactAutoFroze, createImpactCallback, createImpactTracer, disableNativeViewListener, enableNativeViewListener, getCssStyleGroup, getCurFrameCount, getKeyFramesGroup, getMeasureObj, getPositionRelativeToView, getTextWidth, globalLoadJsvAudioPlugin, globalLoadJsvLatexPlugin, bridge as jJsvRuntimeBridge, jsvCreateFocusManager, jsvCreateHashHistory, numberCheckSet, toHtmlBorderSet, toNinePatchForgeViewSet, updateImpactAutoFroze, urlCheckSet, useFocusHub };
|