@shijiu/jsview-vue 2.1.482-test.0 → 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 +15 -7
- package/bin/jsview-vue.mjs +1734 -916
- package/bin/types/JsViewEngineWidget/CheckType.d.ts +3 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +102 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +88 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +10 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +16 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +14 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +158 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +158 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +46 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +21 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +46 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +21 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +48 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +16 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +17 -0
- package/bin/types/JsViewEngineWidget/RangeModel.d.ts +162 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +37 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/Fence.d.ts +58 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +15 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +91 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +22 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/index.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +143 -0
- package/bin/types/JsViewEngineWidget/index.d.ts +6 -0
- package/bin/types/JsViewPlugin/JsvAccount/JsvAccount.d.ts +42 -0
- package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +2 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +18 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +208 -0
- package/bin/types/JsViewPlugin/JsvAudio/CheckType.d.ts +2 -0
- package/bin/types/JsViewPlugin/JsvAudio/Events.d.ts +13 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +18 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +8 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +2 -0
- package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +1 -0
- package/bin/types/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvAudio/index.d.ts +3 -0
- package/bin/types/JsViewPlugin/JsvAudio/version.d.ts +10 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +1 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +13 -0
- package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +1 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +17 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +3 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +2 -0
- package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +1 -0
- package/bin/types/JsViewPlugin/JsvLatex/index.d.ts +3 -0
- package/bin/types/JsViewPlugin/JsvLatex/version.d.ts +10 -0
- package/bin/types/JsViewPlugin/index.d.ts +3 -0
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +2 -0
- package/bin/types/JsViewVueTools/DebugContentShellJBridge.d.ts +6 -0
- package/bin/types/JsViewVueTools/DebugTool.d.ts +8 -0
- package/bin/types/JsViewVueTools/DefaultKeyMap.d.ts +10 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +11 -0
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +6 -0
- package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +2 -0
- package/bin/types/JsViewVueTools/JsvDynamicCssStyle.d.ts +14 -0
- package/bin/types/JsViewVueTools/JsvDynamicKeyFrames.d.ts +21 -0
- package/bin/types/JsViewVueTools/JsvHashHistory.d.ts +16 -0
- package/bin/types/JsViewVueTools/JsvImpactTracer.d.ts +40 -0
- package/bin/types/JsViewVueTools/JsvRefTaker.d.ts +27 -0
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +279 -0
- package/bin/types/JsViewVueTools/JsvStyleClass.d.ts +31 -0
- package/bin/types/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +15 -0
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +37 -0
- package/bin/types/JsViewVueTools/JsvTextureDefines.d.ts +6 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +95 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +15 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +75 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +24 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Store.d.ts +10 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +23 -0
- package/bin/types/JsViewVueTools/NinePatchHelper.d.ts +21 -0
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +2 -0
- package/bin/types/JsViewVueTools/index.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +31 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +64 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +33 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +15 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +50 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +23 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +3 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +7 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +12 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +5 -0
- package/bin/types/{jsview-vue-common.d.mts → JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts} +12 -13
- package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +51 -0
- package/bin/types/JsViewVueWidget/JsvFilterView.vue.d.ts +72 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +72 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +2 -0
- 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 +78 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +84 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/NexusNode.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 +12 -0
- package/bin/types/JsViewVueWidget/JsvGrid.vue.d.ts +168 -0
- package/bin/types/JsViewVueWidget/JsvHole.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +36 -0
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +210 -0
- package/bin/types/JsViewVueWidget/JsvInput/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +12 -0
- package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +12 -0
- package/bin/types/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +83 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/CommonType.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/Constant.d.ts +9 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/DataTree.d.ts +69 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/Geometry.d.ts +68 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +145 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/rtree.d.ts +40 -0
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +69 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +9 -0
- package/bin/types/JsViewVueWidget/JsvPosterDiv.vue.d.ts +60 -0
- package/bin/types/JsViewVueWidget/JsvPosterImage.vue.d.ts +75 -0
- package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +10 -0
- package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +12 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +11 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +60 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +84 -0
- package/bin/types/JsViewVueWidget/JsvRipple/index.d.ts +3 -0
- package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +10 -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/JsvSector.vue.d.ts +10 -0
- package/bin/types/JsViewVueWidget/JsvSoundPool.d.ts +84 -0
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +38 -0
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +69 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +11 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/index.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +209 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +97 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +75 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +151 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +107 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +84 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/index.d.ts +84 -0
- package/bin/types/JsViewVueWidget/index.d.ts +38 -0
- package/bin/types/index.d.ts +4 -0
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/tools/config/tsconfig.json +6 -6
- package/tools/jsview-vue-build.mjs +13 -4
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +7 -4
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +28 -6
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +568 -369
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +4 -3
- 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/MetroWidget/VisibleInfo.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +21 -21
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +13 -7
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +35 -45
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +6 -6
- package/utils/JsViewEngineWidget/WidgetCommon.ts +34 -5
- 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 +166 -48
- 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 +58 -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/JsvMindMap/JsvMindMap.vue +1 -1
- package/utils/JsViewVueWidget/JsvMindMap/rtree.js +1 -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 +24 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +27 -9
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +2 -0
- package/utils/JsViewVueWidget/index.js +1 -0
- package/bin/types/browser/BrowserApic.vue.d.mts +0 -33
- package/bin/types/browser/BrowserApic2.vue.d.mts +0 -16
- package/bin/types/browser/BrowserApicLib.d.mts +0 -56
- package/bin/types/browser/BrowserAudio.vue.d.mts +0 -2
- package/bin/types/browser/BrowserJsvLatex.vue.d.mts +0 -55
- package/bin/types/browser/BrowserPreload.vue.d.mts +0 -14
- package/bin/types/browser/BrowserQrcode.vue.d.mts +0 -29
- package/bin/types/browser/BrowserSpray.vue.d.mts +0 -2
- package/bin/types/browser/BrowserTextureAnim.vue.d.mts +0 -2
- package/bin/types/export-sfc.d.mts +0 -2
- package/bin/types/jsview-vue.d.mts +0 -2511
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,9 +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,
|
|
144
|
+
headRange = void 0,
|
|
145
|
+
tailRange = void 0,
|
|
146
|
+
headSafeArea = 0.1,
|
|
147
|
+
tailSafeArea = 0.1,
|
|
135
148
|
speed = defaultSpeed,
|
|
136
149
|
duration = null,
|
|
137
150
|
easing = defaultEasing,
|
|
@@ -141,6 +154,19 @@ class SeamlessSlide extends SlideSetting {
|
|
|
141
154
|
super(SlideSetting.Type.SEAMLESS, speed, duration, easing, boundaryProtect);
|
|
142
155
|
this.StartPercent = startPercent;
|
|
143
156
|
this.EndPercent = endPercent;
|
|
157
|
+
if (typeof headRange !== "undefined") {
|
|
158
|
+
this.StartPercent = headRange;
|
|
159
|
+
}
|
|
160
|
+
if (typeof tailRange !== "undefined") {
|
|
161
|
+
this.EndPercent = 1 - tailRange;
|
|
162
|
+
}
|
|
163
|
+
if (this.StartPercent < 0 || this.StartPercent > 1 || this.EndPercent < 0 || this.EndPercent > 1) {
|
|
164
|
+
console.error(`SeamlessSlideSetting error: invalide value, startPercent(${this.StartPercent}) and endPercent(${this.EndPercent}) must between 0 and 1.`);
|
|
165
|
+
this.StartPercent = 0.3;
|
|
166
|
+
this.EndPercent = 0.7;
|
|
167
|
+
}
|
|
168
|
+
this.HeadSafeArea = headSafeArea;
|
|
169
|
+
this.TailSafeArea = tailSafeArea;
|
|
144
170
|
this.FixFirstPage = fixFirstPage;
|
|
145
171
|
}
|
|
146
172
|
}
|
|
@@ -381,6 +407,50 @@ const METRO_WIDGET = {
|
|
|
381
407
|
}
|
|
382
408
|
};
|
|
383
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
|
+
|
|
384
454
|
//
|
|
385
455
|
// utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts;
|
|
386
456
|
//
|
|
@@ -571,49 +641,39 @@ class MetroTemplate {
|
|
|
571
641
|
if (itemObj.uid) {
|
|
572
642
|
this.uidMap[itemObj.uid] = item;
|
|
573
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
|
+
});
|
|
574
651
|
return item;
|
|
575
652
|
}
|
|
576
653
|
getBoundingBoxSize() {
|
|
577
654
|
const lastItem = this.templateList[this.templateList.length - 1];
|
|
578
|
-
if (
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
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
|
+
}
|
|
583
667
|
} else {
|
|
584
668
|
return {
|
|
585
|
-
|
|
586
|
-
|
|
669
|
+
width: 0,
|
|
670
|
+
height: 0
|
|
587
671
|
};
|
|
588
672
|
}
|
|
589
673
|
}
|
|
590
674
|
getTailItemIndex() {
|
|
591
675
|
return this.tailItemIndex;
|
|
592
676
|
}
|
|
593
|
-
cacheLayout(start, end) {
|
|
594
|
-
if (typeof end == "undefined") {
|
|
595
|
-
end = this.templateList.length;
|
|
596
|
-
}
|
|
597
|
-
end = Math.min(end, this.templateList.length);
|
|
598
|
-
for (let i = start; i < end; ++i) {
|
|
599
|
-
let item = this.templateList[i];
|
|
600
|
-
item.layoutCache = {
|
|
601
|
-
left: item.left,
|
|
602
|
-
top: item.top,
|
|
603
|
-
width: item.width,
|
|
604
|
-
height: item.height
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
this.cachedLayoutRange.push([start, end]);
|
|
608
|
-
}
|
|
609
|
-
cleanLayoutCache() {
|
|
610
|
-
for (let r of this.cachedLayoutRange) {
|
|
611
|
-
for (let i = r[0]; i < r[1]; ++i) {
|
|
612
|
-
this.templateList[i].layoutCache = null;
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
this.cachedLayoutRange = [];
|
|
616
|
-
}
|
|
617
677
|
static getTemplateItem(itemObj) {
|
|
618
678
|
const valid = this.checkMeasureObject(itemObj);
|
|
619
679
|
if (!valid) {
|
|
@@ -654,7 +714,7 @@ class MetroTemplate {
|
|
|
654
714
|
top: -1,
|
|
655
715
|
bottom: -1
|
|
656
716
|
},
|
|
657
|
-
layoutCache:
|
|
717
|
+
layoutCache: new RectCache()
|
|
658
718
|
};
|
|
659
719
|
}
|
|
660
720
|
static checkMeasureObject(obj) {
|
|
@@ -2199,6 +2259,13 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
2199
2259
|
}
|
|
2200
2260
|
for (let i of needChangeList) {
|
|
2201
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
|
+
});
|
|
2202
2269
|
}
|
|
2203
2270
|
}
|
|
2204
2271
|
}
|
|
@@ -2292,6 +2359,23 @@ class PageUpdater {
|
|
|
2292
2359
|
}
|
|
2293
2360
|
}
|
|
2294
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
|
+
|
|
2295
2379
|
//
|
|
2296
2380
|
// utils/JsViewEngineWidget/MetroWidget/RenderItem.ts;
|
|
2297
2381
|
//
|
|
@@ -2402,7 +2486,7 @@ class RenderItem {
|
|
|
2402
2486
|
this.divMountedCallback.clear();
|
|
2403
2487
|
if (this.enableTap && this.rootDiv) {
|
|
2404
2488
|
const divView = this.rootDiv.jsvGetProxyView();
|
|
2405
|
-
divView.DragEnables?.(
|
|
2489
|
+
divView.DragEnables?.(ForgeConst.DragFlags.TOUCH_RECV_CLICK_BIT);
|
|
2406
2490
|
}
|
|
2407
2491
|
}
|
|
2408
2492
|
onDivUnmounted() {
|
|
@@ -2417,7 +2501,10 @@ class RenderItem {
|
|
|
2417
2501
|
class VisibleInfo {
|
|
2418
2502
|
_start = 0;
|
|
2419
2503
|
range = 0;
|
|
2420
|
-
padding
|
|
2504
|
+
padding = {
|
|
2505
|
+
start: 0,
|
|
2506
|
+
end: 0
|
|
2507
|
+
};
|
|
2421
2508
|
_startMax = 0;
|
|
2422
2509
|
set start(value) {
|
|
2423
2510
|
this._start = value;
|
|
@@ -2722,6 +2809,18 @@ class ConditionPackBuilder {
|
|
|
2722
2809
|
this._CommonInfoValid = false;
|
|
2723
2810
|
return this._BuildPack(ConditionSetBuilder.OnFlingCancel(this._CommonInfo, this._ContorlSlefNexus.token));
|
|
2724
2811
|
}
|
|
2812
|
+
onFlingDrop() {
|
|
2813
|
+
if (!this._CheckCommonInfo()) {
|
|
2814
|
+
return null;
|
|
2815
|
+
}
|
|
2816
|
+
this._CommonInfoValid = false;
|
|
2817
|
+
return this._BuildPack(ConditionSetBuilder.OnFlingDrop(this._CommonInfo, this._ContorlSlefNexus.token));
|
|
2818
|
+
}
|
|
2819
|
+
/**
|
|
2820
|
+
* touchCount
|
|
2821
|
+
* 当touchDown时,Count会++,用于解决多次touchDown引发的时序问题
|
|
2822
|
+
* 当native的count计数等于给定的参数设定的count时,触发condition
|
|
2823
|
+
*/
|
|
2725
2824
|
touchCount(count) {
|
|
2726
2825
|
if (!this._CheckCommonInfo()) {
|
|
2727
2826
|
return null;
|
|
@@ -2729,6 +2828,46 @@ class ConditionPackBuilder {
|
|
|
2729
2828
|
this._CommonInfoValid = false;
|
|
2730
2829
|
return this._BuildPack(ConditionSetBuilder.TouchCount(this._CommonInfo, count));
|
|
2731
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
|
+
}
|
|
2732
2871
|
_CheckCommonInfo() {
|
|
2733
2872
|
if (!this._CommonInfoValid) {
|
|
2734
2873
|
console.error("Error: must call from new conditoin()");
|
|
@@ -3035,6 +3174,28 @@ class ActorPackBuilder {
|
|
|
3035
3174
|
cmdList.push(isExact ? ActionCmdBuilder.StopMovingExact() : ActionCmdBuilder.StopMoving());
|
|
3036
3175
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
3037
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
|
+
}
|
|
3038
3199
|
_BuildAccelOnPole(builderThis, cmdList, nexusRecv, onRevertX, onRevertY) {
|
|
3039
3200
|
if (nexusRecv || onRevertX || onRevertY) {
|
|
3040
3201
|
cmdList.push(
|
|
@@ -3169,6 +3330,59 @@ class StatePackBuilder {
|
|
|
3169
3330
|
fireNexusEvent(nexusRecv, detailEventType) {
|
|
3170
3331
|
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(detailEventType, nexusRecv.token));
|
|
3171
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
|
+
}
|
|
3172
3386
|
}
|
|
3173
3387
|
|
|
3174
3388
|
//
|
|
@@ -3177,9 +3391,9 @@ class StatePackBuilder {
|
|
|
3177
3391
|
class CallbackInfo {
|
|
3178
3392
|
funcRef;
|
|
3179
3393
|
// 回调函数
|
|
3180
|
-
times;
|
|
3394
|
+
times = 0;
|
|
3181
3395
|
// 回调的次数
|
|
3182
|
-
once;
|
|
3396
|
+
once = false;
|
|
3183
3397
|
// 是否单次回调就销毁
|
|
3184
3398
|
}
|
|
3185
3399
|
class CallbackManager {
|
|
@@ -3259,6 +3473,7 @@ class ActorControl {
|
|
|
3259
3473
|
_BindAnim;
|
|
3260
3474
|
_Callbacks;
|
|
3261
3475
|
_SelfNexusRecv;
|
|
3476
|
+
_SizeMode = false;
|
|
3262
3477
|
_SharedQuickConditionPackBuilder;
|
|
3263
3478
|
_SharedQuickActionPackBuilder;
|
|
3264
3479
|
_StatePackBuilder;
|
|
@@ -3271,6 +3486,13 @@ class ActorControl {
|
|
|
3271
3486
|
this._SharedQuickActionPackBuilder = new ActorPackBuilder(this._Callbacks, this._SelfNexusRecv);
|
|
3272
3487
|
this._StatePackBuilder = new StatePackBuilder();
|
|
3273
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
|
+
}
|
|
3274
3496
|
// debugGetAnimId() {
|
|
3275
3497
|
// return this._BindAnim?.AnimNativeId;
|
|
3276
3498
|
// }
|
|
@@ -3355,6 +3577,14 @@ class ActorControl {
|
|
|
3355
3577
|
state() {
|
|
3356
3578
|
return this._StatePackBuilder;
|
|
3357
3579
|
}
|
|
3580
|
+
getBindedAnim() {
|
|
3581
|
+
this._EnsureAnim();
|
|
3582
|
+
return this._BindAnim;
|
|
3583
|
+
}
|
|
3584
|
+
getBindedView() {
|
|
3585
|
+
this._EnsureAnim();
|
|
3586
|
+
return this._BindView;
|
|
3587
|
+
}
|
|
3358
3588
|
_OnEchoEvent(retJson) {
|
|
3359
3589
|
let retJsonObject = JSON.parse(retJson);
|
|
3360
3590
|
let echoRetList = retJsonObject["retList"];
|
|
@@ -3370,7 +3600,11 @@ class ActorControl {
|
|
|
3370
3600
|
}
|
|
3371
3601
|
_EnsureAnim() {
|
|
3372
3602
|
if (!this._BindAnim) {
|
|
3373
|
-
this._BindAnim = new FreeMoveAnimClass(
|
|
3603
|
+
this._BindAnim = new FreeMoveAnimClass(
|
|
3604
|
+
this._OnEchoEvent.bind(this),
|
|
3605
|
+
this._SelfNexusRecv.token,
|
|
3606
|
+
this._SizeMode
|
|
3607
|
+
);
|
|
3374
3608
|
this._BindView.StartAnimation(this._BindAnim);
|
|
3375
3609
|
}
|
|
3376
3610
|
}
|
|
@@ -3394,7 +3628,7 @@ class SlideAnimWrapper {
|
|
|
3394
3628
|
} else if (typeof setting.speed == "number") {
|
|
3395
3629
|
duration = Math.round(Math.max(Math.abs(to[0] - from[0]), Math.abs(to[1] - from[1])) / setting.speed);
|
|
3396
3630
|
}
|
|
3397
|
-
this.forgeAnim = new Forge$
|
|
3631
|
+
this.forgeAnim = new Forge$2.TranslateAnimation(
|
|
3398
3632
|
from[0],
|
|
3399
3633
|
to[0],
|
|
3400
3634
|
from[1],
|
|
@@ -3403,7 +3637,7 @@ class SlideAnimWrapper {
|
|
|
3403
3637
|
setting.easing
|
|
3404
3638
|
);
|
|
3405
3639
|
this.forgeAnim.SetAnimationListener(
|
|
3406
|
-
new Forge$
|
|
3640
|
+
new Forge$2.AnimationListener(this.onStart.bind(this), this.onEnd.bind(this), null)
|
|
3407
3641
|
);
|
|
3408
3642
|
}
|
|
3409
3643
|
start() {
|
|
@@ -3429,7 +3663,7 @@ class AnimationManager {
|
|
|
3429
3663
|
animList = [];
|
|
3430
3664
|
frameCount = 0;
|
|
3431
3665
|
startSlideAnim(element, from, to, setting) {
|
|
3432
|
-
let curFrameCount = Forge$
|
|
3666
|
+
let curFrameCount = Forge$2.sFrameCount.count;
|
|
3433
3667
|
if (curFrameCount != this.frameCount) {
|
|
3434
3668
|
this.tryCleanOldAnim();
|
|
3435
3669
|
this.frameCount = curFrameCount;
|
|
@@ -3438,7 +3672,7 @@ class AnimationManager {
|
|
|
3438
3672
|
this.animList.push(obj);
|
|
3439
3673
|
obj.start();
|
|
3440
3674
|
return () => {
|
|
3441
|
-
if (obj.getFrameCount() == Forge$
|
|
3675
|
+
if (obj.getFrameCount() == Forge$2.sFrameCount.count) {
|
|
3442
3676
|
obj.removeListener();
|
|
3443
3677
|
}
|
|
3444
3678
|
obj.stop();
|
|
@@ -3472,33 +3706,65 @@ class CancellableRunner {
|
|
|
3472
3706
|
}
|
|
3473
3707
|
}
|
|
3474
3708
|
var TaskType = /* @__PURE__ */ ((TaskType2) => {
|
|
3475
|
-
TaskType2[TaskType2["RESIZE_ITEM"] =
|
|
3476
|
-
TaskType2[TaskType2["SLIDE"] =
|
|
3477
|
-
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";
|
|
3478
3712
|
return TaskType2;
|
|
3479
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 || {});
|
|
3480
3721
|
class TaskManager {
|
|
3481
3722
|
constructor(onAddTask) {
|
|
3482
3723
|
this.onAddTask = onAddTask;
|
|
3483
3724
|
}
|
|
3484
3725
|
frameCount = -1;
|
|
3485
|
-
widgetTaskCacheList = [];
|
|
3486
3726
|
cancellableRunnerList = [];
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
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();
|
|
3490
3741
|
this.cancellableRunnerList = [];
|
|
3491
|
-
this.frameCount = Forge$
|
|
3742
|
+
this.frameCount = Forge$2.sFrameCount.count;
|
|
3492
3743
|
}
|
|
3493
3744
|
this.cancellableRunnerList.forEach((t) => {
|
|
3494
3745
|
t.cancel();
|
|
3495
3746
|
});
|
|
3496
|
-
|
|
3747
|
+
const tObj = {
|
|
3497
3748
|
type,
|
|
3749
|
+
subType: subtype,
|
|
3498
3750
|
params,
|
|
3499
|
-
frameCount: Forge$
|
|
3500
|
-
}
|
|
3501
|
-
|
|
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);
|
|
3502
3768
|
}
|
|
3503
3769
|
run(func) {
|
|
3504
3770
|
const cancellableRunner = new CancellableRunner(func);
|
|
@@ -3564,6 +3830,16 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3564
3830
|
DRAG: 2,
|
|
3565
3831
|
FLING: 3
|
|
3566
3832
|
};
|
|
3833
|
+
let innerKeepTraceRange = 0;
|
|
3834
|
+
if (typeof props.keepTraceRange == "number" && props.keepTraceRange > 0) {
|
|
3835
|
+
innerKeepTraceRange = props.keepTraceRange;
|
|
3836
|
+
} else {
|
|
3837
|
+
if (props.touchFlag > 0) {
|
|
3838
|
+
innerKeepTraceRange = 3;
|
|
3839
|
+
} else {
|
|
3840
|
+
innerKeepTraceRange = 0;
|
|
3841
|
+
}
|
|
3842
|
+
}
|
|
3567
3843
|
const modeForExport = ref(FOCUS_MODE);
|
|
3568
3844
|
const mode = {
|
|
3569
3845
|
_mode: FOCUS_MODE,
|
|
@@ -3616,7 +3892,6 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3616
3892
|
let preEdgeRect = null;
|
|
3617
3893
|
let isFocus = false;
|
|
3618
3894
|
let vertical = props.direction == VERTICAL;
|
|
3619
|
-
let preAnchorItemIndex = -1;
|
|
3620
3895
|
let templateItemAdder = null;
|
|
3621
3896
|
let permanentItemList = [];
|
|
3622
3897
|
let mounted = false;
|
|
@@ -3625,8 +3900,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3625
3900
|
let childSlideEventLock = false;
|
|
3626
3901
|
let onKeyDownLock = false;
|
|
3627
3902
|
let visibleInfo = new VisibleInfo();
|
|
3628
|
-
let preSlideDirection = 0;
|
|
3629
3903
|
let alreadyCallItemFocus = false;
|
|
3904
|
+
let innerSlideSetting = props.slideSetting;
|
|
3630
3905
|
const currentFocusIndex = ref(0);
|
|
3631
3906
|
const DEFAULT_ANIMATION_DURATION = 200;
|
|
3632
3907
|
const isItemVisible = (item) => {
|
|
@@ -3634,106 +3909,158 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3634
3909
|
let size_key = vertical ? "height" : "width";
|
|
3635
3910
|
return item.templateInfo[pos_key] >= visibleInfo.start && item.templateInfo[pos_key] + item.templateInfo[size_key] - 1 < visibleInfo.end;
|
|
3636
3911
|
};
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
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) => {
|
|
3640
3919
|
let resizeTaskMap = {};
|
|
3641
|
-
let slideTask = null;
|
|
3642
3920
|
let minIndex = Infinity;
|
|
3643
|
-
let slideInfo = null;
|
|
3644
3921
|
let mergeTmp = false;
|
|
3645
3922
|
let anchorInfo = null;
|
|
3646
|
-
let duration = 200;
|
|
3647
|
-
let easing = null;
|
|
3648
3923
|
let pos_key = vertical ? "top" : "left";
|
|
3649
3924
|
let size_key = vertical ? "height" : "width";
|
|
3650
|
-
let doAnim = false;
|
|
3651
|
-
let existOnFocusChange = false;
|
|
3652
3925
|
let targetVisibleStart = visibleInfo.start;
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
if (task.type == TaskType.RESIZE_ITEM) {
|
|
3664
|
-
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) => {
|
|
3665
3936
|
resizeTaskMap[task.params.index] = task;
|
|
3666
|
-
resizeList.push(task);
|
|
3667
3937
|
const { index, animInfo } = task.params;
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
if (index == id2Index(focusId) && typeof animInfo?.anchor != "undefined") {
|
|
3673
|
-
const item = getItemByIndex(index);
|
|
3674
|
-
anchorInfo = {
|
|
3675
|
-
anchorPosition: item.templateInfo[pos_key] + item.templateInfo[size_key] * animInfo.anchor - 1 - targetVisibleStart,
|
|
3676
|
-
anchor: animInfo.anchor
|
|
3677
|
-
};
|
|
3938
|
+
if (animInfo) {
|
|
3939
|
+
resizeAnimInfo.doAnim = true;
|
|
3940
|
+
resizeAnimInfo.duration = animInfo.duration ?? resizeAnimInfo.duration;
|
|
3941
|
+
resizeAnimInfo.easing = animInfo.duration ?? "";
|
|
3678
3942
|
}
|
|
3679
|
-
|
|
3680
|
-
existOnFocusChange = true;
|
|
3681
|
-
}
|
|
3682
|
-
}
|
|
3683
|
-
if (slideTask) {
|
|
3684
|
-
slideInfo = {
|
|
3685
|
-
target: slideTask.params.target,
|
|
3686
|
-
animObj: slideTask.params.animObj
|
|
3687
|
-
};
|
|
3688
|
-
}
|
|
3689
|
-
let existItemResize = false;
|
|
3690
|
-
if (resizeList.length > 0) {
|
|
3691
|
-
existItemResize = true;
|
|
3692
|
-
if (templateCacheFrameCount != Forge$1.sFrameCount.count) {
|
|
3693
|
-
metroTemplate.cacheLayout(minIndex, minIndex + 20);
|
|
3694
|
-
templateCacheFrameCount = Forge$1.sFrameCount.count;
|
|
3695
|
-
}
|
|
3696
|
-
resizeList.forEach((task) => {
|
|
3943
|
+
minIndex = Math.min(minIndex, index);
|
|
3697
3944
|
metroTemplate.updateItemSize(task.params.index, {
|
|
3698
3945
|
width: task.params.width,
|
|
3699
3946
|
height: task.params.height
|
|
3700
3947
|
});
|
|
3701
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) {
|
|
3702
4027
|
if (anchorInfo) {
|
|
3703
4028
|
const focusItem = getItemById(focusId);
|
|
3704
4029
|
const start = focusItem.templateInfo[pos_key] + focusItem.templateInfo[size_key] * anchorInfo.anchor - 1 - anchorInfo.anchorPosition;
|
|
3705
|
-
targetVisibleStart = normalizeVisibleStart(start, focusItem.templateInfo);
|
|
4030
|
+
targetVisibleStart = normalizeVisibleStart(start, focusItem.templateInfo, focusItem.templateInfo.index);
|
|
3706
4031
|
} else {
|
|
3707
|
-
|
|
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
|
+
}
|
|
3708
4045
|
}
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
if (
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
if (slideTask) {
|
|
3722
|
-
slideInfo.animObj = slideTask.params?.animObj;
|
|
3723
|
-
} else {
|
|
3724
|
-
slideInfo.animObj = {
|
|
3725
|
-
//resize无动画时正常slide
|
|
3726
|
-
easing: "",
|
|
3727
|
-
onStart: null,
|
|
3728
|
-
onEnd: null,
|
|
3729
|
-
speed: props.slideSetting.Speed,
|
|
3730
|
-
duration: props.slideSetting.Duration
|
|
3731
|
-
};
|
|
3732
|
-
}
|
|
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
|
+
});
|
|
3733
4058
|
}
|
|
3734
4059
|
}
|
|
3735
4060
|
}
|
|
4061
|
+
let needSlide = false;
|
|
3736
4062
|
if (targetVisibleStart != visibleInfo.start) {
|
|
4063
|
+
needSlide = true;
|
|
3737
4064
|
taskManager.run(() => {
|
|
3738
4065
|
const preVisibleStart = visibleInfo.start;
|
|
3739
4066
|
visibleInfo.start = targetVisibleStart;
|
|
@@ -3746,8 +4073,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3746
4073
|
taskManager.run(() => {
|
|
3747
4074
|
updateHandler = pageUpdater.update(
|
|
3748
4075
|
metroTemplate,
|
|
3749
|
-
visibleInfo.startWithPadding -
|
|
3750
|
-
visibleInfo.endWithPadding +
|
|
4076
|
+
visibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
4077
|
+
visibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
3751
4078
|
focusId,
|
|
3752
4079
|
mergeTmp,
|
|
3753
4080
|
permanentItemList
|
|
@@ -3758,45 +4085,57 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3758
4085
|
});
|
|
3759
4086
|
if (resizeList.length > 0) {
|
|
3760
4087
|
updateHandler.applyTmp();
|
|
3761
|
-
if (doAnim) {
|
|
4088
|
+
if (resizeAnimInfo.doAnim) {
|
|
3762
4089
|
const visibleIndexList = Array.from(pageUpdater.getTmpRange());
|
|
3763
4090
|
for (let index of visibleIndexList) {
|
|
3764
4091
|
const renderItem = getItemByIndex(index);
|
|
3765
4092
|
const { left, top } = renderItem.templateInfo;
|
|
3766
4093
|
if (index >= minIndex) {
|
|
3767
|
-
const layoutCache = renderItem.templateInfo.layoutCache;
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
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;
|
|
3787
4117
|
});
|
|
3788
|
-
|
|
3789
|
-
});
|
|
4118
|
+
}
|
|
3790
4119
|
}
|
|
3791
4120
|
}
|
|
3792
4121
|
}
|
|
3793
4122
|
}
|
|
3794
4123
|
}
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
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);
|
|
3798
4137
|
}
|
|
3799
|
-
if (
|
|
4138
|
+
if (resizeList.length > 0 && props.onAllItemResizeDone) {
|
|
3800
4139
|
taskManager.run(() => {
|
|
3801
4140
|
const handler = setTimeout(() => {
|
|
3802
4141
|
props.onAllItemResizeDone();
|
|
@@ -3806,7 +4145,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3806
4145
|
};
|
|
3807
4146
|
});
|
|
3808
4147
|
}
|
|
3809
|
-
if ((
|
|
4148
|
+
if ((needSlide || allTask.focus.length > 0) && props.onFocusRectChange) {
|
|
3810
4149
|
taskManager.run(() => {
|
|
3811
4150
|
const handler = setTimeout(() => {
|
|
3812
4151
|
props.onFocusRectChange();
|
|
@@ -3817,21 +4156,20 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3817
4156
|
});
|
|
3818
4157
|
}
|
|
3819
4158
|
};
|
|
3820
|
-
const taskManager = new TaskManager(
|
|
4159
|
+
const taskManager = new TaskManager(onAddTask);
|
|
3821
4160
|
const animationManager = new AnimationManager();
|
|
3822
|
-
const executeSlide = (
|
|
4161
|
+
const executeSlide = (target, animObj, updateHandler) => {
|
|
3823
4162
|
let preLeft = slideDivLeft.value;
|
|
3824
4163
|
let preTop = slideDivTop.value;
|
|
3825
4164
|
taskManager.run(() => {
|
|
3826
|
-
slideDivLeft.value = vertical ? 0 : -
|
|
3827
|
-
slideDivTop.value = vertical ? -
|
|
4165
|
+
slideDivLeft.value = vertical ? 0 : -target;
|
|
4166
|
+
slideDivTop.value = vertical ? -target : 0;
|
|
3828
4167
|
return () => {
|
|
3829
4168
|
slideDivLeft.value = preLeft;
|
|
3830
4169
|
slideDivTop.value = preTop;
|
|
3831
4170
|
};
|
|
3832
4171
|
});
|
|
3833
|
-
|
|
3834
|
-
if (slideInfo.animObj) {
|
|
4172
|
+
if (animObj) {
|
|
3835
4173
|
updateHandler.applyTmp();
|
|
3836
4174
|
taskManager.run(() => {
|
|
3837
4175
|
const from = vertical ? [0, preTop - slideDivTop.value] : [preLeft - slideDivLeft.value, 0];
|
|
@@ -3840,7 +4178,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3840
4178
|
from,
|
|
3841
4179
|
[0, 0],
|
|
3842
4180
|
{
|
|
3843
|
-
...
|
|
4181
|
+
...animObj,
|
|
3844
4182
|
onEnd: () => {
|
|
3845
4183
|
updateHandler.apply();
|
|
3846
4184
|
}
|
|
@@ -3861,25 +4199,26 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
3861
4199
|
clearTimeout(handler);
|
|
3862
4200
|
};
|
|
3863
4201
|
});
|
|
3864
|
-
return viewSlid;
|
|
3865
4202
|
};
|
|
3866
4203
|
const updateItemSize = (index, newSize, animInfo) => {
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
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
|
+
);
|
|
3880
4221
|
}
|
|
3881
|
-
;
|
|
3882
|
-
taskManager.addTask(TaskType.SLIDE, { target: -target, animObj, updateParam });
|
|
3883
4222
|
};
|
|
3884
4223
|
let callFocusAfterUpdate = false;
|
|
3885
4224
|
const _onFocusChange = (id) => {
|
|
@@ -4074,22 +4413,6 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4074
4413
|
const setEnterFocusRect = (rect) => {
|
|
4075
4414
|
enterFocusRect = rect;
|
|
4076
4415
|
};
|
|
4077
|
-
const slideTo = (position, doAnim) => {
|
|
4078
|
-
tryCancelDelayLoad();
|
|
4079
|
-
templateItemAdder.tryAddItemByPosition(position);
|
|
4080
|
-
if (typeof position !== "undefined" && position != null) {
|
|
4081
|
-
let animObj = null;
|
|
4082
|
-
if (doAnim) {
|
|
4083
|
-
animObj = {
|
|
4084
|
-
easing: props.slideSetting.Easing,
|
|
4085
|
-
onStart: null,
|
|
4086
|
-
speed: props.slideSetting.Speed,
|
|
4087
|
-
duration: props.slideSetting.Duration
|
|
4088
|
-
};
|
|
4089
|
-
}
|
|
4090
|
-
_slideTo(position, animObj);
|
|
4091
|
-
}
|
|
4092
|
-
};
|
|
4093
4416
|
const setZIndex = (index, normalZIndex, focusZIndex) => {
|
|
4094
4417
|
const targetItem = getItemByIndex(index);
|
|
4095
4418
|
if (targetItem) {
|
|
@@ -4100,41 +4423,60 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4100
4423
|
setItemZIndex(targetItem, focused ? f : n, focused);
|
|
4101
4424
|
}
|
|
4102
4425
|
};
|
|
4103
|
-
const
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
if (targetItem) {
|
|
4107
|
-
const direction = index - preAnchorItemIndex >= 0 ? 1 : -1;
|
|
4108
|
-
const visible_start = _calculateVisibleStart(targetItem.templateInfo, direction);
|
|
4109
|
-
slideTo(visible_start, doAnim);
|
|
4426
|
+
const slideToInner = (position, doAnim, updateParam = { mergeTmp: false }) => {
|
|
4427
|
+
if (slideLock || position == (vertical ? slideDivTop.value : slideDivLeft.value)) {
|
|
4428
|
+
return;
|
|
4110
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);
|
|
4436
|
+
}
|
|
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);
|
|
4111
4452
|
};
|
|
4112
4453
|
const slideToDiv = (div, doAnim) => {
|
|
4113
|
-
|
|
4454
|
+
slideToDivInner(div, doAnim);
|
|
4455
|
+
};
|
|
4456
|
+
const slideToDivInner = (div, doAnim, direction = void 0) => {
|
|
4114
4457
|
if (div) {
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
}
|
|
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
|
+
);
|
|
4138
4480
|
}
|
|
4139
4481
|
};
|
|
4140
4482
|
const refreshData = (force_update) => {
|
|
@@ -4204,15 +4546,21 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4204
4546
|
}
|
|
4205
4547
|
const updater = pageUpdater.update(
|
|
4206
4548
|
metroTemplate,
|
|
4207
|
-
visibleInfo.startWithPadding -
|
|
4208
|
-
visibleInfo.endWithPadding +
|
|
4549
|
+
visibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
4550
|
+
visibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
4209
4551
|
focusId,
|
|
4210
4552
|
false,
|
|
4211
4553
|
permanentItemList
|
|
4212
4554
|
);
|
|
4213
4555
|
updater.apply();
|
|
4214
4556
|
onItemFocus(getItemById(focusId), null);
|
|
4215
|
-
|
|
4557
|
+
let targetRect = mRectCache.getCurRect() ?? mRectCache.getPreRect();
|
|
4558
|
+
if (targetRect) {
|
|
4559
|
+
slideToRect(targetRect, false);
|
|
4560
|
+
} else {
|
|
4561
|
+
slideToItem(id2Index(focusId), false);
|
|
4562
|
+
}
|
|
4563
|
+
updateTouchBoxCondition();
|
|
4216
4564
|
};
|
|
4217
4565
|
const getVisibleItems = () => {
|
|
4218
4566
|
const [visibleStart, visibleEnd] = metroTemplate.getVisibleItemList(
|
|
@@ -4258,6 +4606,13 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4258
4606
|
const unlockSlide = () => {
|
|
4259
4607
|
slideLock = false;
|
|
4260
4608
|
};
|
|
4609
|
+
const setSlideSetting = (setting) => {
|
|
4610
|
+
if (!setting) {
|
|
4611
|
+
innerSlideSetting = props.slideSetting;
|
|
4612
|
+
} else {
|
|
4613
|
+
innerSlideSetting = setting;
|
|
4614
|
+
}
|
|
4615
|
+
};
|
|
4261
4616
|
const exportObject = {
|
|
4262
4617
|
lockSlide,
|
|
4263
4618
|
unlockSlide,
|
|
@@ -4278,7 +4633,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4278
4633
|
getCustomerDataSize,
|
|
4279
4634
|
getCurrentFocusIndex,
|
|
4280
4635
|
getCurMode,
|
|
4281
|
-
getTemplatePosition
|
|
4636
|
+
getTemplatePosition,
|
|
4637
|
+
setSlideSetting
|
|
4282
4638
|
};
|
|
4283
4639
|
const _calculateNearestItemByRect = (visibleSet, enter_rect_info) => {
|
|
4284
4640
|
let edge_direction = enter_rect_info.direction;
|
|
@@ -4466,6 +4822,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4466
4822
|
metroTemplate.getTailItemIndex()
|
|
4467
4823
|
)?.templateInfo;
|
|
4468
4824
|
if (lastTemplateInfo) {
|
|
4825
|
+
let preTouchW = touchDivSize.width;
|
|
4826
|
+
let preTouchH = touchDivSize.height;
|
|
4469
4827
|
if (vertical) {
|
|
4470
4828
|
touchDivSize.width = props.width;
|
|
4471
4829
|
touchDivSize.height = lastTemplateInfo.top + lastTemplateInfo.height - 1;
|
|
@@ -4473,7 +4831,9 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4473
4831
|
touchDivSize.width = lastTemplateInfo.left + lastTemplateInfo.width - 1;
|
|
4474
4832
|
touchDivSize.height = props.height;
|
|
4475
4833
|
}
|
|
4476
|
-
|
|
4834
|
+
if (preTouchW !== touchDivSize.width || preTouchH !== touchDivSize.height) {
|
|
4835
|
+
updateTouchBoxCondition();
|
|
4836
|
+
}
|
|
4477
4837
|
}
|
|
4478
4838
|
};
|
|
4479
4839
|
const _onTemplateItemAdd = (customerData, templateItem, measuresObj) => {
|
|
@@ -4588,16 +4948,11 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4588
4948
|
index: id2Index(focusId)
|
|
4589
4949
|
}
|
|
4590
4950
|
};
|
|
4591
|
-
let cur_slide = _calculateVisibleStart(fakeItem.templateInfo, direction);
|
|
4951
|
+
let cur_slide = _calculateVisibleStart(fakeItem.templateInfo, direction, fakeItem.templateInfo, visibleInfo);
|
|
4592
4952
|
if (cur_slide != visibleInfo.start) {
|
|
4593
|
-
|
|
4953
|
+
slideToInner(
|
|
4594
4954
|
cur_slide,
|
|
4595
|
-
|
|
4596
|
-
easing: "",
|
|
4597
|
-
onStart: null,
|
|
4598
|
-
speed: props.slideSetting.Speed,
|
|
4599
|
-
duration: props.slideSetting.Duration
|
|
4600
|
-
},
|
|
4955
|
+
true,
|
|
4601
4956
|
{
|
|
4602
4957
|
mergeTmp: true
|
|
4603
4958
|
}
|
|
@@ -4609,7 +4964,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4609
4964
|
};
|
|
4610
4965
|
const _changeFocusId = (id, cache_pre = true) => {
|
|
4611
4966
|
preFocusId = cache_pre ? focusId : -1;
|
|
4612
|
-
focusId = id;
|
|
4967
|
+
focusId = id >= 0 && id < metroTemplate.size ? id : 0;
|
|
4613
4968
|
currentFocusIndex.value = id2Index(id);
|
|
4614
4969
|
taskManager.addTask(TaskType.ON_FOCUS_CHANGE);
|
|
4615
4970
|
};
|
|
@@ -4685,27 +5040,23 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4685
5040
|
}
|
|
4686
5041
|
onItemBlur(preFocusItem);
|
|
4687
5042
|
onItemFocus(next_focus_item, preEdgeRect);
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
permanentItemList
|
|
4706
|
-
);
|
|
4707
|
-
updater.applyTmp();
|
|
4708
|
-
}
|
|
5043
|
+
if (next_focus_item.itemConfig.itemSlide == METRO_WIDGET.ITEM_SLIDE.ACT_ITEM_FOCUS) {
|
|
5044
|
+
slideToItemInner(
|
|
5045
|
+
next_focus_item.index,
|
|
5046
|
+
true,
|
|
5047
|
+
vertical ? vertical_direction : horizontal_direction,
|
|
5048
|
+
preFocusItem
|
|
5049
|
+
);
|
|
5050
|
+
} else {
|
|
5051
|
+
const updater = pageUpdater.update(
|
|
5052
|
+
metroTemplate,
|
|
5053
|
+
visibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
5054
|
+
visibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
5055
|
+
next_focus_item.id,
|
|
5056
|
+
false,
|
|
5057
|
+
permanentItemList
|
|
5058
|
+
);
|
|
5059
|
+
updater.applyTmp();
|
|
4709
5060
|
}
|
|
4710
5061
|
} else {
|
|
4711
5062
|
let x_off_set = vertical ? 0 : visibleInfo.start;
|
|
@@ -4750,101 +5101,155 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4750
5101
|
});
|
|
4751
5102
|
}
|
|
4752
5103
|
};
|
|
4753
|
-
const normalizeVisibleStart = (origin,
|
|
5104
|
+
const normalizeVisibleStart = (origin, targetRect = void 0, index = void 0) => {
|
|
4754
5105
|
let pos_key = vertical ? "top" : "left";
|
|
4755
5106
|
let size_key = vertical ? "height" : "width";
|
|
4756
|
-
let
|
|
4757
|
-
if ((
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
5107
|
+
let visibleStart = origin;
|
|
5108
|
+
if ((innerSlideSetting.BoundaryProtect & SlideSetting.START_PROTECT) > 0) {
|
|
5109
|
+
if (visibleInfo.start >= 0) {
|
|
5110
|
+
let boundary = 0;
|
|
5111
|
+
const headTemplateInfo = getItemByIndex(0).templateInfo;
|
|
5112
|
+
if (targetRect && (!headTemplateInfo.focusable || index == headTemplateInfo.index) && targetRect[pos_key] + targetRect[size_key] <= visibleInfo.range) {
|
|
5113
|
+
boundary = headTemplateInfo[size_key];
|
|
5114
|
+
}
|
|
5115
|
+
visibleStart = visibleStart < boundary ? 0 : visibleStart;
|
|
5116
|
+
} else {
|
|
5117
|
+
visibleStart = visibleStart < visibleInfo.start ? visibleInfo.start : visibleStart;
|
|
4762
5118
|
}
|
|
4763
|
-
visible_start = visible_start < boundary ? 0 : visible_start;
|
|
4764
5119
|
}
|
|
4765
|
-
if ((
|
|
5120
|
+
if ((innerSlideSetting.BoundaryProtect & SlideSetting.END_PROTECT) > 0) {
|
|
4766
5121
|
let lastTemplateInfo = getItemByIndex(metroTemplate.getTailItemIndex()).templateInfo;
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
5122
|
+
const lastEnd = lastTemplateInfo[pos_key] + lastTemplateInfo[size_key];
|
|
5123
|
+
const lastVisibleStart = Math.max(lastEnd - visibleInfo.range, 0);
|
|
5124
|
+
if (visibleInfo.end <= lastEnd) {
|
|
5125
|
+
let boundary = lastVisibleStart;
|
|
5126
|
+
if (targetRect && (!lastTemplateInfo.focusable || index == lastTemplateInfo.index) && targetRect[pos_key] - lastVisibleStart >= 0) {
|
|
5127
|
+
boundary = lastTemplateInfo[pos_key] - visibleInfo.range;
|
|
5128
|
+
}
|
|
5129
|
+
visibleStart = visibleStart > boundary ? lastVisibleStart : visibleStart;
|
|
5130
|
+
} else {
|
|
5131
|
+
visibleStart = visibleStart > visibleInfo.start ? visibleInfo.start : visibleStart;
|
|
4772
5132
|
}
|
|
4773
|
-
visible_start = visible_start > boundary ? last_visible_start : visible_start;
|
|
4774
5133
|
}
|
|
4775
|
-
return
|
|
5134
|
+
return visibleStart;
|
|
4776
5135
|
};
|
|
4777
|
-
const
|
|
4778
|
-
|
|
5136
|
+
const mRectCache = new RectCache();
|
|
5137
|
+
const _calculateVisibleStart = (targetRect, _direction, templateInfo, visibleInfo2, preInfo = null) => {
|
|
5138
|
+
if (!targetRect) {
|
|
4779
5139
|
console.error("MetroWidget: _calculateVisibleStart target item is null");
|
|
4780
5140
|
return 0;
|
|
4781
5141
|
}
|
|
4782
|
-
|
|
4783
|
-
|
|
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();
|
|
5151
|
+
if (preInfo) {
|
|
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;
|
|
5158
|
+
}
|
|
4784
5159
|
let pos_key = vertical ? "top" : "left";
|
|
4785
5160
|
let size_key = vertical ? "height" : "width";
|
|
4786
5161
|
let center_key = vertical ? "centerYPos" : "centerXPos";
|
|
4787
|
-
let new_visible_start =
|
|
5162
|
+
let new_visible_start = visibleInfo2.start;
|
|
4788
5163
|
let needCalculate = true;
|
|
4789
|
-
switch (
|
|
5164
|
+
switch (innerSlideSetting.Type) {
|
|
4790
5165
|
case SlideSetting.Type.FIX_POSITION:
|
|
4791
|
-
if (
|
|
4792
|
-
if (
|
|
5166
|
+
if (innerSlideSetting.FixFirstPage) {
|
|
5167
|
+
if (targetRect[pos_key] + targetRect[size_key] - 1 < visibleInfo2.range) {
|
|
4793
5168
|
new_visible_start = 0;
|
|
4794
5169
|
needCalculate = false;
|
|
4795
5170
|
}
|
|
4796
5171
|
}
|
|
4797
5172
|
if (needCalculate) {
|
|
4798
5173
|
new_visible_start = Math.ceil(
|
|
4799
|
-
|
|
5174
|
+
targetRect[pos_key] + targetRect[size_key] / 2 - visibleInfo2.range * innerSlideSetting.FixPercent
|
|
4800
5175
|
);
|
|
4801
5176
|
}
|
|
4802
5177
|
break;
|
|
4803
5178
|
case SlideSetting.Type.WHOLE_PAGE:
|
|
4804
|
-
if (typeof
|
|
5179
|
+
if (!templateInfo || typeof templateInfo.pageHeadIndex == "undefined") {
|
|
4805
5180
|
console.error(
|
|
4806
5181
|
"child controlled whole page slide type is not supported."
|
|
4807
5182
|
);
|
|
4808
5183
|
} else {
|
|
4809
|
-
new_visible_start = getItemByIndex(
|
|
5184
|
+
new_visible_start = getItemByIndex(templateInfo.pageHeadIndex).templateInfo[pos_key];
|
|
4810
5185
|
}
|
|
4811
5186
|
break;
|
|
4812
5187
|
case SlideSetting.Type.SEAMLESS:
|
|
4813
|
-
if (
|
|
4814
|
-
if (
|
|
5188
|
+
if (innerSlideSetting.FixFirstPage) {
|
|
5189
|
+
if (targetRect[pos_key] + targetRect[size_key] - 1 < visibleInfo2.range) {
|
|
4815
5190
|
new_visible_start = 0;
|
|
4816
5191
|
needCalculate = false;
|
|
4817
5192
|
}
|
|
4818
5193
|
}
|
|
4819
5194
|
if (needCalculate) {
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
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);
|
|
5214
|
+
}
|
|
4830
5215
|
}
|
|
4831
|
-
}
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
} else
|
|
4835
|
-
|
|
5216
|
+
}
|
|
5217
|
+
if (itemEnd > rect1Start) {
|
|
5218
|
+
if (target1 > rect1End) {
|
|
5219
|
+
} else {
|
|
5220
|
+
if (direction >= 0) {
|
|
5221
|
+
rect1Result = visibleInfo2.start + (itemEnd - target1);
|
|
5222
|
+
}
|
|
4836
5223
|
}
|
|
4837
5224
|
}
|
|
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
|
+
}
|
|
5232
|
+
}
|
|
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
|
+
}
|
|
4838
5243
|
}
|
|
4839
5244
|
}
|
|
4840
5245
|
break;
|
|
4841
5246
|
default:
|
|
4842
5247
|
console.error(
|
|
4843
5248
|
"MetroWidget: undefined slide type",
|
|
4844
|
-
|
|
5249
|
+
innerSlideSetting.Type
|
|
4845
5250
|
);
|
|
4846
5251
|
}
|
|
4847
|
-
new_visible_start = normalizeVisibleStart(new_visible_start,
|
|
5252
|
+
new_visible_start = normalizeVisibleStart(new_visible_start, targetRect, templateInfo?.index);
|
|
4848
5253
|
return Math.round(new_visible_start);
|
|
4849
5254
|
};
|
|
4850
5255
|
const _onFocusableItemEdge = (edge_info) => {
|
|
@@ -4894,17 +5299,27 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4894
5299
|
onItemBlur(getItemById(preFocusId));
|
|
4895
5300
|
props.onBlur?.();
|
|
4896
5301
|
isFocus = false;
|
|
5302
|
+
mRectCache.clean();
|
|
4897
5303
|
};
|
|
4898
5304
|
const _updatePage = (rangeSet) => {
|
|
5305
|
+
let cur = id2Index(focusId);
|
|
5306
|
+
if (cur >= 0) {
|
|
5307
|
+
rangeSet.add(cur);
|
|
5308
|
+
}
|
|
4899
5309
|
const tmpArray = Array.from(rangeSet);
|
|
4900
|
-
|
|
5310
|
+
let newArray = tmpArray.map((item) => {
|
|
4901
5311
|
return getItemByIndex(item);
|
|
4902
5312
|
});
|
|
5313
|
+
const newItemList = newArray.filter((i) => {
|
|
5314
|
+
return !renderData.value?.includes(i);
|
|
5315
|
+
});
|
|
5316
|
+
renderData.value = newArray;
|
|
4903
5317
|
if (props.enableItemRenderBreak) {
|
|
4904
5318
|
itemRender.value = false;
|
|
4905
|
-
|
|
5319
|
+
const f = () => {
|
|
4906
5320
|
itemRender.value = true;
|
|
4907
|
-
}
|
|
5321
|
+
};
|
|
5322
|
+
nextTick(f);
|
|
4908
5323
|
}
|
|
4909
5324
|
};
|
|
4910
5325
|
const _getVisibleFocusableItem = () => {
|
|
@@ -4943,7 +5358,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4943
5358
|
let divPos = -1;
|
|
4944
5359
|
let frameCount = -1;
|
|
4945
5360
|
const getVisibleStart = (moveInfo) => {
|
|
4946
|
-
if (frameCount != Forge$
|
|
5361
|
+
if (frameCount != Forge$2.sFrameCount.count) {
|
|
4947
5362
|
divPos = vertical ? slideDivTop.value : slideDivLeft.value;
|
|
4948
5363
|
}
|
|
4949
5364
|
if (vertical) {
|
|
@@ -4952,6 +5367,17 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4952
5367
|
return -(divPos + Math.round(moveInfo.xPos));
|
|
4953
5368
|
}
|
|
4954
5369
|
};
|
|
5370
|
+
const getTouchCount = (nexusCustomData) => {
|
|
5371
|
+
let touchCount = -1;
|
|
5372
|
+
if (nexusCustomData) {
|
|
5373
|
+
try {
|
|
5374
|
+
touchCount = JSON.parse(nexusCustomData).tc;
|
|
5375
|
+
} catch (e) {
|
|
5376
|
+
touchCount = -1;
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
return touchCount;
|
|
5380
|
+
};
|
|
4955
5381
|
const mergeTouchSlideToSlideDiv = (touchCount) => {
|
|
4956
5382
|
if (vertical) {
|
|
4957
5383
|
slideDivTop.value = -visibleInfo.start;
|
|
@@ -4974,6 +5400,12 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4974
5400
|
]);
|
|
4975
5401
|
};
|
|
4976
5402
|
const onTouchDown = (data, customData, nexusCustomData) => {
|
|
5403
|
+
touchRecorder.reset();
|
|
5404
|
+
let touchCount = getTouchCount(nexusCustomData);
|
|
5405
|
+
touchRecorder.setTouchCount(touchCount);
|
|
5406
|
+
if (mode.getMode() == FOCUS_MODE) {
|
|
5407
|
+
updateTouchBoxCondition();
|
|
5408
|
+
}
|
|
4977
5409
|
mode.touchStart();
|
|
4978
5410
|
mode.flingEnd();
|
|
4979
5411
|
const t = 100;
|
|
@@ -4991,14 +5423,14 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
4991
5423
|
templateItemAdder.tryAddItemByPosition(visibleInfo.end + visibleInfo.range);
|
|
4992
5424
|
const updater = pageUpdater.update(
|
|
4993
5425
|
metroTemplate,
|
|
4994
|
-
visibleInfo.startWithPadding -
|
|
4995
|
-
visibleInfo.endWithPadding +
|
|
5426
|
+
visibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
5427
|
+
visibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
4996
5428
|
0,
|
|
4997
5429
|
false,
|
|
4998
5430
|
permanentItemList
|
|
4999
5431
|
);
|
|
5000
5432
|
updater.apply();
|
|
5001
|
-
const anchorArea = 2 * Forge$
|
|
5433
|
+
const anchorArea = 2 * Forge$2.sRenderBridge.GetScreenInfo().designedWidth;
|
|
5002
5434
|
let anchorPosList = [];
|
|
5003
5435
|
let anchorSpacing = visibleInfo.range * 2 / 3;
|
|
5004
5436
|
let anchorPos = anchorSpacing;
|
|
@@ -5008,7 +5440,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5008
5440
|
anchorPos += anchorSpacing;
|
|
5009
5441
|
}
|
|
5010
5442
|
const reachConditionList = anchorPosList.map((pos) => {
|
|
5011
|
-
actorController.condition(reachAnchorGroup).reachPosition(pos, void 0).then([(data2) => {
|
|
5443
|
+
return actorController.condition(reachAnchorGroup).reachPosition(pos, void 0).then([(data2) => {
|
|
5012
5444
|
updateRenderItems(true, true);
|
|
5013
5445
|
}]);
|
|
5014
5446
|
});
|
|
@@ -5021,9 +5453,17 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5021
5453
|
if (mode.getTouchState() == TouchState.TAP) {
|
|
5022
5454
|
updateRenderItems(false, false);
|
|
5023
5455
|
mode.touchEnd();
|
|
5456
|
+
} else {
|
|
5457
|
+
if (touchRecorder.moved && !mode.duringFling()) {
|
|
5458
|
+
mergeTouchSlideToSlideDiv(touchRecorder.touchCount);
|
|
5459
|
+
updateRenderItems(false, false);
|
|
5460
|
+
mode.touchEnd();
|
|
5461
|
+
}
|
|
5024
5462
|
}
|
|
5025
5463
|
};
|
|
5464
|
+
const exportOnTouchRelease = props.touchFlag > 0 ? onTouchRelease : void 0;
|
|
5026
5465
|
const onDragStart = (data, customData, nexusCustomData) => {
|
|
5466
|
+
touchRecorder.move();
|
|
5027
5467
|
mode.dragStart();
|
|
5028
5468
|
visibleInfo.start = getVisibleStart(data);
|
|
5029
5469
|
};
|
|
@@ -5032,19 +5472,9 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5032
5472
|
actorController.run([
|
|
5033
5473
|
actorController.state().removeConditionByGroup(reachAnchorGroup)
|
|
5034
5474
|
]);
|
|
5035
|
-
let touchCount = -1;
|
|
5036
|
-
if (nexusCustomData) {
|
|
5037
|
-
try {
|
|
5038
|
-
touchCount = JSON.parse(nexusCustomData).tc;
|
|
5039
|
-
} catch (e) {
|
|
5040
|
-
touchCount = -1;
|
|
5041
|
-
}
|
|
5042
|
-
}
|
|
5043
|
-
mergeTouchSlideToSlideDiv(touchCount);
|
|
5044
|
-
updateRenderItems(false, false);
|
|
5045
|
-
mode.touchEnd();
|
|
5046
5475
|
};
|
|
5047
5476
|
const onFlingStart = (data, customData, nexusCustomData) => {
|
|
5477
|
+
touchRecorder.move();
|
|
5048
5478
|
mode.flingStart();
|
|
5049
5479
|
visibleInfo.start = getVisibleStart(data);
|
|
5050
5480
|
updateRenderItems(true, true);
|
|
@@ -5056,20 +5486,16 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5056
5486
|
const onFlingEnd = (data, customData, nexusCustomData) => {
|
|
5057
5487
|
visibleInfo.start = getVisibleStart(data);
|
|
5058
5488
|
if (mode.duringFling()) {
|
|
5059
|
-
let touchCount =
|
|
5060
|
-
if (nexusCustomData) {
|
|
5061
|
-
try {
|
|
5062
|
-
touchCount = JSON.parse(nexusCustomData).tc;
|
|
5063
|
-
} catch (e) {
|
|
5064
|
-
touchCount = -1;
|
|
5065
|
-
}
|
|
5066
|
-
}
|
|
5489
|
+
let touchCount = getTouchCount(nexusCustomData);
|
|
5067
5490
|
mergeTouchSlideToSlideDiv(touchCount);
|
|
5068
5491
|
updateRenderItems(false, false);
|
|
5069
5492
|
mode.flingEnd();
|
|
5070
5493
|
mode.touchEnd();
|
|
5071
5494
|
}
|
|
5072
5495
|
};
|
|
5496
|
+
const onFlingDrop = (data, customData, nexusCustomData) => {
|
|
5497
|
+
visibleInfo.start = getVisibleStart(data);
|
|
5498
|
+
};
|
|
5073
5499
|
const getTouchWall = () => {
|
|
5074
5500
|
const boxSize = metroTemplate.getBoundingBoxSize();
|
|
5075
5501
|
let wall = {
|
|
@@ -5081,9 +5507,15 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5081
5507
|
if (vertical) {
|
|
5082
5508
|
wall.top = -boxSize.height + props.height - slideDivTop.value;
|
|
5083
5509
|
wall.bottom = -slideDivTop.value;
|
|
5510
|
+
if (wall.top > wall.bottom) {
|
|
5511
|
+
wall.top = wall.bottom;
|
|
5512
|
+
}
|
|
5084
5513
|
} else {
|
|
5085
5514
|
wall.left = -boxSize.width + props.width - slideDivLeft.value;
|
|
5086
5515
|
wall.right = -slideDivLeft.value;
|
|
5516
|
+
if (wall.left > wall.right) {
|
|
5517
|
+
wall.left = wall.right;
|
|
5518
|
+
}
|
|
5087
5519
|
}
|
|
5088
5520
|
return wall;
|
|
5089
5521
|
};
|
|
@@ -5091,15 +5523,15 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5091
5523
|
templateItemAdder.tryAddItemByPosition(visibleInfo.start + visibleInfo.range);
|
|
5092
5524
|
const updater = pageUpdater.update(
|
|
5093
5525
|
metroTemplate,
|
|
5094
|
-
visibleInfo.startWithPadding -
|
|
5095
|
-
visibleInfo.endWithPadding +
|
|
5526
|
+
visibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
5527
|
+
visibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
5096
5528
|
0,
|
|
5097
5529
|
true,
|
|
5098
5530
|
permanentItemList
|
|
5099
5531
|
);
|
|
5100
5532
|
applyTmp ? updater.applyTmp() : updater.apply();
|
|
5101
5533
|
};
|
|
5102
|
-
const
|
|
5534
|
+
const updateTouchBoxCondition = () => {
|
|
5103
5535
|
if (actorController != null) {
|
|
5104
5536
|
const walls = getTouchWall();
|
|
5105
5537
|
actorController.run([
|
|
@@ -5109,22 +5541,36 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5109
5541
|
]);
|
|
5110
5542
|
}
|
|
5111
5543
|
};
|
|
5544
|
+
const touchRecorder = {
|
|
5545
|
+
moved: false,
|
|
5546
|
+
touchCount: -1,
|
|
5547
|
+
reset: function() {
|
|
5548
|
+
this.moved = false;
|
|
5549
|
+
this.touchCount = -1;
|
|
5550
|
+
},
|
|
5551
|
+
move: function() {
|
|
5552
|
+
this.moved = true;
|
|
5553
|
+
},
|
|
5554
|
+
setTouchCount: function(count) {
|
|
5555
|
+
this.touchCount = count;
|
|
5556
|
+
}
|
|
5557
|
+
};
|
|
5112
5558
|
const initTouch = () => {
|
|
5113
5559
|
actorController = new ActorControl();
|
|
5114
5560
|
const divView = touchDiv.value.jsvGetProxyView();
|
|
5115
5561
|
actorController.bindForgeView(divView, true);
|
|
5116
|
-
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
|
+
);
|
|
5117
5565
|
const walls = getTouchWall();
|
|
5118
5566
|
actorController.run([
|
|
5119
5567
|
actorController.condition(void 0, true).onTouchDown().then([onTouchDown]),
|
|
5120
|
-
|
|
5121
|
-
// .condition(undefined, true)
|
|
5122
|
-
// .onDragStart()
|
|
5123
|
-
// .then([onDragStart]),
|
|
5568
|
+
actorController.condition(void 0, true).onDragStart().then([onDragStart]),
|
|
5124
5569
|
actorController.condition(void 0, true).onDragEnd().then([onDragEnd]),
|
|
5125
5570
|
actorController.condition(void 0, true).onFlingStart().then([onFlingStart]),
|
|
5126
5571
|
actorController.condition(void 0, true).onFlingProgress().then([onFlingProgress]),
|
|
5127
5572
|
actorController.condition(void 0, true).onFlingEnd().then([onFlingEnd]),
|
|
5573
|
+
actorController.condition(void 0, true).onFlingDrop().then([onFlingDrop]),
|
|
5128
5574
|
actorController.condition(void 0, true).onTouchRelease().then([actorController.state().touchLockSwitch(false, vertical ? 1 : 2)]),
|
|
5129
5575
|
actorController.condition(wallConditionGroup, true).boxPosition(walls.left, walls.top, walls.right, walls.bottom).then([actorController.state().setHitWallOverflow()])
|
|
5130
5576
|
//TODO 通过prop设置哪个方向overflow
|
|
@@ -5153,23 +5599,24 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5153
5599
|
templateItemAdder.tryAddItem(null, 2);
|
|
5154
5600
|
}
|
|
5155
5601
|
let init_focus_id = 0;
|
|
5156
|
-
let
|
|
5602
|
+
let initVisibleStart = 0;
|
|
5157
5603
|
if (typeof props.initFocusId == "number") {
|
|
5158
5604
|
templateItemAdder.tryAddItemById(props.initFocusId);
|
|
5159
5605
|
const item = getItemById(props.initFocusId);
|
|
5160
5606
|
if (item) {
|
|
5161
5607
|
init_focus_id = props.initFocusId;
|
|
5162
5608
|
if (item.itemConfig.itemSlide == METRO_WIDGET.ITEM_SLIDE.ACT_ITEM_FOCUS) {
|
|
5163
|
-
|
|
5609
|
+
initVisibleStart = _calculateVisibleStart(item.templateInfo, 0, item.templateInfo, visibleInfo);
|
|
5164
5610
|
}
|
|
5165
5611
|
}
|
|
5166
5612
|
}
|
|
5167
5613
|
focusId = init_focus_id;
|
|
5168
|
-
|
|
5614
|
+
let initVisibleInfo = visibleInfo.copy();
|
|
5615
|
+
initVisibleInfo.start = initVisibleStart;
|
|
5169
5616
|
const initUpdater = pageUpdater.update(
|
|
5170
5617
|
metroTemplate,
|
|
5171
|
-
|
|
5172
|
-
|
|
5618
|
+
initVisibleInfo.startWithPadding,
|
|
5619
|
+
initVisibleInfo.endWithPadding,
|
|
5173
5620
|
0,
|
|
5174
5621
|
false,
|
|
5175
5622
|
permanentItemList
|
|
@@ -5178,8 +5625,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5178
5625
|
const delayLoadHandler = setTimeout(() => {
|
|
5179
5626
|
const updateHandler = pageUpdater.update(
|
|
5180
5627
|
metroTemplate,
|
|
5181
|
-
|
|
5182
|
-
|
|
5628
|
+
initVisibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
5629
|
+
initVisibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
5183
5630
|
focusId,
|
|
5184
5631
|
false,
|
|
5185
5632
|
permanentItemList
|
|
@@ -5192,8 +5639,8 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5192
5639
|
onMounted(() => {
|
|
5193
5640
|
_changeFocusId(focusId, false);
|
|
5194
5641
|
mounted = true;
|
|
5195
|
-
if (
|
|
5196
|
-
|
|
5642
|
+
if (initVisibleStart) {
|
|
5643
|
+
slideToInner(initVisibleStart, false);
|
|
5197
5644
|
}
|
|
5198
5645
|
if (isFocus && !alreadyCallItemFocus) {
|
|
5199
5646
|
onItemFocus(getItemById(focusId), preEdgeRect);
|
|
@@ -5223,7 +5670,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5223
5670
|
exportObject,
|
|
5224
5671
|
setZIndex,
|
|
5225
5672
|
onTouchDown,
|
|
5226
|
-
onTouchRelease,
|
|
5673
|
+
onTouchRelease: exportOnTouchRelease,
|
|
5227
5674
|
currentFocusIndex,
|
|
5228
5675
|
modeForExport
|
|
5229
5676
|
};
|
|
@@ -5238,7 +5685,7 @@ const setup = (props, itemRender, locateDiv, renderData, slideDiv, slideDivLeft,
|
|
|
5238
5685
|
|
|
5239
5686
|
|
|
5240
5687
|
*/
|
|
5241
|
-
const _sfc_main$
|
|
5688
|
+
const _sfc_main$I = {
|
|
5242
5689
|
__name: "SlotComponent",
|
|
5243
5690
|
setup(__props) {
|
|
5244
5691
|
onBeforeUpdate(() => {
|
|
@@ -5292,7 +5739,16 @@ const _sfc_main$H = {
|
|
|
5292
5739
|
@constructor {Object} {speed, easing, boundProtect}
|
|
5293
5740
|
SeamlessSlide
|
|
5294
5741
|
@description 无缝滚动的设置类
|
|
5295
|
-
@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
|
+
* }
|
|
5296
5752
|
FixPositionSlide
|
|
5297
5753
|
@description 固定位置滚动的设置类
|
|
5298
5754
|
@constructor {Object} {fixPercent, speed, easing, boundProtect}
|
|
@@ -5329,6 +5785,7 @@ const _sfc_main$H = {
|
|
|
5329
5785
|
zIndex {int | object}: item的zIndex, 为object时可以分别设置{focus: 0, normal: 0}, 为number时则同时设置获焦和不获焦的zIndex,
|
|
5330
5786
|
uid {string}: item的uid, 可以通过uid来设置焦点
|
|
5331
5787
|
permanent {boolean}: 出去与是否保留
|
|
5788
|
+
enableTap {boolean}: 是否接受触控tap
|
|
5332
5789
|
}
|
|
5333
5790
|
*
|
|
5334
5791
|
* onFocus {function} 控件获取焦点的回调
|
|
@@ -5339,6 +5796,10 @@ const _sfc_main$H = {
|
|
|
5339
5796
|
"rect": 到达边缘时的区域{x: 0, y: 0, width: 0,height: 0}
|
|
5340
5797
|
}
|
|
5341
5798
|
onScroll {function} 滚动时的回调 (visibleStart, visibleRange, totalSize) => {}
|
|
5799
|
+
(TBD:
|
|
5800
|
+
当前版本暂时不支持触控过程的实时回调,
|
|
5801
|
+
由于回调js会严重拖慢性能,所以也不会设计实时回调,
|
|
5802
|
+
关于边缘的拖动进度展示,将来会有额外组件支撑)
|
|
5342
5803
|
visibleStart: 可视区域的起点
|
|
5343
5804
|
visibleRange: 可视区域大小(不含padding)
|
|
5344
5805
|
totalSize: 所有item的总长
|
|
@@ -5348,6 +5809,7 @@ const _sfc_main$H = {
|
|
|
5348
5809
|
* flingPageWidth {}
|
|
5349
5810
|
* flingPageEdge {}
|
|
5350
5811
|
* disableClip {boolean} 取消显示范围的clipView
|
|
5812
|
+
* touchFlag {int} 触控的开关, 0:关闭, 1:打开. 打开后支持drag, fling; item的tap则由measuresObject的enableTap控制
|
|
5351
5813
|
|
|
5352
5814
|
* methods:
|
|
5353
5815
|
getFocusBlockRef 获取此MetroWidget的 jsv-focus-block句柄,可以使用requestFocus完成获焦
|
|
@@ -5434,6 +5896,9 @@ const _sfc_main$H = {
|
|
|
5434
5896
|
@description 锁定滚动
|
|
5435
5897
|
unlockSlide
|
|
5436
5898
|
@description 取消锁定
|
|
5899
|
+
setSlideSetting
|
|
5900
|
+
@description 设置slideSetting
|
|
5901
|
+
@params { SlideSetting | null } setting 滚动设置, 为null时使用props.slideSetting
|
|
5437
5902
|
|
|
5438
5903
|
slots:
|
|
5439
5904
|
renderItem: 该slot用于描画每个单元格
|
|
@@ -5497,7 +5962,7 @@ const _sfc_main$H = {
|
|
|
5497
5962
|
|
|
5498
5963
|
|
|
5499
5964
|
*/
|
|
5500
|
-
const _sfc_main$
|
|
5965
|
+
const _sfc_main$H = {
|
|
5501
5966
|
__name: "MetroWidget",
|
|
5502
5967
|
props: {
|
|
5503
5968
|
padding: {
|
|
@@ -5610,7 +6075,7 @@ const _sfc_main$G = {
|
|
|
5610
6075
|
},
|
|
5611
6076
|
keepTraceRange: {
|
|
5612
6077
|
type: Number,
|
|
5613
|
-
default:
|
|
6078
|
+
default: -1
|
|
5614
6079
|
},
|
|
5615
6080
|
onScroll: {
|
|
5616
6081
|
type: Function
|
|
@@ -5684,6 +6149,10 @@ const _sfc_main$G = {
|
|
|
5684
6149
|
touchDivSize,
|
|
5685
6150
|
"common"
|
|
5686
6151
|
);
|
|
6152
|
+
let touchDivVOn = {};
|
|
6153
|
+
if (onTouchRelease) {
|
|
6154
|
+
touchDivVOn["jsv-touchend"] = onTouchRelease;
|
|
6155
|
+
}
|
|
5687
6156
|
expose(exportObject);
|
|
5688
6157
|
return (_ctx, _cache) => {
|
|
5689
6158
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
@@ -5712,15 +6181,14 @@ const _sfc_main$G = {
|
|
|
5712
6181
|
top: slideDivTop.value
|
|
5713
6182
|
})
|
|
5714
6183
|
}, [
|
|
5715
|
-
createElementVNode("div", {
|
|
6184
|
+
createElementVNode("div", mergeProps({
|
|
5716
6185
|
ref_key: "touchDiv",
|
|
5717
6186
|
ref: touchDiv,
|
|
5718
|
-
style:
|
|
6187
|
+
style: {
|
|
5719
6188
|
width: touchDivSize.width,
|
|
5720
6189
|
height: touchDivSize.height
|
|
5721
|
-
}
|
|
5722
|
-
|
|
5723
|
-
}, [
|
|
6190
|
+
}
|
|
6191
|
+
}, toHandlers(unref(touchDivVOn), true)), [
|
|
5724
6192
|
createElementVNode("div", null, [
|
|
5725
6193
|
renderSlot(_ctx.$slots, "background")
|
|
5726
6194
|
]),
|
|
@@ -5761,7 +6229,7 @@ const _sfc_main$G = {
|
|
|
5761
6229
|
ref: item.slotRef,
|
|
5762
6230
|
id: `${__props.name}_${index}`
|
|
5763
6231
|
}, [
|
|
5764
|
-
createVNode(_sfc_main$
|
|
6232
|
+
createVNode(_sfc_main$I, { key: "__QcodeJsviewFreezeComponent" }, {
|
|
5765
6233
|
default: withCtx(() => [
|
|
5766
6234
|
renderSlot(_ctx.$slots, "renderItem", {
|
|
5767
6235
|
data: item.customerData,
|
|
@@ -5789,7 +6257,7 @@ const _sfc_main$G = {
|
|
|
5789
6257
|
_: 3
|
|
5790
6258
|
}, 8, ["name", "onAction"])
|
|
5791
6259
|
], 512)
|
|
5792
|
-
],
|
|
6260
|
+
], 16),
|
|
5793
6261
|
createElementVNode("div", null, [
|
|
5794
6262
|
renderSlot(_ctx.$slots, "foreground")
|
|
5795
6263
|
])
|
|
@@ -5810,7 +6278,7 @@ const _sfc_main$G = {
|
|
|
5810
6278
|
|
|
5811
6279
|
|
|
5812
6280
|
*/
|
|
5813
|
-
const _sfc_main$
|
|
6281
|
+
const _sfc_main$G = {
|
|
5814
6282
|
__name: "ListWidget",
|
|
5815
6283
|
props: {
|
|
5816
6284
|
padding: {
|
|
@@ -5923,7 +6391,7 @@ const _sfc_main$F = {
|
|
|
5923
6391
|
},
|
|
5924
6392
|
keepTraceRange: {
|
|
5925
6393
|
type: Number,
|
|
5926
|
-
default:
|
|
6394
|
+
default: -1
|
|
5927
6395
|
},
|
|
5928
6396
|
onScroll: {
|
|
5929
6397
|
type: Function
|
|
@@ -5996,6 +6464,10 @@ const _sfc_main$F = {
|
|
|
5996
6464
|
touchDivSize,
|
|
5997
6465
|
"list"
|
|
5998
6466
|
);
|
|
6467
|
+
let touchDivVOn = {};
|
|
6468
|
+
if (onTouchRelease) {
|
|
6469
|
+
touchDivVOn["jsv-touchend"] = onTouchRelease;
|
|
6470
|
+
}
|
|
5999
6471
|
expose(exportObject);
|
|
6000
6472
|
return (_ctx, _cache) => {
|
|
6001
6473
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
@@ -6024,15 +6496,14 @@ const _sfc_main$F = {
|
|
|
6024
6496
|
top: slideDivTop.value
|
|
6025
6497
|
})
|
|
6026
6498
|
}, [
|
|
6027
|
-
createElementVNode("div", {
|
|
6499
|
+
createElementVNode("div", mergeProps({
|
|
6028
6500
|
ref_key: "touchDiv",
|
|
6029
6501
|
ref: touchDiv,
|
|
6030
|
-
style:
|
|
6502
|
+
style: {
|
|
6031
6503
|
width: touchDivSize.width,
|
|
6032
6504
|
height: touchDivSize.height
|
|
6033
|
-
}
|
|
6034
|
-
|
|
6035
|
-
}, [
|
|
6505
|
+
}
|
|
6506
|
+
}, toHandlers(unref(touchDivVOn), true)), [
|
|
6036
6507
|
createElementVNode("div", null, [
|
|
6037
6508
|
renderSlot(_ctx.$slots, "background")
|
|
6038
6509
|
]),
|
|
@@ -6096,7 +6567,7 @@ const _sfc_main$F = {
|
|
|
6096
6567
|
_: 3
|
|
6097
6568
|
}, 8, ["name", "onAction"])
|
|
6098
6569
|
], 512)
|
|
6099
|
-
],
|
|
6570
|
+
], 16),
|
|
6100
6571
|
createElementVNode("div", null, [
|
|
6101
6572
|
renderSlot(_ctx.$slots, "foreground")
|
|
6102
6573
|
])
|
|
@@ -6257,7 +6728,7 @@ const HUB_NS_PROVIDE_NAME = "__jsvFocusNameSpace__";
|
|
|
6257
6728
|
|
|
6258
6729
|
|
|
6259
6730
|
*/
|
|
6260
|
-
const _sfc_main$
|
|
6731
|
+
const _sfc_main$F = {
|
|
6261
6732
|
__name: "JsvFocusBlock",
|
|
6262
6733
|
props: {
|
|
6263
6734
|
name: String,
|
|
@@ -6465,7 +6936,7 @@ class JsvFocusManager {
|
|
|
6465
6936
|
}
|
|
6466
6937
|
const doAppMount = this.$_hookMount(app, options[0]);
|
|
6467
6938
|
app.mount = doAppMount;
|
|
6468
|
-
app.component("JsvFocusBlock", _sfc_main$
|
|
6939
|
+
app.component("JsvFocusBlock", _sfc_main$F);
|
|
6469
6940
|
app.config.globalProperties.$jsvFocusManager = this;
|
|
6470
6941
|
app.provide(HUB_NS_PROVIDE_NAME, null);
|
|
6471
6942
|
app.provide(ROOT_HUB_PROVIDE_NAME, new JsvFocusHubApi(this.$_topFDiv.getHub()));
|
|
@@ -7323,7 +7794,7 @@ class AudioProxy {
|
|
|
7323
7794
|
|
|
7324
7795
|
|
|
7325
7796
|
*/
|
|
7326
|
-
const _sfc_main$
|
|
7797
|
+
const _sfc_main$E = {
|
|
7327
7798
|
__name: "JsvAudio",
|
|
7328
7799
|
props: {
|
|
7329
7800
|
/**
|
|
@@ -7470,7 +7941,7 @@ const _sfc_main$D = {
|
|
|
7470
7941
|
|
|
7471
7942
|
|
|
7472
7943
|
*/
|
|
7473
|
-
const _sfc_main$
|
|
7944
|
+
const _sfc_main$D = {
|
|
7474
7945
|
__name: "JsvAudioProxy",
|
|
7475
7946
|
setup(__props) {
|
|
7476
7947
|
const AsyncComp = defineAsyncComponent(() => {
|
|
@@ -7480,7 +7951,7 @@ const _sfc_main$C = {
|
|
|
7480
7951
|
const BrowserAudio = import('./browser/BrowserAudio.vue.mjs');
|
|
7481
7952
|
resolve(BrowserAudio);
|
|
7482
7953
|
} else {
|
|
7483
|
-
resolve(_sfc_main$
|
|
7954
|
+
resolve(_sfc_main$E);
|
|
7484
7955
|
}
|
|
7485
7956
|
});
|
|
7486
7957
|
});
|
|
@@ -7775,7 +8246,7 @@ const cssColor2Android = (cssColor) => {
|
|
|
7775
8246
|
|
|
7776
8247
|
|
|
7777
8248
|
*/
|
|
7778
|
-
const _sfc_main$
|
|
8249
|
+
const _sfc_main$C = {
|
|
7779
8250
|
__name: "JsvLatex",
|
|
7780
8251
|
props: {
|
|
7781
8252
|
latexStr: {
|
|
@@ -7848,11 +8319,11 @@ const _sfc_main$B = {
|
|
|
7848
8319
|
clientWidth = Math.round(props.height * (textureW / textureH));
|
|
7849
8320
|
}
|
|
7850
8321
|
};
|
|
7851
|
-
let layoutView = new Forge$
|
|
7852
|
-
new Forge$
|
|
8322
|
+
let layoutView = new Forge$2.LayoutView(
|
|
8323
|
+
new Forge$2.TextureSetting(pluginTexture)
|
|
7853
8324
|
);
|
|
7854
8325
|
layoutView.EnableAutoSize();
|
|
7855
|
-
innerViewId = Forge$
|
|
8326
|
+
innerViewId = Forge$2.sViewStore.add(new Forge$2.ViewInfo(layoutView));
|
|
7856
8327
|
};
|
|
7857
8328
|
const loadInfo = sPluginLoader.getLoadInfo();
|
|
7858
8329
|
if (loadInfo.done) {
|
|
@@ -7868,7 +8339,7 @@ const _sfc_main$B = {
|
|
|
7868
8339
|
}
|
|
7869
8340
|
onBeforeUnmount(() => {
|
|
7870
8341
|
if (innerViewId !== -1) {
|
|
7871
|
-
Forge$
|
|
8342
|
+
Forge$2.sViewStore.remove(innerViewId);
|
|
7872
8343
|
innerViewId = -1;
|
|
7873
8344
|
}
|
|
7874
8345
|
});
|
|
@@ -7897,7 +8368,7 @@ const _sfc_main$B = {
|
|
|
7897
8368
|
|
|
7898
8369
|
|
|
7899
8370
|
*/
|
|
7900
|
-
const _sfc_main$
|
|
8371
|
+
const _sfc_main$B = {
|
|
7901
8372
|
__name: "JsvLatexProxy",
|
|
7902
8373
|
setup(__props) {
|
|
7903
8374
|
const AsyncComp = defineAsyncComponent(() => {
|
|
@@ -7907,7 +8378,7 @@ const _sfc_main$A = {
|
|
|
7907
8378
|
const BrowserJsvLatex = import('./browser/BrowserJsvLatex.vue.mjs');
|
|
7908
8379
|
resolve(BrowserJsvLatex);
|
|
7909
8380
|
} else {
|
|
7910
|
-
resolve(_sfc_main$
|
|
8381
|
+
resolve(_sfc_main$C);
|
|
7911
8382
|
}
|
|
7912
8383
|
});
|
|
7913
8384
|
});
|
|
@@ -8118,127 +8589,85 @@ function direct_call(name, ...args) {
|
|
|
8118
8589
|
}
|
|
8119
8590
|
return null;
|
|
8120
8591
|
}
|
|
8121
|
-
/*
|
|
8122
|
-
* 获取当前集成JsView的APP目前支持的扩展功能列表
|
|
8123
|
-
*
|
|
8124
|
-
* @returns {string} 功能列表,以逗号隔开,包含:
|
|
8125
|
-
* favourite : 支持加入收藏夹功能
|
|
8126
|
-
* history : 支持浏览后自动进入历史记录功能
|
|
8127
|
-
* textureVideo : 支持将video渲染到texture的方式(JsvVideo高阶控件的usetexture属性控制)
|
|
8128
|
-
*/
|
|
8129
8592
|
function getExtFeatureSupports() {
|
|
8130
8593
|
if (!feature_supports) {
|
|
8131
8594
|
feature_supports = direct_call("getExtFeaturesSupport");
|
|
8132
8595
|
}
|
|
8133
8596
|
return feature_supports;
|
|
8134
8597
|
}
|
|
8135
|
-
/*
|
|
8136
|
-
* 获取设备mac地址,优先获取有线mac,无则获取wifi mac
|
|
8137
|
-
* @returns {string} mac address
|
|
8138
|
-
*
|
|
8139
|
-
*/
|
|
8140
8598
|
function getMac() {
|
|
8141
8599
|
return direct_call("getMac");
|
|
8142
8600
|
}
|
|
8143
|
-
/*
|
|
8144
|
-
* 获取设备有线mac地址
|
|
8145
|
-
* @returns {string} mac address
|
|
8146
|
-
*
|
|
8147
|
-
*/
|
|
8148
8601
|
function getWireMac() {
|
|
8149
8602
|
return direct_call("getWireMac");
|
|
8150
8603
|
}
|
|
8151
|
-
/*
|
|
8152
|
-
* 获取设备wifi mac地址
|
|
8153
|
-
* @returns {string} mac address
|
|
8154
|
-
*
|
|
8155
|
-
*/
|
|
8156
8604
|
function getWifiMac() {
|
|
8157
8605
|
return direct_call("getWifiMac");
|
|
8158
8606
|
}
|
|
8159
|
-
/*
|
|
8160
|
-
* 获取设备UUID
|
|
8161
|
-
* @returns {string} UUID
|
|
8162
|
-
*
|
|
8163
|
-
*/
|
|
8164
8607
|
function getDeviceUUID() {
|
|
8165
8608
|
return direct_call("getDeviceUUID");
|
|
8166
8609
|
}
|
|
8167
|
-
/*
|
|
8168
|
-
* 获取设备Android ID
|
|
8169
|
-
* @returns {string} Android ID
|
|
8170
|
-
*
|
|
8171
|
-
*/
|
|
8172
8610
|
function getAndroidId() {
|
|
8173
8611
|
return direct_call("getAndroidId");
|
|
8174
8612
|
}
|
|
8175
|
-
/*
|
|
8176
|
-
* 打开另外一个小程序
|
|
8177
|
-
* @param {string} url 小程序url
|
|
8178
|
-
* @param {string} startup_image 启动图url
|
|
8179
|
-
* @param {string} startup_video 启动视频url
|
|
8180
|
-
* @param {int} startup_duration 启动图时长,默认0
|
|
8181
|
-
* @param {int} add_history 是否添加历史,0不添加,1添加
|
|
8182
|
-
*
|
|
8183
|
-
*/
|
|
8184
8613
|
function openWindow(url, startup_image, startup_video, startup_duration, add_history) {
|
|
8185
8614
|
let setting = {};
|
|
8186
|
-
if (
|
|
8615
|
+
if (startup_image !== null && startup_image !== "")
|
|
8187
8616
|
setting.startupImage = startup_image;
|
|
8188
|
-
if (
|
|
8617
|
+
if (startup_video !== null && startup_video !== "") {
|
|
8189
8618
|
setting.startupVideo = startup_video;
|
|
8190
8619
|
}
|
|
8191
8620
|
setting.startupDuration = startup_duration;
|
|
8192
8621
|
setting.addHistory = add_history ? 1 : 0;
|
|
8193
|
-
|
|
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));
|
|
8194
8648
|
}
|
|
8195
|
-
/*
|
|
8196
|
-
* 关闭当前小程序
|
|
8197
|
-
*
|
|
8198
|
-
*/
|
|
8199
8649
|
function closePage() {
|
|
8200
8650
|
direct_call("closePage");
|
|
8201
8651
|
}
|
|
8202
|
-
/*
|
|
8203
|
-
* 获取设备UUID
|
|
8204
|
-
* @param {string} key 属性名称
|
|
8205
|
-
* @returns {string} 属性值
|
|
8206
|
-
*
|
|
8207
|
-
*/
|
|
8208
8652
|
function getSystemProperty(key) {
|
|
8209
8653
|
return direct_call("getSystemProperty", key);
|
|
8210
8654
|
}
|
|
8211
|
-
/*
|
|
8212
|
-
* 获取已安装应用列表
|
|
8213
|
-
* @returns {string} 应用列表,JSON结构的数组
|
|
8214
|
-
*
|
|
8215
|
-
*/
|
|
8216
8655
|
function getInstalledApps() {
|
|
8217
8656
|
return direct_call("getInstalledApps");
|
|
8218
8657
|
}
|
|
8219
|
-
/*
|
|
8220
|
-
* 启动安卓APP
|
|
8221
|
-
* @param {string} package_name 包名
|
|
8222
|
-
* @param {string} activity Activity方式启动
|
|
8223
|
-
* @param {string} action Action方式启动
|
|
8224
|
-
* @param {string} uri Uri方式启动
|
|
8225
|
-
* @param {Array} flags 数组,用于intent.addFlags
|
|
8226
|
-
* @param {Array} param JSON格式数组,用于intent.putExtra
|
|
8227
|
-
*
|
|
8228
|
-
*/
|
|
8229
8658
|
function startNativeApp(package_name, activity, action, uri, flags, param) {
|
|
8230
8659
|
var obj = {};
|
|
8231
|
-
if (
|
|
8660
|
+
if (package_name !== null && package_name !== "")
|
|
8232
8661
|
obj.packageName = package_name;
|
|
8233
|
-
if (
|
|
8662
|
+
if (activity !== null && activity !== "")
|
|
8234
8663
|
obj.activity = activity;
|
|
8235
|
-
if (
|
|
8664
|
+
if (action !== null && action !== "")
|
|
8236
8665
|
obj.action = action;
|
|
8237
|
-
if (
|
|
8666
|
+
if (uri !== null && uri !== "")
|
|
8238
8667
|
obj.uri = uri;
|
|
8239
|
-
if (
|
|
8668
|
+
if (flags !== null && flags.length > 0)
|
|
8240
8669
|
obj.flags = flags;
|
|
8241
|
-
if (
|
|
8670
|
+
if (param !== null && param.length > 0)
|
|
8242
8671
|
obj.param = param;
|
|
8243
8672
|
direct_call("startNativeApp", JSON.stringify(obj));
|
|
8244
8673
|
}
|
|
@@ -8258,25 +8687,28 @@ function sendNativeBroadcast(package_name, broadcast, action, uri, flags, param)
|
|
|
8258
8687
|
obj.param = param;
|
|
8259
8688
|
direct_call("sendNativeBroadcast", JSON.stringify(obj));
|
|
8260
8689
|
}
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
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
|
+
}
|
|
8266
8706
|
function getDeviceInfo() {
|
|
8267
8707
|
return direct_call("getDeviceInfo");
|
|
8268
8708
|
}
|
|
8269
|
-
/*
|
|
8270
|
-
* 获取自己的app信息
|
|
8271
|
-
* @returns
|
|
8272
|
-
*/
|
|
8273
8709
|
function getAppInfo() {
|
|
8274
8710
|
return direct_call("getAppInfo");
|
|
8275
8711
|
}
|
|
8276
|
-
/*
|
|
8277
|
-
* 页面加载成功后调用去除启动图
|
|
8278
|
-
*
|
|
8279
|
-
*/
|
|
8280
8712
|
function notifyPageLoadDone() {
|
|
8281
8713
|
notifyPageLoaded();
|
|
8282
8714
|
}
|
|
@@ -8284,11 +8716,6 @@ function notifyPageLoaded() {
|
|
|
8284
8716
|
window.JsView?.enableReceivingUserInput?.();
|
|
8285
8717
|
direct_call("notifyPageLoaded");
|
|
8286
8718
|
}
|
|
8287
|
-
/*
|
|
8288
|
-
* 是否支持收藏功能
|
|
8289
|
-
* @returns {boolean} true支持,false不支持
|
|
8290
|
-
*
|
|
8291
|
-
*/
|
|
8292
8719
|
function hasFavouriteFunction() {
|
|
8293
8720
|
let features = getExtFeatureSupports();
|
|
8294
8721
|
if (features && features.indexOf("favourite") >= 0) {
|
|
@@ -8296,12 +8723,6 @@ function hasFavouriteFunction() {
|
|
|
8296
8723
|
}
|
|
8297
8724
|
return false;
|
|
8298
8725
|
}
|
|
8299
|
-
/*
|
|
8300
|
-
* 获取启动内核版本和引擎
|
|
8301
|
-
* @returns {Object} 包含
|
|
8302
|
-
* COREVERSIONRANGE: 启动时设定的内核版本范围
|
|
8303
|
-
* ENGINE: 启动时设定的Js引擎的URL
|
|
8304
|
-
*/
|
|
8305
8726
|
function getStartParams() {
|
|
8306
8727
|
let json = direct_call("getStartParams");
|
|
8307
8728
|
if (json) {
|
|
@@ -8310,12 +8731,6 @@ function getStartParams() {
|
|
|
8310
8731
|
return null;
|
|
8311
8732
|
}
|
|
8312
8733
|
}
|
|
8313
|
-
/*
|
|
8314
|
-
* 添加收藏
|
|
8315
|
-
* @param {string} url 收藏的url
|
|
8316
|
-
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
8317
|
-
*
|
|
8318
|
-
*/
|
|
8319
8734
|
function addFavourite(url, callback) {
|
|
8320
8735
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.addFavourite === "function") {
|
|
8321
8736
|
let async_message = window.jJsvRuntimeBridge.addFavourite(url);
|
|
@@ -8330,12 +8745,6 @@ function addFavourite(url, callback) {
|
|
|
8330
8745
|
});
|
|
8331
8746
|
}
|
|
8332
8747
|
}
|
|
8333
|
-
/*
|
|
8334
|
-
* 更新收藏
|
|
8335
|
-
* @param {string} url 收藏的url
|
|
8336
|
-
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
8337
|
-
*
|
|
8338
|
-
*/
|
|
8339
8748
|
function updateFavourite(url, callback) {
|
|
8340
8749
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.updateFavourite === "function") {
|
|
8341
8750
|
let async_message = window.jJsvRuntimeBridge.updateFavourite(url);
|
|
@@ -8350,12 +8759,6 @@ function updateFavourite(url, callback) {
|
|
|
8350
8759
|
});
|
|
8351
8760
|
}
|
|
8352
8761
|
}
|
|
8353
|
-
/*
|
|
8354
|
-
* 删除指定收藏
|
|
8355
|
-
* @param {string} app_name app name 唯一标识
|
|
8356
|
-
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
8357
|
-
*
|
|
8358
|
-
*/
|
|
8359
8762
|
function removeFavourite(app_name, callback) {
|
|
8360
8763
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.removeFavourite === "function") {
|
|
8361
8764
|
let async_message = window.jJsvRuntimeBridge.removeFavourite(app_name);
|
|
@@ -8370,70 +8773,30 @@ function removeFavourite(app_name, callback) {
|
|
|
8370
8773
|
});
|
|
8371
8774
|
}
|
|
8372
8775
|
}
|
|
8373
|
-
/*
|
|
8374
|
-
* 获取指定收藏
|
|
8375
|
-
* @param {string} app_name app name 唯一标识
|
|
8376
|
-
*/
|
|
8377
8776
|
function getFavourite(app_name) {
|
|
8378
8777
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.getFavourite === "function") {
|
|
8379
8778
|
return window.jJsvRuntimeBridge.getFavourite(app_name);
|
|
8380
8779
|
}
|
|
8381
8780
|
return null;
|
|
8382
8781
|
}
|
|
8383
|
-
/*
|
|
8384
|
-
* 获取所有收藏
|
|
8385
|
-
*
|
|
8386
|
-
*/
|
|
8387
8782
|
function getFavouriteAll() {
|
|
8388
8783
|
if (window.jJsvRuntimeBridge && typeof window.jJsvRuntimeBridge.getFavouriteAll === "function") {
|
|
8389
8784
|
return window.jJsvRuntimeBridge.getFavouriteAll();
|
|
8390
8785
|
}
|
|
8391
8786
|
return null;
|
|
8392
8787
|
}
|
|
8393
|
-
/*
|
|
8394
|
-
* 浮窗控制接口,设置从本浮窗界面进行预热的二级浮窗的启动默认尺寸(若不设置则为全屏)
|
|
8395
|
-
* @param {string} mode 全屏模式还是需要Resize的模式。取值范围: "full" 或者 "mini"
|
|
8396
|
-
* 设置成 "mini" 模式后,启动后的界面内需要调用popupResizePosition来调整尺寸才能可见
|
|
8397
|
-
*/
|
|
8398
8788
|
function setPopupInitSize(mode) {
|
|
8399
8789
|
direct_call("setPopupInitSize", mode);
|
|
8400
8790
|
}
|
|
8401
|
-
/*
|
|
8402
|
-
* 浮窗控制接口,设置浮窗显示区域,以相对定位的方式调整弹出框的位置(弹出框弹出后先以尺寸1x1的方式展现)
|
|
8403
|
-
* @param {string} align 横纵对齐方式,有left, right, bottom, top, center可选择
|
|
8404
|
-
* 例如: 右下角"right bottom", 居中"center center"
|
|
8405
|
-
* @param {number} max_width 显示区域最大宽度(占屏幕百分比)
|
|
8406
|
-
* @param {number} max_height 显示区域最大高度(占屏幕百分比)
|
|
8407
|
-
* @param {number} aspect 横纵比设定
|
|
8408
|
-
* 显示区域根据 max_width, max_height, aspect 来计算出同时满足3个条件的最大区域
|
|
8409
|
-
*/
|
|
8410
8791
|
function popupResizePosition(align, max_width, max_height, aspect) {
|
|
8411
8792
|
direct_call("popupResizePosition", align, max_width, max_height, aspect);
|
|
8412
8793
|
}
|
|
8413
|
-
/*
|
|
8414
|
-
* 浮窗系统认为自己准备好后,调用此接口,获取设备的焦点。若不调用的话,默认浮窗系统捕获的焦点
|
|
8415
|
-
*/
|
|
8416
8794
|
function popupGainFocus() {
|
|
8417
8795
|
direct_call("popupGainFocus");
|
|
8418
8796
|
}
|
|
8419
8797
|
function popupDiscardFocus() {
|
|
8420
8798
|
direct_call("popupGainFocus");
|
|
8421
8799
|
}
|
|
8422
|
-
/*
|
|
8423
|
-
* 页面预热接口,预热页面将会将以一个新的FrameLayout(内含JsView)的方式加载一个新的应用
|
|
8424
|
-
* 但这个应用在warmLoadView之前,不会创建texture/surface的实际描画资源,也不会加载图片
|
|
8425
|
-
* 仅加载所有JS代码,并正常走完所有启动逻辑(包括描画逻辑),但不会走setTimeout对应的延时逻辑,也不会显示
|
|
8426
|
-
* 预热的界面可以极大加速界面切换的时间,例如应用跳转到购物类界面
|
|
8427
|
-
* mode为1表示全预热,app_url不能为空,mode为2表示只预热engine url,如果app_url不为空,engine url来自于app_ur
|
|
8428
|
-
* 否则来自于当前使用的engine url,app_url表示小程序的链接。
|
|
8429
|
-
* 【特别注意】warmUp起来的view,在warmLoadView调用之前,若启动者JsView关闭的话,此View应该在
|
|
8430
|
-
* View管理模块被清理掉,以防泄露,但在warmLoadView完成后,就不需要进行关联清理,请管理模块务必保证此机制。
|
|
8431
|
-
* [参数]
|
|
8432
|
-
* int mode 预热模式,1:全预热,2:半预热
|
|
8433
|
-
* String app_url 要预热的app_url,当半预热时,可以为null
|
|
8434
|
-
* [返回值]
|
|
8435
|
-
* int: 为view_refer_id值,预热后的View的ID,用于后续的warmLoadView和closeWarmView使用
|
|
8436
|
-
*/
|
|
8437
8800
|
function warmUpView(mode, app_url) {
|
|
8438
8801
|
if (mode !== 1 && mode !== 2) {
|
|
8439
8802
|
console.error(`not support mode(${mode})`);
|
|
@@ -8445,35 +8808,24 @@ function warmUpView(mode, app_url) {
|
|
|
8445
8808
|
}
|
|
8446
8809
|
return direct_call("warmUpView", mode, app_url);
|
|
8447
8810
|
}
|
|
8448
|
-
/*
|
|
8449
|
-
* 将warmUpView后的View展示出来
|
|
8450
|
-
* 若warmUpView中app_url不为null,进行了全预热,则本调用的app_url可以为null
|
|
8451
|
-
* 当warmUpView中设置了app_url时,仍可以新的app_url调整history hash(#)部分进行子页面切换
|
|
8452
|
-
*
|
|
8453
|
-
* @param {number} view_refer_id warmUpView调用后返回来的View ID
|
|
8454
|
-
* @param {string} app_url 界面的应用地址,支持?(search)和#(hash)字段
|
|
8455
|
-
* @param {boolean} add_history 启动的界面是否进访问历史列表
|
|
8456
|
-
*/
|
|
8457
8811
|
function warmLoadView(view_refer_id, app_url, add_history) {
|
|
8458
8812
|
direct_call("warmLoadView", view_refer_id, app_url, !!add_history);
|
|
8459
8813
|
}
|
|
8460
|
-
/*
|
|
8461
|
-
* 关闭warmUp后未进行warmLoad的View,释放资源
|
|
8462
|
-
* @param {number} view_refer_id warmUpView调用后返回来的View ID
|
|
8463
|
-
*/
|
|
8464
8814
|
function closeWarmedView(view_refer_id) {
|
|
8465
8815
|
direct_call("closeWarmedView", view_refer_id);
|
|
8466
8816
|
}
|
|
8467
|
-
/*
|
|
8468
|
-
* 触发预下载内核
|
|
8469
|
-
* @param {string} core_version 带branch(主分支版本不带此信息)和版本信息的内核版本,
|
|
8470
|
-
* 例如: 1021265_release_build_xxx
|
|
8471
|
-
* @returns promise 对象,用于监听下载完成与下载失败
|
|
8472
|
-
*/
|
|
8473
8817
|
function preDownloadSdk(core_version) {
|
|
8474
8818
|
return direct_call("preDownloadSdk", core_version);
|
|
8475
8819
|
}
|
|
8476
|
-
|
|
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
|
+
}
|
|
8477
8829
|
const bridge = {
|
|
8478
8830
|
getMac,
|
|
8479
8831
|
getWireMac,
|
|
@@ -8481,12 +8833,16 @@ const bridge = {
|
|
|
8481
8833
|
getDeviceUUID,
|
|
8482
8834
|
getAndroidId,
|
|
8483
8835
|
openWindow,
|
|
8836
|
+
startUrlInNewTab,
|
|
8837
|
+
onWindowResult,
|
|
8838
|
+
reloadWindow,
|
|
8484
8839
|
closePage,
|
|
8485
8840
|
getStartParams,
|
|
8486
8841
|
getSystemProperty,
|
|
8487
8842
|
getInstalledApps,
|
|
8488
8843
|
startNativeApp,
|
|
8489
8844
|
sendNativeBroadcast,
|
|
8845
|
+
startService,
|
|
8490
8846
|
getDeviceInfo,
|
|
8491
8847
|
getAppInfo,
|
|
8492
8848
|
notifyPageLoadDone,
|
|
@@ -8504,7 +8860,10 @@ const bridge = {
|
|
|
8504
8860
|
warmUpView,
|
|
8505
8861
|
warmLoadView,
|
|
8506
8862
|
closeWarmedView,
|
|
8507
|
-
preDownloadSdk
|
|
8863
|
+
preDownloadSdk,
|
|
8864
|
+
getNetworkTypeStatusImmediate,
|
|
8865
|
+
registerNetStateListener,
|
|
8866
|
+
unRegisterNetStateListener
|
|
8508
8867
|
};
|
|
8509
8868
|
|
|
8510
8869
|
//
|
|
@@ -8721,7 +9080,7 @@ class JsvStyleClass {
|
|
|
8721
9080
|
}
|
|
8722
9081
|
this._StyleGroup.insertRule(`.${this._Name}${css_define}`);
|
|
8723
9082
|
} else {
|
|
8724
|
-
Forge$
|
|
9083
|
+
Forge$2.ReactUtils.StyleClassMap[this._Name] = this;
|
|
8725
9084
|
}
|
|
8726
9085
|
}
|
|
8727
9086
|
_RecycleInner() {
|
|
@@ -8729,7 +9088,7 @@ class JsvStyleClass {
|
|
|
8729
9088
|
if (window.JsvDisableReactWrapper) {
|
|
8730
9089
|
this._StyleGroup.removeRule(`.${this._Name}`);
|
|
8731
9090
|
} else {
|
|
8732
|
-
delete Forge$
|
|
9091
|
+
delete Forge$2.ReactUtils.StyleClassMap[this._Name];
|
|
8733
9092
|
}
|
|
8734
9093
|
this._Name = null;
|
|
8735
9094
|
this._Styles = null;
|
|
@@ -8905,7 +9264,7 @@ window.JsvDebugTools = DebugTools;
|
|
|
8905
9264
|
* Object 句柄,用于传输给 createImpactTracer
|
|
8906
9265
|
*/
|
|
8907
9266
|
function createImpactCallback(on_contact, on_dis_contact) {
|
|
8908
|
-
return new Forge$
|
|
9267
|
+
return new Forge$2.sImpactSensorManager.Callback(on_contact, on_dis_contact);
|
|
8909
9268
|
}
|
|
8910
9269
|
/*
|
|
8911
9270
|
* createImpactTracer 参数说明:
|
|
@@ -8917,7 +9276,7 @@ function createImpactCallback(on_contact, on_dis_contact) {
|
|
|
8917
9276
|
* Object 句柄,提供 Recycle() 函数用于停止碰撞检测,需要再componentWillUnmount进行调用(清理)
|
|
8918
9277
|
*/
|
|
8919
9278
|
function createImpactTracer(ele1, ele2, callback, auto_froze) {
|
|
8920
|
-
return Forge$
|
|
9279
|
+
return Forge$2.sImpactSensorManager.StartTrace(ele1.jsvGetProxyView(), ele2.jsvGetProxyView(), callback, auto_froze);
|
|
8921
9280
|
}
|
|
8922
9281
|
// 创建用于设置碰撞即停管理对象的参数
|
|
8923
9282
|
// 结果用于函数 createImpactAutoFroze 和 updateImpactAutoFroze
|
|
@@ -8948,7 +9307,7 @@ function createImpactAutoFroze(element_auto_froze_pre_impact, element_auto_froze
|
|
|
8948
9307
|
}
|
|
8949
9308
|
const pre_impact_list = _ConvertToViewsList(element_auto_froze_pre_impact);
|
|
8950
9309
|
const on_impact_list = _ConvertToViewsList(element_auto_froze_on_impact);
|
|
8951
|
-
return new Forge$
|
|
9310
|
+
return new Forge$2.sImpactSensorManager.AutoFroze(
|
|
8952
9311
|
pre_impact_list.length > 0 ? pre_impact_list : null,
|
|
8953
9312
|
on_impact_list.length > 0 ? on_impact_list : null
|
|
8954
9313
|
);
|
|
@@ -8962,7 +9321,7 @@ function createImpactAutoFroze(element_auto_froze_pre_impact, element_auto_froze
|
|
|
8962
9321
|
* 无
|
|
8963
9322
|
*/
|
|
8964
9323
|
function updateImpactAutoFroze(handler, element_auto_froze_pre_impact, element_auto_froze_on_impact) {
|
|
8965
|
-
if (handler instanceof Forge$
|
|
9324
|
+
if (handler instanceof Forge$2.sImpactSensorManager.AutoFroze) {
|
|
8966
9325
|
console.error("Error: handler type error");
|
|
8967
9326
|
return;
|
|
8968
9327
|
}
|
|
@@ -9342,9 +9701,12 @@ class TextureBase {
|
|
|
9342
9701
|
}
|
|
9343
9702
|
}
|
|
9344
9703
|
addToStore() {
|
|
9345
|
-
this.storeName =
|
|
9704
|
+
this.storeName = this.getStoreName();
|
|
9346
9705
|
sStore.addToStore(this.storeName, this);
|
|
9347
9706
|
}
|
|
9707
|
+
getStoreName() {
|
|
9708
|
+
return `${this.baseName}-${this.textureRef?.GetTextureId()}`;
|
|
9709
|
+
}
|
|
9348
9710
|
/**
|
|
9349
9711
|
* commit
|
|
9350
9712
|
* 完成绘制设置,出发制作目标texture
|
|
@@ -9354,6 +9716,15 @@ class TextureBase {
|
|
|
9354
9716
|
commit() {
|
|
9355
9717
|
return this.storeName;
|
|
9356
9718
|
}
|
|
9719
|
+
/**
|
|
9720
|
+
* getTextureRef
|
|
9721
|
+
* 内部接口,获取内联的Forge.ImageTexture的句柄
|
|
9722
|
+
*
|
|
9723
|
+
* @return {String} BaseName-textureId 格式的名字,用于 jsvtexturestore:// 的访问链接
|
|
9724
|
+
*/
|
|
9725
|
+
getTextureRef() {
|
|
9726
|
+
return this.textureRef;
|
|
9727
|
+
}
|
|
9357
9728
|
recycle() {
|
|
9358
9729
|
let textureRef = sStore.removeFromStore(this.storeName);
|
|
9359
9730
|
if (textureRef) {
|
|
@@ -9565,9 +9936,9 @@ class CustomPath extends DrawingPath {
|
|
|
9565
9936
|
// utils/JsViewVueTools/JsvTextureDefines.ts;
|
|
9566
9937
|
//
|
|
9567
9938
|
class TextureInstantType {
|
|
9568
|
-
static Auto = Forge$
|
|
9569
|
-
static Sync = Forge$
|
|
9570
|
-
static Async = Forge$
|
|
9939
|
+
static Auto = Forge$1.TextureInstantLoad.AUTO;
|
|
9940
|
+
static Sync = Forge$1.TextureInstantLoad.SYNC;
|
|
9941
|
+
static Async = Forge$1.TextureInstantLoad.ASYNC;
|
|
9571
9942
|
}
|
|
9572
9943
|
|
|
9573
9944
|
//
|
|
@@ -9744,6 +10115,53 @@ class CanvasTexture extends TextureBase {
|
|
|
9744
10115
|
}
|
|
9745
10116
|
}
|
|
9746
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
|
+
|
|
9747
10165
|
//
|
|
9748
10166
|
// utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts;
|
|
9749
10167
|
//
|
|
@@ -9773,7 +10191,7 @@ let sTextureStoreApi = {
|
|
|
9773
10191
|
/**
|
|
9774
10192
|
* canvasTexture
|
|
9775
10193
|
* 创建CanvasTexture句柄,执行commit()后, 获取访问名(访问名规则: 输入参数 baseName + 分配id)
|
|
9776
|
-
* 可以在 img.src 或者 div.backgroundImage 通过 "texturestore://访问名"
|
|
10194
|
+
* 可以在 img.src 或者 div.backgroundImage 通过 "texturestore://访问名" 来使用
|
|
9777
10195
|
*
|
|
9778
10196
|
* @param {int} width 此Canvas画布的宽度
|
|
9779
10197
|
* @param {int} height 此Canvas画布的高度
|
|
@@ -9783,14 +10201,41 @@ let sTextureStoreApi = {
|
|
|
9783
10201
|
canvasTexture: (width, height, baseName) => {
|
|
9784
10202
|
return new CanvasTexture(width, height, baseName);
|
|
9785
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
|
+
},
|
|
9786
10231
|
/**
|
|
9787
10232
|
* deleteTexture
|
|
9788
|
-
*
|
|
10233
|
+
* 删除访问名对应的texture资源
|
|
9789
10234
|
*
|
|
9790
|
-
* @param {String}
|
|
10235
|
+
* @param {String} accessName 此Texture的访问名,访问名来自: CanvasTexture.commit 或 capture2Texture 的回调
|
|
9791
10236
|
*/
|
|
9792
|
-
deleteTexture: (
|
|
9793
|
-
let textureRef = sStore.getFromStore(
|
|
10237
|
+
deleteTexture: (accessName) => {
|
|
10238
|
+
let textureRef = sStore.getFromStore(accessName);
|
|
9794
10239
|
if (textureRef) {
|
|
9795
10240
|
textureRef.recycle();
|
|
9796
10241
|
}
|
|
@@ -9869,13 +10314,13 @@ class ActorControlBase {
|
|
|
9869
10314
|
}
|
|
9870
10315
|
}
|
|
9871
10316
|
startFpsTesting() {
|
|
9872
|
-
Forge$
|
|
10317
|
+
Forge$2.sRenderBridge.SetStepFpsSwitch(true);
|
|
9873
10318
|
}
|
|
9874
10319
|
stopFpsTesting() {
|
|
9875
|
-
Forge$
|
|
10320
|
+
Forge$2.sRenderBridge.SetStepFpsSwitch(false);
|
|
9876
10321
|
}
|
|
9877
10322
|
altStraightSpeedInner(newSpeedPerSecond, time) {
|
|
9878
|
-
Forge$
|
|
10323
|
+
Forge$2.AnimFireCommand.AltSpeed(this._SpriteView, newSpeedPerSecond, time);
|
|
9879
10324
|
}
|
|
9880
10325
|
_WrapBuildAnimation(repeat_start_array, current_array, tos_array, start_params) {
|
|
9881
10326
|
console.warn("Should Override", repeat_start_array, current_array, tos_array, start_params);
|
|
@@ -9921,7 +10366,7 @@ class ActorControlBase {
|
|
|
9921
10366
|
const anim = this._WrapBuildAnimation(froms, tos, start_params);
|
|
9922
10367
|
const memo_tos = [...tos];
|
|
9923
10368
|
const that = this;
|
|
9924
|
-
const listener = new Forge$
|
|
10369
|
+
const listener = new Forge$2.AnimationListener().OnFinalProgress(
|
|
9925
10370
|
(progress) => {
|
|
9926
10371
|
that._OnPaused(
|
|
9927
10372
|
froms,
|
|
@@ -9944,7 +10389,7 @@ class ActorControlBase {
|
|
|
9944
10389
|
}
|
|
9945
10390
|
this._WrapAddExtraListener(listener, start_params);
|
|
9946
10391
|
anim.AddAnimationListener(listener);
|
|
9947
|
-
anim.Enable(Forge$
|
|
10392
|
+
anim.Enable(Forge$2.AnimationEnable.KeepTransform);
|
|
9948
10393
|
this._SpriteView.StartAnimation(anim);
|
|
9949
10394
|
return true;
|
|
9950
10395
|
}
|
|
@@ -10200,7 +10645,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10200
10645
|
return start_params;
|
|
10201
10646
|
}
|
|
10202
10647
|
_BuildAccelAnimation(current_array, tos_array, start_params) {
|
|
10203
|
-
const anim = new Forge$
|
|
10648
|
+
const anim = new Forge$2.ThrowAnimation(
|
|
10204
10649
|
current_array[0],
|
|
10205
10650
|
current_array[1],
|
|
10206
10651
|
start_params.xOrY,
|
|
@@ -10228,7 +10673,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10228
10673
|
console.error(`Error: current=${from_pos} out of repeat range[${repeat_set.start}-${to_pos}]`);
|
|
10229
10674
|
return null;
|
|
10230
10675
|
}
|
|
10231
|
-
anim = new Forge$
|
|
10676
|
+
anim = new Forge$2.TranslateFrameAnimation(
|
|
10232
10677
|
repeat_set.start,
|
|
10233
10678
|
to_pos,
|
|
10234
10679
|
start_params.speed,
|
|
@@ -10239,7 +10684,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10239
10684
|
anim.SetStartPos(start_percent);
|
|
10240
10685
|
anim.EnableInfinite();
|
|
10241
10686
|
} else {
|
|
10242
|
-
anim = new Forge$
|
|
10687
|
+
anim = new Forge$2.TranslateFrameAnimation(
|
|
10243
10688
|
from_pos,
|
|
10244
10689
|
to_pos,
|
|
10245
10690
|
start_params.speed,
|
|
@@ -10251,7 +10696,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10251
10696
|
return anim;
|
|
10252
10697
|
}
|
|
10253
10698
|
_BuildJumpAnimation(current_array, tos_array) {
|
|
10254
|
-
const anim = new Forge$
|
|
10699
|
+
const anim = new Forge$2.TranslateAnimation(
|
|
10255
10700
|
tos_array[0],
|
|
10256
10701
|
tos_array[0],
|
|
10257
10702
|
tos_array[1],
|
|
@@ -10395,7 +10840,7 @@ class JsvActorMoveControl extends ActorControlBase {
|
|
|
10395
10840
|
|
|
10396
10841
|
|
|
10397
10842
|
*/
|
|
10398
|
-
const _sfc_main$
|
|
10843
|
+
const _sfc_main$A = {
|
|
10399
10844
|
__name: "JsvActorMove",
|
|
10400
10845
|
props: {
|
|
10401
10846
|
control: {
|
|
@@ -10439,18 +10884,43 @@ const _sfc_main$z = {
|
|
|
10439
10884
|
|
|
10440
10885
|
<!--
|
|
10441
10886
|
* 【模块 export 内容】
|
|
10442
|
-
* JsvFreeMoveActor
|
|
10443
|
-
*
|
|
10444
|
-
*
|
|
10887
|
+
* JsvFreeMoveActor/JsvFreeMoveDiv:
|
|
10888
|
+
* 帧动画控制组件,通过control
|
|
10889
|
+
* .action() 单一运动指令,新指令发生时会冲掉旧指令
|
|
10890
|
+
* .condition() 条件设置,有时间维度,X/Y维度
|
|
10891
|
+
* .state() 状态调整指令
|
|
10445
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
|
|
10446
10902
|
-->
|
|
10447
10903
|
|
|
10448
10904
|
|
|
10449
10905
|
|
|
10450
10906
|
*/
|
|
10451
|
-
const _sfc_main$
|
|
10907
|
+
const _sfc_main$z = {
|
|
10452
10908
|
__name: "FreeMoveActor",
|
|
10453
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
|
|
10454
10924
|
// 设置给父节点,动画节点必须top/left为0, 以保证PC端模拟通过style直接获取当前位置信息的逻辑能通过
|
|
10455
10925
|
top: {
|
|
10456
10926
|
default: 0,
|
|
@@ -10460,7 +10930,9 @@ const _sfc_main$y = {
|
|
|
10460
10930
|
default: 0,
|
|
10461
10931
|
type: Number
|
|
10462
10932
|
},
|
|
10463
|
-
//
|
|
10933
|
+
// Deprecated
|
|
10934
|
+
// 设置给实际的动画节点, 在size模式下为初始尺寸
|
|
10935
|
+
// 可能会被style.width, style.height替代
|
|
10464
10936
|
width: {
|
|
10465
10937
|
default: 0,
|
|
10466
10938
|
type: Number
|
|
@@ -10474,8 +10946,11 @@ const _sfc_main$y = {
|
|
|
10474
10946
|
const props = __props;
|
|
10475
10947
|
let mainDivRef = shallowRef(null);
|
|
10476
10948
|
let controller = new ActorControl();
|
|
10949
|
+
if (props.sizeMode) {
|
|
10950
|
+
controller.asSizeMode();
|
|
10951
|
+
}
|
|
10477
10952
|
onMounted(() => {
|
|
10478
|
-
controller.bindForgeView(mainDivRef.value.jsvGetProxyView());
|
|
10953
|
+
controller.bindForgeView(mainDivRef.value.jsvGetProxyView(true));
|
|
10479
10954
|
});
|
|
10480
10955
|
expose({
|
|
10481
10956
|
control: controller
|
|
@@ -10483,18 +10958,19 @@ const _sfc_main$y = {
|
|
|
10483
10958
|
return (_ctx, _cache) => {
|
|
10484
10959
|
return openBlock(), createElementBlock("div", {
|
|
10485
10960
|
style: normalizeStyle({
|
|
10486
|
-
top: props.top,
|
|
10487
|
-
left: props.left
|
|
10961
|
+
top: props.style.top ? props.style.top : props.top,
|
|
10962
|
+
left: props.style.left ? props.style.left : props.left
|
|
10488
10963
|
})
|
|
10489
10964
|
}, [
|
|
10490
10965
|
createElementVNode("div", {
|
|
10491
10966
|
ref_key: "mainDivRef",
|
|
10492
10967
|
ref: mainDivRef,
|
|
10493
10968
|
style: normalizeStyle({
|
|
10494
|
-
top: 0,
|
|
10495
|
-
left: 0,
|
|
10496
10969
|
width: props.width,
|
|
10497
|
-
height: props.height
|
|
10970
|
+
height: props.height,
|
|
10971
|
+
...props.style,
|
|
10972
|
+
top: 0,
|
|
10973
|
+
left: 0
|
|
10498
10974
|
})
|
|
10499
10975
|
}, [
|
|
10500
10976
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -10538,7 +11014,7 @@ const KeepFlags = {
|
|
|
10538
11014
|
|
|
10539
11015
|
|
|
10540
11016
|
*/
|
|
10541
|
-
const _sfc_main$
|
|
11017
|
+
const _sfc_main$y = {
|
|
10542
11018
|
__name: "JsvEnvBlocker",
|
|
10543
11019
|
props: {
|
|
10544
11020
|
// (支持reactive)位置信息
|
|
@@ -10605,7 +11081,7 @@ const _sfc_main$x = {
|
|
|
10605
11081
|
});
|
|
10606
11082
|
onMounted(() => {
|
|
10607
11083
|
console.log("JsvEnvBlocker: on mounted");
|
|
10608
|
-
sensorRef = new Forge$
|
|
11084
|
+
sensorRef = new Forge$2.EnvBlockerSensor(
|
|
10609
11085
|
toRaw(viewRef.value).jsvGetProxyView()
|
|
10610
11086
|
);
|
|
10611
11087
|
viewMounted.status = true;
|
|
@@ -10645,7 +11121,8 @@ let FreeMoveDef = {
|
|
|
10645
11121
|
KeepFlags
|
|
10646
11122
|
};
|
|
10647
11123
|
let FreeMoveFunc = {
|
|
10648
|
-
newNexus
|
|
11124
|
+
newNexus,
|
|
11125
|
+
ActControlDebug: ActorControl
|
|
10649
11126
|
};
|
|
10650
11127
|
|
|
10651
11128
|
//
|
|
@@ -10688,7 +11165,7 @@ let FreeMoveFunc = {
|
|
|
10688
11165
|
|
|
10689
11166
|
|
|
10690
11167
|
*/
|
|
10691
|
-
const _sfc_main$
|
|
11168
|
+
const _sfc_main$x = {
|
|
10692
11169
|
__name: "JsvFlexDiv",
|
|
10693
11170
|
props: {
|
|
10694
11171
|
style: Object,
|
|
@@ -10795,7 +11272,7 @@ const _sfc_main$w = {
|
|
|
10795
11272
|
|
|
10796
11273
|
|
|
10797
11274
|
*/
|
|
10798
|
-
const _sfc_main$
|
|
11275
|
+
const _sfc_main$w = {
|
|
10799
11276
|
props: {
|
|
10800
11277
|
src: String,
|
|
10801
11278
|
style: Object,
|
|
@@ -10887,7 +11364,7 @@ const _sfc_main$v = {
|
|
|
10887
11364
|
}
|
|
10888
11365
|
}
|
|
10889
11366
|
};
|
|
10890
|
-
function _sfc_render$
|
|
11367
|
+
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10891
11368
|
return openBlock(), createElementBlock("img", {
|
|
10892
11369
|
"data-jsv-disable-apic-autoplay": "",
|
|
10893
11370
|
alt: "",
|
|
@@ -10896,7 +11373,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10896
11373
|
style: normalizeStyle($props.style)
|
|
10897
11374
|
}, null, 12, ["src"]);
|
|
10898
11375
|
}
|
|
10899
|
-
const JsvApic = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11376
|
+
const JsvApic = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$a]]);
|
|
10900
11377
|
|
|
10901
11378
|
//
|
|
10902
11379
|
// utils/JsViewVueWidget/JsvApic/JsvApic/index.js;
|
|
@@ -10947,7 +11424,7 @@ const _JsvApic$1 = _JsvApic;
|
|
|
10947
11424
|
|
|
10948
11425
|
|
|
10949
11426
|
*/
|
|
10950
|
-
const _sfc_main$
|
|
11427
|
+
const _sfc_main$v = {
|
|
10951
11428
|
props: {
|
|
10952
11429
|
src: String,
|
|
10953
11430
|
style: Object,
|
|
@@ -11036,7 +11513,7 @@ const _sfc_main$u = {
|
|
|
11036
11513
|
}
|
|
11037
11514
|
}
|
|
11038
11515
|
};
|
|
11039
|
-
function _sfc_render$
|
|
11516
|
+
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11040
11517
|
return openBlock(), createElementBlock("img", {
|
|
11041
11518
|
"data-jsv-disable-apic-autoplay": "",
|
|
11042
11519
|
alt: "",
|
|
@@ -11045,7 +11522,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11045
11522
|
style: normalizeStyle($props.style)
|
|
11046
11523
|
}, null, 12, ["src"]);
|
|
11047
11524
|
}
|
|
11048
|
-
const JsvApic2 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11525
|
+
const JsvApic2 = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$9]]);
|
|
11049
11526
|
|
|
11050
11527
|
//
|
|
11051
11528
|
// utils/JsViewVueWidget/JsvApic/JsvApic2/index.js;
|
|
@@ -11072,7 +11549,7 @@ const _JsvApic2$1 = _JsvApic2;
|
|
|
11072
11549
|
|
|
11073
11550
|
|
|
11074
11551
|
*/
|
|
11075
|
-
const _sfc_main$
|
|
11552
|
+
const _sfc_main$u = {
|
|
11076
11553
|
props: {
|
|
11077
11554
|
left: {
|
|
11078
11555
|
type: Number,
|
|
@@ -11114,7 +11591,7 @@ const _sfc_main$t = {
|
|
|
11114
11591
|
this._cleanInterval();
|
|
11115
11592
|
}
|
|
11116
11593
|
};
|
|
11117
|
-
function _sfc_render$
|
|
11594
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11118
11595
|
return openBlock(), createElementBlock("div", {
|
|
11119
11596
|
style: normalizeStyle({
|
|
11120
11597
|
left: $props.left,
|
|
@@ -11126,7 +11603,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11126
11603
|
})
|
|
11127
11604
|
}, null, 4);
|
|
11128
11605
|
}
|
|
11129
|
-
const CursorVue = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11606
|
+
const CursorVue = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$8]]);
|
|
11130
11607
|
|
|
11131
11608
|
//
|
|
11132
11609
|
// utils/JsViewVueWidget/JsvInput/JsvInput.vue;
|
|
@@ -11141,9 +11618,9 @@ const CursorVue = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_rend
|
|
|
11141
11618
|
|
|
11142
11619
|
*/
|
|
11143
11620
|
const InputType = {
|
|
11144
|
-
TEXT: Forge$
|
|
11145
|
-
NUMBER: Forge$
|
|
11146
|
-
PASSWORD: Forge$
|
|
11621
|
+
TEXT: Forge$2.TextInputType.TEXT,
|
|
11622
|
+
NUMBER: Forge$2.TextInputType.NUMBER,
|
|
11623
|
+
PASSWORD: Forge$2.TextInputType.PASSWORD
|
|
11147
11624
|
};
|
|
11148
11625
|
const ifDigital = (char) => "0".charCodeAt() <= char.charCodeAt() && char.charCodeAt() <= "9".charCodeAt();
|
|
11149
11626
|
const ifDirectionKeyCode = (code) => code >= 37 && code <= 40;
|
|
@@ -11154,7 +11631,7 @@ const edgeMap = {
|
|
|
11154
11631
|
40: EdgeDirection.bottom
|
|
11155
11632
|
};
|
|
11156
11633
|
const MAX_WIDTH = 1920;
|
|
11157
|
-
const _sfc_main$
|
|
11634
|
+
const _sfc_main$t = {
|
|
11158
11635
|
components: {
|
|
11159
11636
|
CursorVue
|
|
11160
11637
|
},
|
|
@@ -11329,7 +11806,7 @@ const _sfc_main$s = {
|
|
|
11329
11806
|
const alignment = this.fontStyle.textAlign;
|
|
11330
11807
|
const italic = this.fontStyle.fontStyle === "italic";
|
|
11331
11808
|
const bold = this.fontStyle.fontWeight === "bold";
|
|
11332
|
-
return Forge$
|
|
11809
|
+
return Forge$2.sTextUtils.StringWithFont(
|
|
11333
11810
|
str,
|
|
11334
11811
|
size,
|
|
11335
11812
|
font,
|
|
@@ -11341,7 +11818,7 @@ const _sfc_main$s = {
|
|
|
11341
11818
|
);
|
|
11342
11819
|
},
|
|
11343
11820
|
_getFullStringLength(str) {
|
|
11344
|
-
return Forge$
|
|
11821
|
+
return Forge$2.sTextUtils.GetTextWidth(this._getStringWithFont(str));
|
|
11345
11822
|
},
|
|
11346
11823
|
add(string) {
|
|
11347
11824
|
if (this.type === InputType.NUMBER && !ifDigital(string)) {
|
|
@@ -11378,9 +11855,9 @@ const _sfc_main$s = {
|
|
|
11378
11855
|
const target_str = this._GetRealText(full_str);
|
|
11379
11856
|
const font_params = this._getStringWithFont(target_str);
|
|
11380
11857
|
const max_width = MAX_WIDTH;
|
|
11381
|
-
const max_rect = new Forge$
|
|
11382
|
-
const text_attr = Forge$
|
|
11383
|
-
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(
|
|
11384
11861
|
target_str,
|
|
11385
11862
|
max_rect,
|
|
11386
11863
|
font_params,
|
|
@@ -11661,7 +12138,7 @@ const _sfc_main$s = {
|
|
|
11661
12138
|
},
|
|
11662
12139
|
_GetRealText(src_str) {
|
|
11663
12140
|
let value = src_str;
|
|
11664
|
-
if (this.type === Forge$
|
|
12141
|
+
if (this.type === Forge$2.TextInputType.PASSWORD) {
|
|
11665
12142
|
value = value.replace(/\w/g, "*");
|
|
11666
12143
|
}
|
|
11667
12144
|
return value;
|
|
@@ -11671,11 +12148,11 @@ const _sfc_main$s = {
|
|
|
11671
12148
|
}
|
|
11672
12149
|
},
|
|
11673
12150
|
created() {
|
|
11674
|
-
this.editControlView = new Forge$
|
|
12151
|
+
this.editControlView = new Forge$2.EditControlView();
|
|
11675
12152
|
this.editControlView.OnTextChanged = this._onTextChanged;
|
|
11676
12153
|
this.editControlView.OnStatusChanged = this._onStatusChanged;
|
|
11677
|
-
this.editControlViewId = Forge$
|
|
11678
|
-
new Forge$
|
|
12154
|
+
this.editControlViewId = Forge$2.sViewStore.add(
|
|
12155
|
+
new Forge$2.ViewInfo(this.editControlView)
|
|
11679
12156
|
);
|
|
11680
12157
|
const cur_position = this._calculateCursorPosition(
|
|
11681
12158
|
this.value,
|
|
@@ -11692,13 +12169,13 @@ const _sfc_main$s = {
|
|
|
11692
12169
|
},
|
|
11693
12170
|
beforeUnmount() {
|
|
11694
12171
|
if (this.editControlViewId != -1) {
|
|
11695
|
-
Forge$
|
|
12172
|
+
Forge$2.sViewStore.remove(this.editControlViewId);
|
|
11696
12173
|
this.editControlViewId = -1;
|
|
11697
12174
|
}
|
|
11698
12175
|
this.clearCursorPauseTimer();
|
|
11699
12176
|
}
|
|
11700
12177
|
};
|
|
11701
|
-
function _sfc_render$
|
|
12178
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11702
12179
|
const _component_cursor_vue = resolveComponent("cursor-vue");
|
|
11703
12180
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
11704
12181
|
return openBlock(), createBlock(_component_jsv_focus_block, {
|
|
@@ -11757,7 +12234,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11757
12234
|
_: 1
|
|
11758
12235
|
}, 8, ["name", "onAction", "style"]);
|
|
11759
12236
|
}
|
|
11760
|
-
const JsvInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12237
|
+
const JsvInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$7]]);
|
|
11761
12238
|
|
|
11762
12239
|
//
|
|
11763
12240
|
// utils/JsViewVueWidget/JsvInput/index.js;
|
|
@@ -11828,7 +12305,7 @@ const buildDownloadInfo$1 = (url, net_setting = null, get_image_size) => {
|
|
|
11828
12305
|
// 用于格式校验
|
|
11829
12306
|
};
|
|
11830
12307
|
};
|
|
11831
|
-
const _sfc_main$
|
|
12308
|
+
const _sfc_main$s = {
|
|
11832
12309
|
__name: "JsvPreload",
|
|
11833
12310
|
props: {
|
|
11834
12311
|
preloadList: Object,
|
|
@@ -11862,7 +12339,7 @@ const _sfc_main$r = {
|
|
|
11862
12339
|
view_info.textureRef?.UnregisterLoadImageCallback(
|
|
11863
12340
|
view_info.callToken
|
|
11864
12341
|
);
|
|
11865
|
-
Forge$
|
|
12342
|
+
Forge$2.sViewStore.remove(id);
|
|
11866
12343
|
}
|
|
11867
12344
|
}
|
|
11868
12345
|
}
|
|
@@ -11880,7 +12357,7 @@ const _sfc_main$r = {
|
|
|
11880
12357
|
view_info.textureRef?.UnregisterLoadImageCallback(
|
|
11881
12358
|
view_info.callToken
|
|
11882
12359
|
);
|
|
11883
|
-
Forge$
|
|
12360
|
+
Forge$2.sViewStore.remove(id);
|
|
11884
12361
|
}
|
|
11885
12362
|
}
|
|
11886
12363
|
}
|
|
@@ -11965,10 +12442,10 @@ const _sfc_main$r = {
|
|
|
11965
12442
|
_checkPreload();
|
|
11966
12443
|
});
|
|
11967
12444
|
texture.EnableBackgroundLoad();
|
|
11968
|
-
const texture_setting = new Forge$
|
|
11969
|
-
const preload_view = new Forge$
|
|
12445
|
+
const texture_setting = new Forge$2.ExternalTextureSetting(texture);
|
|
12446
|
+
const preload_view = new Forge$2.PreloadView(texture_setting);
|
|
11970
12447
|
return {
|
|
11971
|
-
viewId: Forge$
|
|
12448
|
+
viewId: Forge$2.sViewStore.add(new Forge$2.ViewInfo(preload_view)),
|
|
11972
12449
|
textureRef: texture,
|
|
11973
12450
|
callToken: callback_token
|
|
11974
12451
|
};
|
|
@@ -12035,10 +12512,10 @@ const _sfc_main$r = {
|
|
|
12035
12512
|
}
|
|
12036
12513
|
);
|
|
12037
12514
|
texture.EnableBackgroundLoad();
|
|
12038
|
-
const texture_setting = new Forge$
|
|
12039
|
-
const preload_view = new Forge$
|
|
12515
|
+
const texture_setting = new Forge$2.TextureSetting(texture);
|
|
12516
|
+
const preload_view = new Forge$2.PreloadView(texture_setting);
|
|
12040
12517
|
return {
|
|
12041
|
-
viewId: Forge$
|
|
12518
|
+
viewId: Forge$2.sViewStore.add(new Forge$2.ViewInfo(preload_view)),
|
|
12042
12519
|
textureRef: texture,
|
|
12043
12520
|
callToken: callback_token
|
|
12044
12521
|
};
|
|
@@ -12109,7 +12586,7 @@ const _sfc_main$r = {
|
|
|
12109
12586
|
// 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
12110
12587
|
let _JsvPreload;
|
|
12111
12588
|
if (window.JsView) {
|
|
12112
|
-
_JsvPreload = _sfc_main$
|
|
12589
|
+
_JsvPreload = _sfc_main$s;
|
|
12113
12590
|
} else {
|
|
12114
12591
|
const BrowserPreload = await import('./browser/BrowserPreload.vue.mjs');
|
|
12115
12592
|
_JsvPreload = BrowserPreload.default;
|
|
@@ -12143,7 +12620,7 @@ const JsvPreload = _JsvPreload;
|
|
|
12143
12620
|
|
|
12144
12621
|
|
|
12145
12622
|
*/
|
|
12146
|
-
const _sfc_main$
|
|
12623
|
+
const _sfc_main$r = {
|
|
12147
12624
|
props: {
|
|
12148
12625
|
value: String,
|
|
12149
12626
|
size: Number,
|
|
@@ -12204,11 +12681,11 @@ const _sfc_main$q = {
|
|
|
12204
12681
|
this.size,
|
|
12205
12682
|
this.size,
|
|
12206
12683
|
instantLoad,
|
|
12207
|
-
Forge$
|
|
12684
|
+
Forge$2.QRCodeLevel[this.level],
|
|
12208
12685
|
this.bgColor,
|
|
12209
12686
|
this.fgColor
|
|
12210
12687
|
);
|
|
12211
|
-
view = new Forge$
|
|
12688
|
+
view = new Forge$2.LayoutView(new Forge$2.TextureSetting(qrcode_texture));
|
|
12212
12689
|
const calculatedImageSettings = this.getImageSettings();
|
|
12213
12690
|
if (this.imageSettings && calculatedImageSettings) {
|
|
12214
12691
|
let url = this.imageSettings.src;
|
|
@@ -12216,12 +12693,12 @@ const _sfc_main$q = {
|
|
|
12216
12693
|
url = new window.JsView.Dom.UrlRef(this.imageSettings.src).href;
|
|
12217
12694
|
}
|
|
12218
12695
|
const img_texture = texture_manager.GetImage(url);
|
|
12219
|
-
const img_view = new Forge$
|
|
12220
|
-
new Forge$
|
|
12696
|
+
const img_view = new Forge$2.LayoutView(
|
|
12697
|
+
new Forge$2.TextureSetting(img_texture)
|
|
12221
12698
|
);
|
|
12222
12699
|
view.AddView(
|
|
12223
12700
|
img_view,
|
|
12224
|
-
new Forge$
|
|
12701
|
+
new Forge$2.LayoutParams({
|
|
12225
12702
|
x: calculatedImageSettings.x,
|
|
12226
12703
|
y: calculatedImageSettings.y,
|
|
12227
12704
|
width: calculatedImageSettings.w,
|
|
@@ -12230,7 +12707,7 @@ const _sfc_main$q = {
|
|
|
12230
12707
|
);
|
|
12231
12708
|
console.log("view = " + view);
|
|
12232
12709
|
}
|
|
12233
|
-
lp_params = new Forge$
|
|
12710
|
+
lp_params = new Forge$2.LayoutParams({
|
|
12234
12711
|
x: 0,
|
|
12235
12712
|
y: 0,
|
|
12236
12713
|
width: this.size,
|
|
@@ -12250,9 +12727,9 @@ const _sfc_main$q = {
|
|
|
12250
12727
|
imageSettings: this.imageSettings
|
|
12251
12728
|
};
|
|
12252
12729
|
if (this.jsvBaseView === null) {
|
|
12253
|
-
this.jsvBaseView = new Forge$
|
|
12254
|
-
this.innerViewId = Forge$
|
|
12255
|
-
new Forge$
|
|
12730
|
+
this.jsvBaseView = new Forge$2.LayoutView();
|
|
12731
|
+
this.innerViewId = Forge$2.sViewStore.add(
|
|
12732
|
+
new Forge$2.ViewInfo(this.jsvBaseView)
|
|
12256
12733
|
);
|
|
12257
12734
|
}
|
|
12258
12735
|
if (this.oldProps !== propsData) {
|
|
@@ -12269,17 +12746,17 @@ const _sfc_main$q = {
|
|
|
12269
12746
|
},
|
|
12270
12747
|
beforeUnmount() {
|
|
12271
12748
|
if (this.innerViewId !== -1) {
|
|
12272
|
-
Forge$
|
|
12749
|
+
Forge$2.sViewStore.remove(this.innerViewId);
|
|
12273
12750
|
this.innerViewId = -1;
|
|
12274
12751
|
this.jsvBaseView = null;
|
|
12275
12752
|
console.log("success remove innerview");
|
|
12276
12753
|
}
|
|
12277
12754
|
}
|
|
12278
12755
|
};
|
|
12279
|
-
function _sfc_render$
|
|
12756
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12280
12757
|
return openBlock(), createElementBlock("div", { "data-jsv-vw-innerview": $data.innerViewId }, null, 8, ["data-jsv-vw-innerview"]);
|
|
12281
12758
|
}
|
|
12282
|
-
const JsvQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12759
|
+
const JsvQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$6]]);
|
|
12283
12760
|
|
|
12284
12761
|
//
|
|
12285
12762
|
// utils/JsViewVueWidget/JsvQrcode/index.js;
|
|
@@ -12343,7 +12820,7 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
12343
12820
|
const texture_manager = handles.TextureManager;
|
|
12344
12821
|
let texture_setting;
|
|
12345
12822
|
if (pointRes.trim().startsWith("#") || pointRes.trim().startsWith("rgba")) {
|
|
12346
|
-
texture_setting = new Forge$
|
|
12823
|
+
texture_setting = new Forge$2.TextureSetting(
|
|
12347
12824
|
texture_manager.GetColorTexture(pointRes)
|
|
12348
12825
|
);
|
|
12349
12826
|
} else {
|
|
@@ -12354,11 +12831,11 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
12354
12831
|
} else if (window.JsView.Dom.UrlRef) {
|
|
12355
12832
|
image_url = new window.JsView.Dom.UrlRef(pointRes).href;
|
|
12356
12833
|
}
|
|
12357
|
-
texture_setting = new Forge$
|
|
12834
|
+
texture_setting = new Forge$2.ExternalTextureSetting(
|
|
12358
12835
|
texture_manager.GetImage2(image_url, false, null, "RGB_8888", null)
|
|
12359
12836
|
);
|
|
12360
12837
|
}
|
|
12361
|
-
const spray_view = new Forge$
|
|
12838
|
+
const spray_view = new Forge$2.SprayView(texture_setting);
|
|
12362
12839
|
const add_num_per_frame = sprayStyle.addNumSpeed ? sprayStyle.addNumSpeed : 1e-3;
|
|
12363
12840
|
const accelerate_x = typeof sprayStyle.accelerateX !== "undefined" ? sprayStyle.accelerateX : 0;
|
|
12364
12841
|
const accelerate_y = typeof sprayStyle.accelerateY !== "undefined" ? sprayStyle.accelerateY : -100;
|
|
@@ -12405,9 +12882,9 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
12405
12882
|
const view_height = sprayStyle.deltaHeight === 0 ? 1 : 2 * sprayStyle.deltaHeight;
|
|
12406
12883
|
sizeRef.width = view_width;
|
|
12407
12884
|
sizeRef.height = view_height;
|
|
12408
|
-
return Forge$
|
|
12885
|
+
return Forge$2.sViewStore.add(new Forge$2.ViewInfo(spray_view, null));
|
|
12409
12886
|
};
|
|
12410
|
-
const _sfc_main$
|
|
12887
|
+
const _sfc_main$q = {
|
|
12411
12888
|
props: {
|
|
12412
12889
|
pointRes: {
|
|
12413
12890
|
type: String,
|
|
@@ -12434,7 +12911,7 @@ const _sfc_main$p = {
|
|
|
12434
12911
|
methods: {
|
|
12435
12912
|
unloadView() {
|
|
12436
12913
|
if (this.viewId != -1) {
|
|
12437
|
-
Forge$
|
|
12914
|
+
Forge$2.sViewStore.remove(this.viewId);
|
|
12438
12915
|
this.viewId = -1;
|
|
12439
12916
|
}
|
|
12440
12917
|
}
|
|
@@ -12460,13 +12937,13 @@ const _sfc_main$p = {
|
|
|
12460
12937
|
this.unloadView();
|
|
12461
12938
|
}
|
|
12462
12939
|
};
|
|
12463
|
-
function _sfc_render$
|
|
12940
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12464
12941
|
return openBlock(), createElementBlock("div", {
|
|
12465
12942
|
style: normalizeStyle({ width: $data.size.width, height: $data.size.height }),
|
|
12466
12943
|
"data-jsv-vw-innerview": $data.viewId
|
|
12467
12944
|
}, null, 12, ["data-jsv-vw-innerview"]);
|
|
12468
12945
|
}
|
|
12469
|
-
const JsvSpray = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12946
|
+
const JsvSpray = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$5]]);
|
|
12470
12947
|
|
|
12471
12948
|
//
|
|
12472
12949
|
// utils/JsViewVueWidget/JsvSpray/index.js;
|
|
@@ -12722,7 +13199,7 @@ const JsvSpriteAnim_vue_vue_type_style_index_0_scoped_00add5ef_lang = "";
|
|
|
12722
13199
|
|
|
12723
13200
|
|
|
12724
13201
|
*/
|
|
12725
|
-
const _sfc_main$
|
|
13202
|
+
const _sfc_main$p = {
|
|
12726
13203
|
__name: "JsvSpriteAnim",
|
|
12727
13204
|
props: {
|
|
12728
13205
|
spriteInfo: Object,
|
|
@@ -13059,7 +13536,7 @@ const _sfc_main$o = {
|
|
|
13059
13536
|
};
|
|
13060
13537
|
const styleSheetsContent$1 = { "0": { "sprite-tag-00add5ef": "@keyframes sprite-tag-00add5ef {}" } };
|
|
13061
13538
|
window.JsvCode.Dom.DeclareStyleSheets(styleSheetsContent$1);
|
|
13062
|
-
const JsvSpriteAnim = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13539
|
+
const JsvSpriteAnim = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-00add5ef"]]);
|
|
13063
13540
|
|
|
13064
13541
|
//
|
|
13065
13542
|
// utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue;
|
|
@@ -13079,7 +13556,7 @@ const JsvSpriteAnim = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "d
|
|
|
13079
13556
|
|
|
13080
13557
|
|
|
13081
13558
|
*/
|
|
13082
|
-
const _sfc_main$
|
|
13559
|
+
const _sfc_main$o = {
|
|
13083
13560
|
__name: "JsvSpriteLoader",
|
|
13084
13561
|
props: {
|
|
13085
13562
|
imageUrl: String,
|
|
@@ -13285,7 +13762,7 @@ let JsvSpriteTools = {
|
|
|
13285
13762
|
|
|
13286
13763
|
|
|
13287
13764
|
*/
|
|
13288
|
-
const _sfc_main$
|
|
13765
|
+
const _sfc_main$n = {
|
|
13289
13766
|
__name: "JsvVisibleSensor",
|
|
13290
13767
|
props: {
|
|
13291
13768
|
// (支持reactive)可视区域设定
|
|
@@ -13360,7 +13837,7 @@ const _sfc_main$m = {
|
|
|
13360
13837
|
};
|
|
13361
13838
|
onMounted(() => {
|
|
13362
13839
|
console.log("JsvVisibleSensor: on mounted");
|
|
13363
|
-
sensorRef = new Forge$
|
|
13840
|
+
sensorRef = new Forge$2.VisibleSensor(
|
|
13364
13841
|
toRaw(viewRef.value).jsvGetProxyView(),
|
|
13365
13842
|
(old_h, new_h, old_v, new_v) => {
|
|
13366
13843
|
visibleChange(old_h, new_h, old_v, new_v);
|
|
@@ -13408,7 +13885,7 @@ const _sfc_main$m = {
|
|
|
13408
13885
|
|
|
13409
13886
|
var JsvVisibleSensor$1 = /*#__PURE__*/Object.freeze({
|
|
13410
13887
|
__proto__: null,
|
|
13411
|
-
default: _sfc_main$
|
|
13888
|
+
default: _sfc_main$n
|
|
13412
13889
|
});
|
|
13413
13890
|
|
|
13414
13891
|
//
|
|
@@ -13483,8 +13960,8 @@ const keyCode2EdgeDirection = (keyCode) => {
|
|
|
13483
13960
|
return null;
|
|
13484
13961
|
}
|
|
13485
13962
|
};
|
|
13486
|
-
const _sfc_main$
|
|
13487
|
-
components: { JsvActorMove: _sfc_main$
|
|
13963
|
+
const _sfc_main$m = {
|
|
13964
|
+
components: { JsvActorMove: _sfc_main$A, JsvVisibleSensor },
|
|
13488
13965
|
props: {
|
|
13489
13966
|
showIndicator: {
|
|
13490
13967
|
type: Boolean,
|
|
@@ -13799,7 +14276,7 @@ const _sfc_main$l = {
|
|
|
13799
14276
|
case "translate":
|
|
13800
14277
|
if (smooth) {
|
|
13801
14278
|
const speed = (this.vertical ? this.layoutInfo.height : this.layoutInfo.width) / this.animation.duration * 1e3;
|
|
13802
|
-
curViewAnimation = new Forge$
|
|
14279
|
+
curViewAnimation = new Forge$2.TranslateFrameAnimation(
|
|
13803
14280
|
this.vertical ? direction * this.layoutInfo.height : direction * this.layoutInfo.width,
|
|
13804
14281
|
0,
|
|
13805
14282
|
speed,
|
|
@@ -13807,7 +14284,7 @@ const _sfc_main$l = {
|
|
|
13807
14284
|
this.vertical ? 0 : direction * this.layoutInfo.width,
|
|
13808
14285
|
this.vertical ? direction * this.layoutInfo.height : 0
|
|
13809
14286
|
);
|
|
13810
|
-
preViewAnimation = new Forge$
|
|
14287
|
+
preViewAnimation = new Forge$2.TranslateFrameAnimation(
|
|
13811
14288
|
this.vertical ? direction * this.layoutInfo.height : direction * this.layoutInfo.width,
|
|
13812
14289
|
0,
|
|
13813
14290
|
speed,
|
|
@@ -13816,7 +14293,7 @@ const _sfc_main$l = {
|
|
|
13816
14293
|
this.vertical ? direction * this.layoutInfo.height : 0
|
|
13817
14294
|
);
|
|
13818
14295
|
} else {
|
|
13819
|
-
curViewAnimation = new Forge$
|
|
14296
|
+
curViewAnimation = new Forge$2.TranslateAnimation(
|
|
13820
14297
|
this.vertical ? 0 : direction * this.layoutInfo.width,
|
|
13821
14298
|
0,
|
|
13822
14299
|
this.vertical ? direction * this.layoutInfo.height : 0,
|
|
@@ -13824,7 +14301,7 @@ const _sfc_main$l = {
|
|
|
13824
14301
|
duration,
|
|
13825
14302
|
null
|
|
13826
14303
|
);
|
|
13827
|
-
preViewAnimation = new Forge$
|
|
14304
|
+
preViewAnimation = new Forge$2.TranslateAnimation(
|
|
13828
14305
|
this.vertical ? 0 : direction * this.layoutInfo.width,
|
|
13829
14306
|
0,
|
|
13830
14307
|
this.vertical ? direction * this.layoutInfo.height : 0,
|
|
@@ -13840,7 +14317,7 @@ const _sfc_main$l = {
|
|
|
13840
14317
|
break;
|
|
13841
14318
|
}
|
|
13842
14319
|
curViewAnimation.SetAnimationListener(
|
|
13843
|
-
new Forge$
|
|
14320
|
+
new Forge$2.AnimationListener(null, this._onAnimationEnd, null)
|
|
13844
14321
|
);
|
|
13845
14322
|
this.$refs.element?.[this.currentViewIndex]?.jsvGetProxyView(true).StartAnimation(curViewAnimation);
|
|
13846
14323
|
this.$refs.element?.[modToRange(this.currentViewIndex - direction, VIEW_NUM)]?.jsvGetProxyView(true).StartAnimation(preViewAnimation);
|
|
@@ -13871,7 +14348,7 @@ const _sfc_main$l = {
|
|
|
13871
14348
|
this.stopAutoplay();
|
|
13872
14349
|
}
|
|
13873
14350
|
};
|
|
13874
|
-
function _sfc_render$
|
|
14351
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13875
14352
|
const _component_jsv_visible_sensor = resolveComponent("jsv-visible-sensor");
|
|
13876
14353
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
13877
14354
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -13971,7 +14448,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13971
14448
|
}, 8, ["name", "style", "onAction"])
|
|
13972
14449
|
], 64);
|
|
13973
14450
|
}
|
|
13974
|
-
const JsvSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14451
|
+
const JsvSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$4]]);
|
|
13975
14452
|
|
|
13976
14453
|
//
|
|
13977
14454
|
// utils/JsViewVueWidget/JsvSwiper/index.js;
|
|
@@ -14004,7 +14481,7 @@ const JsvSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_rend
|
|
|
14004
14481
|
|
|
14005
14482
|
|
|
14006
14483
|
*/
|
|
14007
|
-
const _sfc_main$
|
|
14484
|
+
const _sfc_main$l = {
|
|
14008
14485
|
__name: "JsvSwiper",
|
|
14009
14486
|
props: {
|
|
14010
14487
|
dispNumber: { type: Number, require: true },
|
|
@@ -14450,7 +14927,7 @@ const TexAlignAnchor$1 = {
|
|
|
14450
14927
|
CENTER_BOTTOM: 8,
|
|
14451
14928
|
RIGHT_BOTTOM: 9
|
|
14452
14929
|
};
|
|
14453
|
-
const _sfc_main$
|
|
14930
|
+
const _sfc_main$k = {
|
|
14454
14931
|
props: {
|
|
14455
14932
|
src: String,
|
|
14456
14933
|
top: Number,
|
|
@@ -14506,8 +14983,8 @@ const _sfc_main$j = {
|
|
|
14506
14983
|
decorate_setting
|
|
14507
14984
|
);
|
|
14508
14985
|
} else {
|
|
14509
|
-
let texture_set = new Forge$
|
|
14510
|
-
return new Forge$
|
|
14986
|
+
let texture_set = new Forge$2.ExternalTextureSetting(view_texture);
|
|
14987
|
+
return new Forge$2.LayoutView(texture_set);
|
|
14511
14988
|
}
|
|
14512
14989
|
},
|
|
14513
14990
|
_readRadius(setting) {
|
|
@@ -14556,8 +15033,8 @@ const _sfc_main$j = {
|
|
|
14556
15033
|
},
|
|
14557
15034
|
_createNinePatchAlphaMixView(view_texture, decorate_setting) {
|
|
14558
15035
|
const textureManager = handles.TextureManager;
|
|
14559
|
-
let texture_set = new Forge$
|
|
14560
|
-
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);
|
|
14561
15038
|
if (decorate_setting.url) {
|
|
14562
15039
|
let converted_url = urlCheckSet(decorate_setting.url);
|
|
14563
15040
|
let view_texture2 = textureManager.GetImage2(converted_url);
|
|
@@ -14581,17 +15058,17 @@ const _sfc_main$j = {
|
|
|
14581
15058
|
return nine_patch_view;
|
|
14582
15059
|
},
|
|
14583
15060
|
_createBorderRadius(view_texture, decorate_setting) {
|
|
14584
|
-
let texture_mask = new Forge$
|
|
15061
|
+
let texture_mask = new Forge$2.ViewRoundCornerMask(
|
|
14585
15062
|
numberCheckSet(decorate_setting.topLeft),
|
|
14586
15063
|
numberCheckSet(decorate_setting.topRight),
|
|
14587
15064
|
numberCheckSet(decorate_setting.bottomLeft),
|
|
14588
15065
|
numberCheckSet(decorate_setting.bottomRight)
|
|
14589
15066
|
);
|
|
14590
|
-
let texture_set = new Forge$
|
|
15067
|
+
let texture_set = new Forge$2.ExternalTextureSetting(
|
|
14591
15068
|
view_texture,
|
|
14592
15069
|
texture_mask
|
|
14593
15070
|
);
|
|
14594
|
-
return new Forge$
|
|
15071
|
+
return new Forge$2.LayoutView(texture_set);
|
|
14595
15072
|
},
|
|
14596
15073
|
_onAnimationEnd() {
|
|
14597
15074
|
this.onAnimationEnd?.();
|
|
@@ -14653,7 +15130,7 @@ const _sfc_main$j = {
|
|
|
14653
15130
|
}
|
|
14654
15131
|
this._updateTexCoord();
|
|
14655
15132
|
if (this.animation) {
|
|
14656
|
-
this.forgeAnimation = new Forge$
|
|
15133
|
+
this.forgeAnimation = new Forge$2.CssKeyframeAnimation(
|
|
14657
15134
|
"@keyframes texAnimDef" + this.animation,
|
|
14658
15135
|
this.duration,
|
|
14659
15136
|
null,
|
|
@@ -14661,20 +15138,21 @@ const _sfc_main$j = {
|
|
|
14661
15138
|
1
|
|
14662
15139
|
);
|
|
14663
15140
|
this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
|
|
15141
|
+
this.forgeAnimation.Enable(Forge$2.AnimationEnable.ReleaseAfterEndCallback);
|
|
14664
15142
|
this.forgeAnimation.SetAnimationListener(
|
|
14665
|
-
new Forge$
|
|
15143
|
+
new Forge$2.AnimationListener(null, this._onAnimationEnd, null)
|
|
14666
15144
|
);
|
|
14667
15145
|
} else {
|
|
14668
15146
|
this.forgeAnimation = null;
|
|
14669
15147
|
}
|
|
14670
|
-
this.innerViewId = Forge$
|
|
14671
|
-
new Forge$
|
|
15148
|
+
this.innerViewId = Forge$2.sViewStore.add(
|
|
15149
|
+
new Forge$2.ViewInfo(this.innerView)
|
|
14672
15150
|
);
|
|
14673
15151
|
}
|
|
14674
15152
|
},
|
|
14675
15153
|
beforeUnmount() {
|
|
14676
15154
|
if (this.innerViewId !== -1) {
|
|
14677
|
-
Forge$
|
|
15155
|
+
Forge$2.sViewStore.remove(this.innerViewId);
|
|
14678
15156
|
this.innerViewId = -1;
|
|
14679
15157
|
}
|
|
14680
15158
|
},
|
|
@@ -14686,7 +15164,7 @@ const _sfc_main$j = {
|
|
|
14686
15164
|
activated() {
|
|
14687
15165
|
if (this.innerView) {
|
|
14688
15166
|
if (this.animation && this.forgeAnimation == null) {
|
|
14689
|
-
this.forgeAnimation = new Forge$
|
|
15167
|
+
this.forgeAnimation = new Forge$2.CssKeyframeAnimation(
|
|
14690
15168
|
"@keyframes texAnimDef" + this.animation,
|
|
14691
15169
|
this.duration,
|
|
14692
15170
|
null,
|
|
@@ -14694,8 +15172,9 @@ const _sfc_main$j = {
|
|
|
14694
15172
|
1
|
|
14695
15173
|
);
|
|
14696
15174
|
this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
|
|
15175
|
+
this.forgeAnimation.Enable(Forge$2.AnimationEnable.ReleaseAfterEndCallback);
|
|
14697
15176
|
this.forgeAnimation.SetAnimationListener(
|
|
14698
|
-
new Forge$
|
|
15177
|
+
new Forge$2.AnimationListener(null, this._onAnimationEnd, null)
|
|
14699
15178
|
);
|
|
14700
15179
|
this.innerView.StartTextureAnimation(this.forgeAnimation);
|
|
14701
15180
|
} else {
|
|
@@ -14710,7 +15189,7 @@ const _sfc_main$j = {
|
|
|
14710
15189
|
this.forgeAnimation = null;
|
|
14711
15190
|
}
|
|
14712
15191
|
};
|
|
14713
|
-
function _sfc_render$
|
|
15192
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14714
15193
|
return openBlock(), createElementBlock("div", {
|
|
14715
15194
|
style: normalizeStyle({
|
|
14716
15195
|
top: $props.top,
|
|
@@ -14722,7 +15201,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14722
15201
|
"data-jsv-vw-innerview": $setup.innerViewId
|
|
14723
15202
|
}, null, 12, ["data-jsv-vw-innerview"]);
|
|
14724
15203
|
}
|
|
14725
|
-
const JsvTextureAnim = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15204
|
+
const JsvTextureAnim = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$3]]);
|
|
14726
15205
|
|
|
14727
15206
|
//
|
|
14728
15207
|
// utils/JsViewVueWidget/JsvTextureAnim/index.js;
|
|
@@ -14755,7 +15234,7 @@ const TexAlignAnchor = TexAlignAnchor$1;
|
|
|
14755
15234
|
|
|
14756
15235
|
|
|
14757
15236
|
*/
|
|
14758
|
-
const _sfc_main$
|
|
15237
|
+
const _sfc_main$j = {
|
|
14759
15238
|
__name: "JsvFilterView",
|
|
14760
15239
|
props: {
|
|
14761
15240
|
width: {
|
|
@@ -14779,8 +15258,8 @@ const _sfc_main$i = {
|
|
|
14779
15258
|
},
|
|
14780
15259
|
setup(__props) {
|
|
14781
15260
|
const props = __props;
|
|
14782
|
-
let filterView = new Forge$
|
|
14783
|
-
let viewId = Forge$
|
|
15261
|
+
let filterView = new Forge$2.FilterView();
|
|
15262
|
+
let viewId = Forge$2.sViewStore.add(new Forge$2.ViewInfo(filterView, null));
|
|
14784
15263
|
watchEffect(() => {
|
|
14785
15264
|
if (filterView) {
|
|
14786
15265
|
console.log(`filterType change to ${props.filterType}`);
|
|
@@ -14795,7 +15274,7 @@ const _sfc_main$i = {
|
|
|
14795
15274
|
});
|
|
14796
15275
|
onBeforeUnmount(() => {
|
|
14797
15276
|
if (viewId > 0) {
|
|
14798
|
-
Forge$
|
|
15277
|
+
Forge$2.sViewStore.remove(viewId);
|
|
14799
15278
|
viewId = -1;
|
|
14800
15279
|
}
|
|
14801
15280
|
});
|
|
@@ -14908,7 +15387,7 @@ class LineType extends UpdateType {
|
|
|
14908
15387
|
this.end = end;
|
|
14909
15388
|
}
|
|
14910
15389
|
}
|
|
14911
|
-
const _sfc_main$
|
|
15390
|
+
const _sfc_main$i = {
|
|
14912
15391
|
props: {
|
|
14913
15392
|
left: {
|
|
14914
15393
|
type: Number
|
|
@@ -15370,7 +15849,7 @@ const _sfc_main$h = {
|
|
|
15370
15849
|
}
|
|
15371
15850
|
}
|
|
15372
15851
|
};
|
|
15373
|
-
function _sfc_render$
|
|
15852
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15374
15853
|
const _component_jsv_focus_block = resolveComponent("jsv-focus-block");
|
|
15375
15854
|
return openBlock(), createBlock(_component_jsv_focus_block, {
|
|
15376
15855
|
ref: "focusBlock",
|
|
@@ -15408,7 +15887,116 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15408
15887
|
_: 3
|
|
15409
15888
|
}, 8, ["name", "onAction", "style"]);
|
|
15410
15889
|
}
|
|
15411
|
-
const JsvGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15890
|
+
const JsvGrid = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$2]]);
|
|
15891
|
+
|
|
15892
|
+
//
|
|
15893
|
+
// utils/JsViewVueWidget/JsvNinePatch.vue;
|
|
15894
|
+
//
|
|
15895
|
+
/* <!--
|
|
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 }
|
|
15941
|
+
},
|
|
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;
|
|
15949
|
+
};
|
|
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;
|
|
15960
|
+
}
|
|
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)
|
|
15972
|
+
);
|
|
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
|
+
);
|
|
15981
|
+
}
|
|
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
|
+
};
|
|
15412
16000
|
|
|
15413
16001
|
//
|
|
15414
16002
|
// utils/JsViewVueWidget/JsvNativeSharedDiv.vue;
|
|
@@ -15420,12 +16008,16 @@ const JsvGrid = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render
|
|
|
15420
16008
|
* getId {function} 回调函数,用于接收ID信息,ID信息用于Native端对该view进行跟踪的标识
|
|
15421
16009
|
* setId {String} 给定命名ID,避免同进程不同context重名要和Context相关,
|
|
15422
16010
|
* 例如`${window.JsView?.getJsContextId()}_${you_name}`
|
|
16011
|
+
* corner {Number} 圆角的尺寸,默认为0
|
|
16012
|
+
*
|
|
15423
16013
|
-->
|
|
15424
16014
|
|
|
15425
16015
|
|
|
15426
16016
|
|
|
16017
|
+
|
|
15427
16018
|
*/
|
|
15428
16019
|
const _sfc_main$g = {
|
|
16020
|
+
__name: "JsvNativeSharedDiv",
|
|
15429
16021
|
props: {
|
|
15430
16022
|
style: {
|
|
15431
16023
|
type: Object,
|
|
@@ -15435,74 +16027,112 @@ const _sfc_main$g = {
|
|
|
15435
16027
|
},
|
|
15436
16028
|
getId: Function,
|
|
15437
16029
|
setId: String,
|
|
15438
|
-
|
|
15439
|
-
type:
|
|
15440
|
-
default:
|
|
16030
|
+
corner: {
|
|
16031
|
+
type: Number,
|
|
16032
|
+
default: 0
|
|
15441
16033
|
}
|
|
15442
16034
|
},
|
|
15443
|
-
setup() {
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
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());
|
|
15471
16074
|
}
|
|
15472
|
-
this.getId?.(this.jsvMainView.GetTrackId());
|
|
15473
|
-
}
|
|
15474
|
-
},
|
|
15475
|
-
beforeUnmount() {
|
|
15476
|
-
if (this.isBrowserDebug) {
|
|
15477
|
-
return;
|
|
15478
|
-
}
|
|
15479
|
-
if (this.innerViewId !== -1) {
|
|
15480
|
-
Forge$1.sViewStore.remove(this.innerViewId);
|
|
15481
|
-
this.innerViewId = -1;
|
|
15482
|
-
this.jsvMainView = null;
|
|
15483
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
|
+
};
|
|
15484
16134
|
}
|
|
15485
16135
|
};
|
|
15486
|
-
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15487
|
-
return !$setup.isBrowserDebug ? (openBlock(), createElementBlock("div", {
|
|
15488
|
-
key: 0,
|
|
15489
|
-
style: normalizeStyle({
|
|
15490
|
-
left: $props.style.left,
|
|
15491
|
-
top: $props.style.top,
|
|
15492
|
-
width: $props.style.width,
|
|
15493
|
-
height: $props.style.height
|
|
15494
|
-
}),
|
|
15495
|
-
"data-jsv-vw-innerview": $setup.innerViewId
|
|
15496
|
-
}, [
|
|
15497
|
-
renderSlot(_ctx.$slots, "default")
|
|
15498
|
-
], 12, ["data-jsv-vw-innerview"])) : (openBlock(), createElementBlock("div", {
|
|
15499
|
-
key: 1,
|
|
15500
|
-
style: normalizeStyle({ ...$props.style })
|
|
15501
|
-
}, [
|
|
15502
|
-
renderSlot(_ctx.$slots, "default")
|
|
15503
|
-
], 4));
|
|
15504
|
-
}
|
|
15505
|
-
const JsvTransparentDiv = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$2]]);
|
|
15506
16136
|
|
|
15507
16137
|
//
|
|
15508
16138
|
// utils/JsViewVueWidget/JsvHole.js;
|
|
@@ -15678,7 +16308,7 @@ const _sfc_main$f = {
|
|
|
15678
16308
|
};
|
|
15679
16309
|
sureNum();
|
|
15680
16310
|
const baseSlide = (refObj, startPos, endPos, callback) => {
|
|
15681
|
-
const anim = new Forge$
|
|
16311
|
+
const anim = new Forge$2.TranslateFrameAnimation(
|
|
15682
16312
|
startPos,
|
|
15683
16313
|
endPos,
|
|
15684
16314
|
props.slideSpeed,
|
|
@@ -15687,7 +16317,7 @@ const _sfc_main$f = {
|
|
|
15687
16317
|
0
|
|
15688
16318
|
);
|
|
15689
16319
|
anim.SetAnimationListener(
|
|
15690
|
-
new Forge$
|
|
16320
|
+
new Forge$2.AnimationListener(
|
|
15691
16321
|
null,
|
|
15692
16322
|
(ended) => {
|
|
15693
16323
|
if (ended) {
|
|
@@ -15697,7 +16327,7 @@ const _sfc_main$f = {
|
|
|
15697
16327
|
null
|
|
15698
16328
|
)
|
|
15699
16329
|
);
|
|
15700
|
-
anim.Enable(Forge$
|
|
16330
|
+
anim.Enable(Forge$2.AnimationEnable.ReleaseAfterEndCallback);
|
|
15701
16331
|
toRaw(refObj.value)?.jsvGetProxyView(true).StartAnimation(anim);
|
|
15702
16332
|
};
|
|
15703
16333
|
const slideTimer = () => {
|
|
@@ -15936,6 +16566,7 @@ const _sfc_main$f = {
|
|
|
15936
16566
|
|
|
15937
16567
|
|
|
15938
16568
|
*/
|
|
16569
|
+
const renderDocument = window.JsvCode.Dom.RenderDocument ? window.JsvCode.Dom.RenderDocument : window.JsvCode.Dom.BrowserDocument;
|
|
15939
16570
|
const _sfc_main$e = {
|
|
15940
16571
|
props: {
|
|
15941
16572
|
class: {
|
|
@@ -16024,7 +16655,7 @@ const _sfc_main$e = {
|
|
|
16024
16655
|
_initForHtml() {
|
|
16025
16656
|
let _this = this;
|
|
16026
16657
|
this.$refs.innerViewDiv?.jsvGetProxyView(true).RegisterOnProxyReady(() => {
|
|
16027
|
-
const canvas =
|
|
16658
|
+
const canvas = renderDocument.createElement("canvas");
|
|
16028
16659
|
canvas.style.width = _this.style.width + "px";
|
|
16029
16660
|
canvas.style.height = _this.style.height + "px";
|
|
16030
16661
|
_this.$refs.innerViewDiv?.jsvGetProxyView(true).HtmlGetElement().appendChild(canvas);
|
|
@@ -16046,9 +16677,9 @@ const _sfc_main$e = {
|
|
|
16046
16677
|
},
|
|
16047
16678
|
_updateInnerView() {
|
|
16048
16679
|
if (this.innerView === null) {
|
|
16049
|
-
this.innerView = new Forge$
|
|
16050
|
-
this.innerViewId = Forge$
|
|
16051
|
-
new Forge$
|
|
16680
|
+
this.innerView = new Forge$2.LayoutView();
|
|
16681
|
+
this.innerViewId = Forge$2.sViewStore.add(
|
|
16682
|
+
new Forge$2.ViewInfo(this.innerView, null)
|
|
16052
16683
|
);
|
|
16053
16684
|
}
|
|
16054
16685
|
if (this.viewSrc !== this.cache.viewSrc || this.maskSrc !== this.cache.maskSrc) {
|
|
@@ -16086,7 +16717,7 @@ const _sfc_main$e = {
|
|
|
16086
16717
|
},
|
|
16087
16718
|
beforeUnmount() {
|
|
16088
16719
|
if (this.innerViewId !== -1) {
|
|
16089
|
-
Forge$
|
|
16720
|
+
Forge$2.sViewStore.remove(this.innerViewId);
|
|
16090
16721
|
this.innerViewId = -1;
|
|
16091
16722
|
this.innerView = null;
|
|
16092
16723
|
}
|
|
@@ -16113,112 +16744,6 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16113
16744
|
}
|
|
16114
16745
|
const JsvMaskClipDiv = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1]]);
|
|
16115
16746
|
|
|
16116
|
-
//
|
|
16117
|
-
// utils/JsViewVueWidget/JsvNinePatch.vue;
|
|
16118
|
-
//
|
|
16119
|
-
/* <!--
|
|
16120
|
-
* 【模块 export 内容】
|
|
16121
|
-
* JsvNinePatch:Vue高阶组件,.9图展示控件,该控件的原图要求为正方形,延展后可为长方形
|
|
16122
|
-
* props说明:
|
|
16123
|
-
* style {Object} 同div的Style,通过width/height来控制.9图片延展后的显示尺寸,另外通过top/left控制坐标
|
|
16124
|
-
* imageUrl {String} (必填)显示图片的加载地址
|
|
16125
|
-
* imageWidth {int} (必填)原图信息: 原图的宽度(由于正方形,宽高相同)
|
|
16126
|
-
* contentWidth {int} (废弃)此值为了兼容,会赋值给centerWidth
|
|
16127
|
-
* centerWidth {int} (必填)原图信息: .9图的中心区域宽度(repeat区域)
|
|
16128
|
-
* imageDspWidth {int} 原图缩放后的显示宽度,计算方法:
|
|
16129
|
-
* 四角为90度圆弧时: imageDspWidth = 显示图形的圆弧半径 / 原图中圆弧的半径 * 原图宽度
|
|
16130
|
-
* 原图中圆弧半径 = (原图宽度 - borderOutset * 2) / 2
|
|
16131
|
-
* 四角为其他形状时,原图.9图的四角区域,缩放到要和显示图形重合后的宽度。
|
|
16132
|
-
* borderOutset {int} (必填)原图信息: 图片边缘到中心内容区域边缘的距离, 快速计算: (原图宽度 - 原图中放内容宽度) / 2
|
|
16133
|
-
* animTime {int} (必填)缩放动画的时长(单位秒)
|
|
16134
|
-
* waitForInit {boolean} (选填)尺寸为0时是否进行描画(例如: 首次显示不展示动画的场合,设置为true),默认值为true
|
|
16135
|
-
* onTransitionEnd { Function } (选填)transition动画结束的回调
|
|
16136
|
-
-->
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
*/
|
|
16142
|
-
const _sfc_main$d = {
|
|
16143
|
-
__name: "JsvNinePatch",
|
|
16144
|
-
props: {
|
|
16145
|
-
style: {
|
|
16146
|
-
type: Object,
|
|
16147
|
-
default: () => {
|
|
16148
|
-
return {};
|
|
16149
|
-
}
|
|
16150
|
-
},
|
|
16151
|
-
top: { type: Number, default: 0 },
|
|
16152
|
-
left: { type: Number, default: 0 },
|
|
16153
|
-
waitForInit: { type: Boolean, default: true },
|
|
16154
|
-
imageUrl: { type: String, required: true },
|
|
16155
|
-
imageWidth: { type: Number, required: true },
|
|
16156
|
-
imageDspWidth: { type: Number, default: 0 },
|
|
16157
|
-
contentWidth: { type: Number, default: -1 },
|
|
16158
|
-
centerWidth: { type: Number, default: -1, required: true },
|
|
16159
|
-
borderOutset: { type: Number, required: true },
|
|
16160
|
-
animTime: { type: Number, default: 0 },
|
|
16161
|
-
onTransitionEnd: { type: Function },
|
|
16162
|
-
animation: { type: String }
|
|
16163
|
-
},
|
|
16164
|
-
setup(__props) {
|
|
16165
|
-
const props = __props;
|
|
16166
|
-
const isReady = () => {
|
|
16167
|
-
if (!props.waitForInit) {
|
|
16168
|
-
return true;
|
|
16169
|
-
}
|
|
16170
|
-
return props.style && props.style.width !== 0 && props.style.height !== 0;
|
|
16171
|
-
};
|
|
16172
|
-
const getTransition = () => {
|
|
16173
|
-
let transition = "";
|
|
16174
|
-
if (props.animTime && props.animTime > 0) {
|
|
16175
|
-
transition = `left ${props.animTime}s, top ${props.animTime}s, width ${props.animTime}s, height ${props.animTime}s`;
|
|
16176
|
-
}
|
|
16177
|
-
return transition;
|
|
16178
|
-
};
|
|
16179
|
-
let centerWidth = props.contentWidth > 0 ? props.contentWidth : 1;
|
|
16180
|
-
if (props.centerWidth >= 0) {
|
|
16181
|
-
centerWidth = props.centerWidth > 0 ? props.centerWidth : 1;
|
|
16182
|
-
}
|
|
16183
|
-
const imageDspWidthInner = computed(
|
|
16184
|
-
() => props.imageDspWidth > 0 ? props.imageDspWidth : props.imageWidth
|
|
16185
|
-
);
|
|
16186
|
-
const sliceWidth = ref(
|
|
16187
|
-
Math.ceil(Math.max(0, (props.imageWidth - centerWidth) / 2))
|
|
16188
|
-
);
|
|
16189
|
-
const borderDspWidth = ref(
|
|
16190
|
-
Math.ceil(sliceWidth.value * imageDspWidthInner.value / props.imageWidth)
|
|
16191
|
-
);
|
|
16192
|
-
const convertedBorderOutset = ref(
|
|
16193
|
-
Math.ceil(props.borderOutset * imageDspWidthInner.value / props.imageWidth)
|
|
16194
|
-
);
|
|
16195
|
-
watchEffect(() => {
|
|
16196
|
-
if (props.style?.width && props.style.width <= imageDspWidthInner.value || props.style?.height && props.style.height <= imageDspWidthInner.value) {
|
|
16197
|
-
console.warn(
|
|
16198
|
-
"JsvNinePatch: style size must be larger than imageDspWidth. style is",
|
|
16199
|
-
props.style,
|
|
16200
|
-
"imageDspWidth is",
|
|
16201
|
-
imageDspWidthInner.value
|
|
16202
|
-
);
|
|
16203
|
-
}
|
|
16204
|
-
});
|
|
16205
|
-
return (_ctx, _cache) => {
|
|
16206
|
-
return isReady() ? (openBlock(), createElementBlock("div", {
|
|
16207
|
-
key: 0,
|
|
16208
|
-
style: normalizeStyle({
|
|
16209
|
-
...__props.style,
|
|
16210
|
-
transition: !!__props.animation ? null : getTransition(),
|
|
16211
|
-
animation: __props.animation,
|
|
16212
|
-
borderImage: `url(${__props.imageUrl}) ${sliceWidth.value} fill`,
|
|
16213
|
-
borderImageWidth: `${borderDspWidth.value}px`,
|
|
16214
|
-
borderImageOutset: `${convertedBorderOutset.value}px`
|
|
16215
|
-
}),
|
|
16216
|
-
onTransitionend: _cache[0] || (_cache[0] = (...args) => props.onTransitionEnd && props.onTransitionEnd(...args))
|
|
16217
|
-
}, null, 36)) : createCommentVNode("", true);
|
|
16218
|
-
};
|
|
16219
|
-
}
|
|
16220
|
-
};
|
|
16221
|
-
|
|
16222
16747
|
//
|
|
16223
16748
|
// utils/JsViewVueWidget/JsvPosterDiv.vue;
|
|
16224
16749
|
//
|
|
@@ -16236,7 +16761,7 @@ const _sfc_main$d = {
|
|
|
16236
16761
|
|
|
16237
16762
|
|
|
16238
16763
|
*/
|
|
16239
|
-
const _sfc_main$
|
|
16764
|
+
const _sfc_main$d = {
|
|
16240
16765
|
__name: "JsvPosterDiv",
|
|
16241
16766
|
props: {
|
|
16242
16767
|
style: Object
|
|
@@ -16277,16 +16802,19 @@ const _sfc_main$c = {
|
|
|
16277
16802
|
* 【模块 export 内容】
|
|
16278
16803
|
* JsvPosterImage:Vue高阶组件,海报描画,可设置color space 和 texture size
|
|
16279
16804
|
* props说明:
|
|
16280
|
-
* colorSpace {String} 颜色空间,默认RGBA_8888
|
|
16281
16805
|
* style {Object} 包含left/top/width/height/border-radius的style设置
|
|
16806
|
+
* colorSpace {String} 颜色空间,调整其他颜色空间可以节省内存,默认RGBA_8888
|
|
16282
16807
|
* imageCompress {boolean} 是否压缩图片, 默认打开
|
|
16808
|
+
* src {string} 图片的加载地址
|
|
16809
|
+
* fadeIn: {boolean} 图片加载完成是否有淡入效果,默认为打开
|
|
16810
|
+
* isPosterImage: 标识是否用于海报位,对于海报位的内容,可以有下载线程控制等策略来优化整体体验
|
|
16283
16811
|
-->
|
|
16284
16812
|
|
|
16285
16813
|
|
|
16286
16814
|
|
|
16287
16815
|
|
|
16288
16816
|
*/
|
|
16289
|
-
const _sfc_main$
|
|
16817
|
+
const _sfc_main$c = {
|
|
16290
16818
|
__name: "JsvPosterImage",
|
|
16291
16819
|
props: {
|
|
16292
16820
|
colorSpace: {
|
|
@@ -16324,7 +16852,15 @@ const _sfc_main$b = {
|
|
|
16324
16852
|
let show_background_holder = !!window.JsView;
|
|
16325
16853
|
watchEffect(() => {
|
|
16326
16854
|
if (props.style) {
|
|
16327
|
-
let {
|
|
16855
|
+
let {
|
|
16856
|
+
left,
|
|
16857
|
+
top,
|
|
16858
|
+
width,
|
|
16859
|
+
height,
|
|
16860
|
+
backgroundImage,
|
|
16861
|
+
backgroundColor,
|
|
16862
|
+
...others
|
|
16863
|
+
} = props.style;
|
|
16328
16864
|
common_style.left = left;
|
|
16329
16865
|
common_style.top = top;
|
|
16330
16866
|
image_style.width = width;
|
|
@@ -16369,7 +16905,7 @@ const _sfc_main$b = {
|
|
|
16369
16905
|
|
|
16370
16906
|
|
|
16371
16907
|
*/
|
|
16372
|
-
const _sfc_main$
|
|
16908
|
+
const _sfc_main$b = {
|
|
16373
16909
|
props: {
|
|
16374
16910
|
definitionScale: {
|
|
16375
16911
|
type: String
|
|
@@ -16381,7 +16917,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16381
16917
|
renderSlot(_ctx.$slots, "default")
|
|
16382
16918
|
], 8, ["data-jsv-vw-text-definition"]);
|
|
16383
16919
|
}
|
|
16384
|
-
const JsvScaleTextBox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16920
|
+
const JsvScaleTextBox = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render]]);
|
|
16385
16921
|
|
|
16386
16922
|
//
|
|
16387
16923
|
// utils/JsViewVueWidget/JsvSoundPool.js;
|
|
@@ -16612,7 +17148,7 @@ class JsvSoundPool {
|
|
|
16612
17148
|
/* <!--
|
|
16613
17149
|
* Created by chunfeng.luo@qcast.cn on 10/13/20.
|
|
16614
17150
|
*/
|
|
16615
|
-
const _sfc_main$
|
|
17151
|
+
const _sfc_main$a = {
|
|
16616
17152
|
__name: "JsvTextBox",
|
|
16617
17153
|
props: {
|
|
16618
17154
|
style: Object,
|
|
@@ -16625,10 +17161,13 @@ const _sfc_main$9 = {
|
|
|
16625
17161
|
default: "middle"
|
|
16626
17162
|
},
|
|
16627
17163
|
enableLatex: Boolean,
|
|
16628
|
-
className: String,
|
|
16629
17164
|
textDirection: {
|
|
16630
17165
|
type: String,
|
|
16631
17166
|
default: "unset"
|
|
17167
|
+
},
|
|
17168
|
+
syncDraw: {
|
|
17169
|
+
type: String,
|
|
17170
|
+
default: "auto"
|
|
16632
17171
|
}
|
|
16633
17172
|
},
|
|
16634
17173
|
setup(__props) {
|
|
@@ -16644,8 +17183,18 @@ const _sfc_main$9 = {
|
|
|
16644
17183
|
return "center";
|
|
16645
17184
|
}
|
|
16646
17185
|
});
|
|
17186
|
+
const textWidth = computed(() => {
|
|
17187
|
+
let w = props.style?.width;
|
|
17188
|
+
if (typeof w == "undefined") {
|
|
17189
|
+
w = 0;
|
|
17190
|
+
}
|
|
17191
|
+
return w;
|
|
17192
|
+
});
|
|
17193
|
+
const jsvTextLatexValue = computed(() => {
|
|
17194
|
+
return props.enableLatex ? 1 : 0;
|
|
17195
|
+
});
|
|
16647
17196
|
return (_ctx, _cache) => {
|
|
16648
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
17197
|
+
return openBlock(), createBlock(unref(_sfc_main$x), {
|
|
16649
17198
|
style: normalizeStyle({
|
|
16650
17199
|
...props.style,
|
|
16651
17200
|
flexDirection: "row",
|
|
@@ -16655,14 +17204,15 @@ const _sfc_main$9 = {
|
|
|
16655
17204
|
default: withCtx(() => [
|
|
16656
17205
|
createElementVNode("div", {
|
|
16657
17206
|
style: normalizeStyle({
|
|
16658
|
-
width:
|
|
16659
|
-
JsvTextLatex:
|
|
17207
|
+
width: unref(textWidth),
|
|
17208
|
+
JsvTextLatex: unref(jsvTextLatexValue),
|
|
16660
17209
|
JsvTextLineAlign: __props.lineAlign,
|
|
16661
17210
|
JsvTextInnerDirection: __props.textDirection
|
|
16662
|
-
})
|
|
17211
|
+
}),
|
|
17212
|
+
"data-jsv-perf-loadtex": props.syncDraw
|
|
16663
17213
|
}, [
|
|
16664
17214
|
renderSlot(_ctx.$slots, "default")
|
|
16665
|
-
],
|
|
17215
|
+
], 12, ["data-jsv-perf-loadtex"])
|
|
16666
17216
|
]),
|
|
16667
17217
|
_: 3
|
|
16668
17218
|
}, 8, ["style"]);
|
|
@@ -16692,7 +17242,7 @@ const _sfc_main$9 = {
|
|
|
16692
17242
|
-->
|
|
16693
17243
|
|
|
16694
17244
|
*/
|
|
16695
|
-
const _sfc_main$
|
|
17245
|
+
const _sfc_main$9 = {
|
|
16696
17246
|
__name: "JsvRadarChart",
|
|
16697
17247
|
props: {
|
|
16698
17248
|
style: {
|
|
@@ -16936,7 +17486,7 @@ const JsvRippleShape = {
|
|
|
16936
17486
|
|
|
16937
17487
|
|
|
16938
17488
|
*/
|
|
16939
|
-
const _sfc_main$
|
|
17489
|
+
const _sfc_main$8 = {
|
|
16940
17490
|
__name: "JsvRipple",
|
|
16941
17491
|
props: {
|
|
16942
17492
|
width: {
|
|
@@ -16961,8 +17511,8 @@ const _sfc_main$7 = {
|
|
|
16961
17511
|
setup(__props, { expose }) {
|
|
16962
17512
|
const props = __props;
|
|
16963
17513
|
const TAG = "JsvRipple";
|
|
16964
|
-
let filterView = new Forge$
|
|
16965
|
-
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));
|
|
16966
17516
|
watchEffect(() => {
|
|
16967
17517
|
if (filterView) {
|
|
16968
17518
|
filterView.FilterSwitch(!!props.enable);
|
|
@@ -16970,7 +17520,7 @@ const _sfc_main$7 = {
|
|
|
16970
17520
|
});
|
|
16971
17521
|
onBeforeUnmount(() => {
|
|
16972
17522
|
if (viewId > 0) {
|
|
16973
|
-
Forge$
|
|
17523
|
+
Forge$2.sViewStore.remove(viewId);
|
|
16974
17524
|
viewId = -1;
|
|
16975
17525
|
}
|
|
16976
17526
|
});
|
|
@@ -17110,7 +17660,7 @@ const JsvLine_vue_vue_type_style_index_0_scoped_10b9ebcf_lang = "";
|
|
|
17110
17660
|
|
|
17111
17661
|
|
|
17112
17662
|
*/
|
|
17113
|
-
const _sfc_main$
|
|
17663
|
+
const _sfc_main$7 = {
|
|
17114
17664
|
__name: "JsvLine",
|
|
17115
17665
|
props: {
|
|
17116
17666
|
startPos: { type: Object, require: true },
|
|
@@ -17171,7 +17721,7 @@ const _sfc_main$6 = {
|
|
|
17171
17721
|
};
|
|
17172
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;}}" } };
|
|
17173
17723
|
window.JsvCode.Dom.DeclareStyleSheets(styleSheetsContent);
|
|
17174
|
-
const JsvLine = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17724
|
+
const JsvLine = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-10b9ebcf"]]);
|
|
17175
17725
|
|
|
17176
17726
|
//
|
|
17177
17727
|
// utils/JsViewVueWidget/JsvLine/index.js;
|
|
@@ -17197,7 +17747,7 @@ const JsvLine = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
|
17197
17747
|
|
|
17198
17748
|
|
|
17199
17749
|
*/
|
|
17200
|
-
const _sfc_main$
|
|
17750
|
+
const _sfc_main$6 = {
|
|
17201
17751
|
__name: "JsvSector",
|
|
17202
17752
|
props: {
|
|
17203
17753
|
centerPosition: { type: Object, require: true },
|
|
@@ -17311,7 +17861,7 @@ const _sfc_main$5 = {
|
|
|
17311
17861
|
|
|
17312
17862
|
|
|
17313
17863
|
*/
|
|
17314
|
-
const _sfc_main$
|
|
17864
|
+
const _sfc_main$5 = {
|
|
17315
17865
|
__name: "JsvPieChart",
|
|
17316
17866
|
props: {
|
|
17317
17867
|
centerPosition: { type: Object, required: true },
|
|
@@ -17397,7 +17947,7 @@ const _sfc_main$4 = {
|
|
|
17397
17947
|
}, [
|
|
17398
17948
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(finalData).slice().reverse(), (item, index) => {
|
|
17399
17949
|
return openBlock(), createElementBlock("div", null, [
|
|
17400
|
-
(openBlock(), createBlock(_sfc_main$
|
|
17950
|
+
(openBlock(), createBlock(_sfc_main$6, {
|
|
17401
17951
|
radius: props.radius,
|
|
17402
17952
|
config: {
|
|
17403
17953
|
startAngle: Number(item.startAngle),
|
|
@@ -17505,7 +18055,7 @@ class ConnectLineTexture {
|
|
|
17505
18055
|
|
|
17506
18056
|
|
|
17507
18057
|
*/
|
|
17508
|
-
const _sfc_main$
|
|
18058
|
+
const _sfc_main$4 = {
|
|
17509
18059
|
__name: "JsvConnectLine",
|
|
17510
18060
|
props: {
|
|
17511
18061
|
startPos: {
|
|
@@ -17773,7 +18323,7 @@ const _sfc_main$3 = {
|
|
|
17773
18323
|
|
|
17774
18324
|
|
|
17775
18325
|
*/
|
|
17776
|
-
const _sfc_main$
|
|
18326
|
+
const _sfc_main$3 = {
|
|
17777
18327
|
__name: "JsvProgressBar",
|
|
17778
18328
|
props: {
|
|
17779
18329
|
width: { type: Number, required: true },
|
|
@@ -17850,7 +18400,7 @@ const _sfc_main$2 = {
|
|
|
17850
18400
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
17851
18401
|
props.isCanvas ? (openBlock(), createElementBlock("div", { key: 0 }, [
|
|
17852
18402
|
withDirectives(createElementVNode("div", null, [
|
|
17853
|
-
createVNode(_sfc_main$
|
|
18403
|
+
createVNode(_sfc_main$h, {
|
|
17854
18404
|
style: normalizeStyle({
|
|
17855
18405
|
left: 0,
|
|
17856
18406
|
top: 0,
|
|
@@ -17892,7 +18442,7 @@ const _sfc_main$2 = {
|
|
|
17892
18442
|
}, null, 4)
|
|
17893
18443
|
], 4)
|
|
17894
18444
|
])),
|
|
17895
|
-
createVNode(_sfc_main$
|
|
18445
|
+
createVNode(_sfc_main$h, {
|
|
17896
18446
|
style: normalizeStyle({
|
|
17897
18447
|
left: 0,
|
|
17898
18448
|
top: 0,
|
|
@@ -17917,7 +18467,7 @@ const _sfc_main$2 = {
|
|
|
17917
18467
|
/*
|
|
17918
18468
|
|
|
17919
18469
|
*/
|
|
17920
|
-
const _sfc_main$
|
|
18470
|
+
const _sfc_main$2 = {
|
|
17921
18471
|
__name: "JsvEnableRenderBreak",
|
|
17922
18472
|
setup(__props) {
|
|
17923
18473
|
const itemMounted = shallowRef(false);
|
|
@@ -18618,13 +19168,14 @@ function swap(arr, i, j) {
|
|
|
18618
19168
|
function defaultCompare(a, b) {
|
|
18619
19169
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
18620
19170
|
}
|
|
18621
|
-
|
|
19171
|
+
function RBush(maxEntries) {
|
|
18622
19172
|
if (maxEntries === void 0)
|
|
18623
19173
|
maxEntries = 9;
|
|
18624
19174
|
this._maxEntries = Math.max(4, maxEntries);
|
|
18625
19175
|
this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
|
|
18626
19176
|
this.clear();
|
|
18627
|
-
}
|
|
19177
|
+
}
|
|
19178
|
+
;
|
|
18628
19179
|
RBush.prototype.all = function all() {
|
|
18629
19180
|
return this._all(this.data, []);
|
|
18630
19181
|
};
|
|
@@ -19133,7 +19684,7 @@ function multiSelect(arr, left, right, n, compare) {
|
|
|
19133
19684
|
|
|
19134
19685
|
|
|
19135
19686
|
*/
|
|
19136
|
-
const _sfc_main = {
|
|
19687
|
+
const _sfc_main$1 = {
|
|
19137
19688
|
__name: "JsvMindMap",
|
|
19138
19689
|
props: {
|
|
19139
19690
|
name: {
|
|
@@ -19623,6 +20174,273 @@ const _sfc_main = {
|
|
|
19623
20174
|
// utils/JsViewVueWidget/JsvMindMap/index.js;
|
|
19624
20175
|
//
|
|
19625
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
|
+
|
|
19626
20444
|
//
|
|
19627
20445
|
// utils/JsViewVueWidget/index.js;
|
|
19628
20446
|
//
|
|
@@ -19631,4 +20449,4 @@ const _sfc_main = {
|
|
|
19631
20449
|
// utils/index.js;
|
|
19632
20450
|
//
|
|
19633
20451
|
|
|
19634
|
-
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 };
|