@shijiu/jsview-vue 2.2.128 → 2.2.373
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/browser/BrowserApic.vue.mjs +4 -15
- package/bin/browser/BrowserApic2.vue.mjs +4 -15
- package/bin/browser/BrowserApicLib.mjs +32 -26
- package/bin/browser/BrowserAudio.vue.mjs +2 -10
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +79 -0
- package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/browser/BrowserPreload.vue.mjs +1 -5
- package/bin/browser/BrowserQrcode.vue.mjs +1 -5
- package/bin/browser/BrowserSpray.vue.mjs +2 -12
- package/bin/browser/BrowserTextureAnim.vue.mjs +2 -12
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +4636 -2325
- package/bin/types/JsViewEngineWidget/CheckType.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +37 -33
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +21 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +14 -12
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +17 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +283 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +9 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +7 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/RangeModel.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/Fence.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +5 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +5 -1
- package/bin/types/JsViewEngineWidget/TemplateParser/index.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/index.d.ts +14 -1
- package/bin/types/JsViewPlugin/JsvAccount/JsvAccount.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/CheckType.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/Events.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/index.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/version.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +24 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/index.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/version.d.ts +4 -0
- package/bin/types/JsViewPlugin/index.d.ts +4 -0
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +6 -2
- package/bin/types/JsViewVueTools/DebugContentShellJBridge.d.ts +4 -0
- package/bin/types/JsViewVueTools/DebugTool.d.ts +4 -0
- package/bin/types/JsViewVueTools/DefaultKeyMap.d.ts +4 -0
- package/bin/types/JsViewVueTools/FeatureActive.d.ts +14 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +4 -0
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +7 -3
- package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvDynamicCssStyle.d.ts +20 -1
- package/bin/types/JsViewVueTools/JsvDynamicKeyFrames.d.ts +21 -2
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +20 -0
- package/bin/types/JsViewVueTools/JsvHashHistory.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvImpactTracer.d.ts +8 -4
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +9 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +55 -0
- package/bin/types/JsViewVueTools/JsvRefTaker.d.ts +28 -3
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +50 -0
- package/bin/types/JsViewVueTools/JsvStyleClass.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +21 -1
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +85 -27
- package/bin/types/JsViewVueTools/JsvTextureDefines.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +73 -3
- package/bin/types/JsViewVueTools/JsvTextureStore/Store.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +4 -0
- package/bin/types/JsViewVueTools/NinePatchHelper.d.ts +5 -1
- package/bin/types/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +4 -0
- package/bin/types/JsViewVueTools/index.d.ts +26 -11
- package/bin/types/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +38 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +5 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +28 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +5 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +29 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +6 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +74 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +108 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFilterView.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +34 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +106 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +6 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +60 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +47 -17
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +22 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +9 -5
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +8 -2
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +11 -7
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +22 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvGrid.vue.d.ts +73 -0
- package/bin/types/JsViewVueWidget/JsvHole.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +14 -34
- package/bin/types/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +48 -0
- package/bin/types/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +64 -209
- package/bin/types/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvInput/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/DataTree.d.ts +7 -1
- package/bin/types/JsViewVueWidget/JsvMindMap/Geometry.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +90 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/rtree.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +31 -0
- package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterDiv.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterImage.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +45 -0
- package/bin/types/JsViewVueWidget/JsvRipple/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +65 -1
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +157 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +8 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +13 -4
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvSector.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvSoundPool.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +40 -0
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +52 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +16 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +39 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +26 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +7 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +100 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/index.d.ts +9 -0
- package/bin/types/index.d.ts +4 -0
- package/index.d.ts +8 -0
- package/package.json +1 -1
- package/tools/config/rollup.config.mjs +1 -0
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/tsconfig.json +1 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +66 -21
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/JsvFocus/{JsvFocusManager.js → JsvFocusManager.ts} +34 -15
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.ts +20 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +30 -11
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +54 -15
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +509 -268
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +8 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +20 -10
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +33 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -2
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +7 -0
- package/utils/JsViewEngineWidget/{index.js → index.ts} +1 -1
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +21 -2
- package/utils/JsViewPlugin/JsvAudio/version.js +1 -1
- package/utils/JsViewPlugin/JsvAudio/version.mjs +1 -1
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +13 -3
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +27 -6
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +34 -28
- package/utils/JsViewPlugin/JsvLatex/index.js +22 -0
- package/utils/JsViewVueTools/ConstSymbol.ts +2 -2
- package/utils/JsViewVueTools/FeatureActive.ts +84 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +7 -3
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -0
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.ts +2 -0
- package/utils/JsViewVueTools/JsvImpactTracer.js +2 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +5 -4
- package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +67 -1
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +223 -0
- package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +8 -4
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
- package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
- package/utils/JsViewVueTools/index.js +22 -19
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +13 -5
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +15 -4
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +8 -3
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +44 -0
- package/utils/JsViewVueWidget/JsvClipDiv/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +7 -1
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +84 -0
- package/utils/JsViewVueWidget/JsvDriftScope/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +145 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +75 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +293 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +18 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +142 -63
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +15 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +19 -7
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +15 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.ts +120 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +5 -1
- package/utils/JsViewVueWidget/JsvGrid.vue +2 -0
- package/utils/JsViewVueWidget/JsvHole.js +2 -0
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +49 -45
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +320 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +222 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +281 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +47 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +14 -1
- package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +277 -117
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +91 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +18 -1
- package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterImage.vue +2 -0
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +2 -0
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +10 -11
- package/utils/JsViewVueWidget/JsvRadarChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvRipple/Constant.js +2 -2
- package/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue +3 -1
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +2 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +266 -48
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +477 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.ts +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +13 -4
- package/utils/JsViewVueWidget/JsvScrollBox/index.ts +3 -0
- package/utils/JsViewVueWidget/JsvSector.vue +2 -0
- package/utils/JsViewVueWidget/JsvSoundPool.js +2 -0
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +30 -13
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +2 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +44 -41
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +101 -0
- package/utils/JsViewVueWidget/JsvVideo.vue +2 -2
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +2 -0
- package/utils/JsViewVueWidget/index.js +5 -0
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +0 -19
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
- package/utils/JsViewVueWidget/JsvScrollBox/index.js +0 -2
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
2
4
|
* 【模块 export 内容】
|
|
3
5
|
* JsvScrollBox:Vue高阶组件,支持触控拖动的滚动型组件。
|
|
4
6
|
* props说明:
|
|
@@ -8,16 +10,23 @@
|
|
|
8
10
|
* width {number}, 当VERTICAL滑动模式时为选填,HORIZONTAL为必填
|
|
9
11
|
* height {number}, 当HORIZONTAL滑动模式时为选填,VERTICAL为必填
|
|
10
12
|
* }
|
|
11
|
-
* mode {
|
|
13
|
+
* mode {ScrollBoxStyle.DrawerMode/ScrollBoxStyle.PinMode}
|
|
12
14
|
* 选填, 非响应式, 默认为 PinMode
|
|
13
15
|
* 运动模式选择, DrawerMode: 抽屉模式,内容尺寸大于固定底座
|
|
14
16
|
* PinMode: 滚动杆模式,内容尺寸小于固定底座
|
|
15
17
|
* direction {import VERTICAL/HORIZONTAL} (必填,非响应式) 滑动方向
|
|
16
18
|
* enableFling {boolean} (选填,非响应式) 是否需要支持fling,默认为false
|
|
17
19
|
* initPercent {Number} (选填,非响应式) 滑块起始位置,等同于mount后进行updatePercent()
|
|
20
|
+
* linkName {String} (选填,非响应式) 本滑动模块的名字,用于全局进行syncWith处理的关联名
|
|
21
|
+
* 注意: 如果不需要共享进度,不要声明,可以节省一些构造性能
|
|
22
|
+
* syncWith {String} (选填,响应式) 进度联动组件来源,内容为联动来源的linkName
|
|
23
|
+
* syncType {ScrollBoxStyle.SyncForward|ScrollType.SyncReverse}
|
|
24
|
+
* (选填,响应式) 决定syncWith的联动模式,当syncWith设置后才能生效
|
|
25
|
+
* SyncForward(默认值): 同进同退, mySelf = sourcePercent
|
|
26
|
+
* SyncReverse: 进退反向, mySelf = (1 - sourcePercent)
|
|
18
27
|
*
|
|
19
28
|
* template说明:
|
|
20
|
-
*
|
|
29
|
+
* FixedBox={boxWidth, boxHeight}: 以本组件底座左上角0,0对齐的一个slot
|
|
21
30
|
* SliderBox={boxWidth, boxHeight}: 以滑块div的左上角0,0对齐的一个slot,
|
|
22
31
|
*
|
|
23
32
|
* expose函数说明:
|
|
@@ -26,16 +35,6 @@
|
|
|
26
35
|
* updatePercent(percent:number) 设置滚动调位置(百分比),百分比 = (SliderTop - 底座Top) / Slider可滑动总区域
|
|
27
36
|
* Slider可滑动总区域 = 底座Height - SliderHeight
|
|
28
37
|
* 当为横向运动时,Top被Left代换,Height被Width代换
|
|
29
|
-
* syncWith(otherScrollBox: JsvScrollBox, syncMode: ScrollStyle)
|
|
30
|
-
* 本滚动条的进度跟随给定的滚动条的进度移动
|
|
31
|
-
* otherScrollBox: 控制者
|
|
32
|
-
* syncMode: 同步模式,有 SyncParallel, SyncRevert
|
|
33
|
-
* addSubSync(view: div|JsvNinePatch, syncMode: ScrollStyle)
|
|
34
|
-
* 将外部的div或者JsvNinePatch加入到同步尺寸同步改动器中。
|
|
35
|
-
* view只能是div或者JsvNinePatch, 并且不能有style.animation的控制
|
|
36
|
-
* 当SyncParallel模式时, 这个div的初始位置要和本组件的0,0对齐
|
|
37
|
-
* 当SyncRevert模式时, 这个div的初始位置要和本组件尾部位置(0, height/width)对齐
|
|
38
|
-
*
|
|
39
38
|
*
|
|
40
39
|
-->
|
|
41
40
|
|
|
@@ -80,13 +79,24 @@ import {
|
|
|
80
79
|
shallowRef,
|
|
81
80
|
watchEffect,
|
|
82
81
|
onMounted,
|
|
82
|
+
onUnmounted,
|
|
83
83
|
defineExpose,
|
|
84
84
|
defineProps,
|
|
85
85
|
} from "vue";
|
|
86
86
|
import ActControl from "../../JsViewVueWidget/JsvFreeMoveActor/ActorControl";
|
|
87
87
|
import { VERTICAL, HORIZONTAL } from "../../JsViewVueTools/ConstSymbol";
|
|
88
|
-
import {
|
|
88
|
+
import { ScrollBoxStyle } from "./ScrollSymbol";
|
|
89
|
+
import { ScrollInnerStyle } from "./ScrollInnerSymbol";
|
|
89
90
|
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine";
|
|
91
|
+
import {
|
|
92
|
+
GetSyncLinkManager,
|
|
93
|
+
SyncLinkSource,
|
|
94
|
+
} from "../../JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager";
|
|
95
|
+
import { newNexus, NexusNode } from "../JsvFreeMoveActor/NexusNode";
|
|
96
|
+
import {
|
|
97
|
+
FeatureNames,
|
|
98
|
+
JsvUseFeature,
|
|
99
|
+
} from "../../JsViewVueTools/FeatureActive";
|
|
90
100
|
|
|
91
101
|
let rProps = defineProps({
|
|
92
102
|
// 底座的尺寸
|
|
@@ -108,11 +118,11 @@ let rProps = defineProps({
|
|
|
108
118
|
},
|
|
109
119
|
|
|
110
120
|
// 滑块模式
|
|
111
|
-
//
|
|
112
|
-
//
|
|
121
|
+
// ScrollBoxStyle.PinMode: 滑块小于底座
|
|
122
|
+
// ScrollBoxStyle.DrawerMode: 滑块大于底座
|
|
113
123
|
mode: {
|
|
114
124
|
type: Symbol,
|
|
115
|
-
default:
|
|
125
|
+
default: ScrollBoxStyle.PinMode,
|
|
116
126
|
},
|
|
117
127
|
|
|
118
128
|
// 初始进度条的进度
|
|
@@ -125,25 +135,53 @@ let rProps = defineProps({
|
|
|
125
135
|
type: Boolean,
|
|
126
136
|
default: false,
|
|
127
137
|
},
|
|
138
|
+
|
|
139
|
+
linkName: {
|
|
140
|
+
type: String,
|
|
141
|
+
default: null,
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
syncWith: {
|
|
145
|
+
type: String,
|
|
146
|
+
default: null,
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
syncType: {
|
|
150
|
+
type: Symbol,
|
|
151
|
+
default: ScrollBoxStyle.SyncForward,
|
|
152
|
+
},
|
|
128
153
|
});
|
|
129
154
|
|
|
155
|
+
// 激活引擎中的功能支持
|
|
156
|
+
JsvUseFeature("JsvScrollBox", FeatureNames.TouchReceiver);
|
|
157
|
+
|
|
130
158
|
/** 本地常量 **/
|
|
131
159
|
const cDirection = rProps.direction;
|
|
132
160
|
const cMode = rProps.mode;
|
|
133
161
|
const cInitPercent = rProps.initPercent;
|
|
134
162
|
const cEnableFling = rProps.enableFling;
|
|
135
163
|
const cSliderActor = new ActControl();
|
|
136
|
-
const cFixedBoxActor =
|
|
164
|
+
const cFixedBoxActor =
|
|
165
|
+
cMode == ScrollBoxStyle.PinMode ? new ActControl() : null;
|
|
166
|
+
const cLinkName = rProps.linkName;
|
|
167
|
+
const cSyncLinkManager = GetSyncLinkManager();
|
|
137
168
|
|
|
138
169
|
// Actor condition group id(1~9可任意用)
|
|
139
170
|
const cWallConditionGroup = 1;
|
|
140
171
|
const cSensorConditionGroup = 2;
|
|
172
|
+
const cLinkConditionGroup = 3;
|
|
173
|
+
const cLinkMasterGroup = 4;
|
|
141
174
|
|
|
142
175
|
/** 本地非响应式变量 **/
|
|
143
|
-
let vMounted = false;
|
|
144
|
-
let vHorizontalGap = 0;
|
|
145
|
-
let vVerticalGap = 0;
|
|
146
|
-
let
|
|
176
|
+
let vMounted: boolean = false;
|
|
177
|
+
let vHorizontalGap: number = 0;
|
|
178
|
+
let vVerticalGap: number = 0;
|
|
179
|
+
let vLinkProvide: SyncLinkSource | null = null; // 是否对外提供同步进度影响
|
|
180
|
+
let vWaitMasterLinkSourceReady: Promise<void> | null = null;
|
|
181
|
+
let vSyncWithNameCache: String | null = null; // 当前关联的SyncLinkSource的名称
|
|
182
|
+
let vSyncTypeCache: Symbol = ScrollBoxStyle.SyncForward;
|
|
183
|
+
let vSyncLinkNexusNode: NexusNode | null = null;
|
|
184
|
+
let vCurrentPercent: number = 0;
|
|
147
185
|
|
|
148
186
|
/** 本地响应式变量 **/
|
|
149
187
|
let rFixedBoxWidth = shallowRef(NaN);
|
|
@@ -153,6 +191,14 @@ let rSliderWidth = shallowRef(NaN);
|
|
|
153
191
|
let rSliderHeight = shallowRef(NaN);
|
|
154
192
|
let rSliderViewRef = shallowRef(null);
|
|
155
193
|
|
|
194
|
+
// 记录slider的活动范围
|
|
195
|
+
let rSliderEdgeBox = {
|
|
196
|
+
top: 0,
|
|
197
|
+
bottom: 0,
|
|
198
|
+
left: 0,
|
|
199
|
+
right: 0,
|
|
200
|
+
};
|
|
201
|
+
|
|
156
202
|
watchEffect(() => {
|
|
157
203
|
let fixedBoxSize = {
|
|
158
204
|
width: rProps.style!.width,
|
|
@@ -173,7 +219,7 @@ watchEffect(() => {
|
|
|
173
219
|
|
|
174
220
|
// 合理性校验
|
|
175
221
|
if (
|
|
176
|
-
cMode ==
|
|
222
|
+
cMode == ScrollBoxStyle.PinMode &&
|
|
177
223
|
(sliderSize.height > fixedBoxSize.height ||
|
|
178
224
|
sliderSize.width > fixedBoxSize.width)
|
|
179
225
|
) {
|
|
@@ -183,7 +229,7 @@ watchEffect(() => {
|
|
|
183
229
|
);
|
|
184
230
|
return;
|
|
185
231
|
} else if (
|
|
186
|
-
cMode ==
|
|
232
|
+
cMode == ScrollBoxStyle.DrawerMode &&
|
|
187
233
|
(sliderSize.height < fixedBoxSize.height ||
|
|
188
234
|
sliderSize.width < fixedBoxSize.width)
|
|
189
235
|
) {
|
|
@@ -205,49 +251,181 @@ watchEffect(() => {
|
|
|
205
251
|
rSliderHeight.value = sliderSize.height;
|
|
206
252
|
rFixedBoxWidth.value = fixedBoxSize.width;
|
|
207
253
|
rFixedBoxHeight.value = fixedBoxSize.height;
|
|
208
|
-
|
|
209
254
|
rebuildSliderSet();
|
|
210
255
|
}
|
|
256
|
+
|
|
257
|
+
// 在 rebuildSliderSet 之后,确认syncWith是否变化,变化则重建参照的SyncLinkSource
|
|
258
|
+
if (
|
|
259
|
+
vSyncWithNameCache != rProps.syncWith ||
|
|
260
|
+
vSyncTypeCache != rProps.syncType
|
|
261
|
+
) {
|
|
262
|
+
vSyncWithNameCache = rProps.syncWith;
|
|
263
|
+
vSyncTypeCache = rProps.syncType;
|
|
264
|
+
changeSyncLink(vSyncWithNameCache);
|
|
265
|
+
}
|
|
211
266
|
});
|
|
212
267
|
|
|
268
|
+
function changeSyncLink(newSyncSourceName: String) {
|
|
269
|
+
// 清理原Link nexusNode
|
|
270
|
+
vSyncLinkNexusNode = null;
|
|
271
|
+
rebuildAckSync();
|
|
272
|
+
|
|
273
|
+
if (newSyncSourceName != null) {
|
|
274
|
+
// 创建新Source的Ready promise, 在确认目标节点存在后再获取NexusNode来创建condition
|
|
275
|
+
// 注意此Promise要在unMounted时通过UnListen进行反注册,才能规避内存泄漏
|
|
276
|
+
vWaitMasterLinkSourceReady = cSyncLinkManager
|
|
277
|
+
.WaitSourceMounted(newSyncSourceName)
|
|
278
|
+
.then(() => {
|
|
279
|
+
// 获取Link nexusNode。此引用不用专门释放,没有内存泄漏问题
|
|
280
|
+
vSyncLinkNexusNode =
|
|
281
|
+
cSyncLinkManager.GetSourceNexusNode(newSyncSourceName);
|
|
282
|
+
rebuildAckSync();
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function rebuildAckSync() {
|
|
288
|
+
if (!vMounted) return;
|
|
289
|
+
|
|
290
|
+
// 清理老设定
|
|
291
|
+
cSliderActor.run((cmds) => {
|
|
292
|
+
return [cmds.state().removeConditionByGroup(cLinkConditionGroup)];
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
if (vSyncLinkNexusNode != null) {
|
|
296
|
+
// 创建运动跟随的condition
|
|
297
|
+
cSliderActor.run((cmds) => {
|
|
298
|
+
return [
|
|
299
|
+
cmds
|
|
300
|
+
.condition(cLinkConditionGroup, true)
|
|
301
|
+
.movementSync(vSyncLinkNexusNode!)
|
|
302
|
+
.then([
|
|
303
|
+
cmds
|
|
304
|
+
.action()
|
|
305
|
+
.ackMovementSync(
|
|
306
|
+
0,
|
|
307
|
+
vHorizontalGap,
|
|
308
|
+
0,
|
|
309
|
+
vVerticalGap,
|
|
310
|
+
0b11,
|
|
311
|
+
vSyncTypeCache == ScrollBoxStyle.SyncForward ? 1 : 2
|
|
312
|
+
),
|
|
313
|
+
]),
|
|
314
|
+
];
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function rebuildSyncMaster() {
|
|
320
|
+
if (vLinkProvide != null) {
|
|
321
|
+
// 创建移动信息的发生器
|
|
322
|
+
cSliderActor.run((cmds) => {
|
|
323
|
+
return [
|
|
324
|
+
cmds.state().removeConditionByGroup(cLinkMasterGroup),
|
|
325
|
+
cmds
|
|
326
|
+
.state()
|
|
327
|
+
.startMovementSync(
|
|
328
|
+
vLinkProvide!.nexusNode,
|
|
329
|
+
0,
|
|
330
|
+
vHorizontalGap,
|
|
331
|
+
0,
|
|
332
|
+
vVerticalGap,
|
|
333
|
+
0b11
|
|
334
|
+
),
|
|
335
|
+
// 触发跟随节点记录进度
|
|
336
|
+
cmds
|
|
337
|
+
.condition(cLinkMasterGroup, true)
|
|
338
|
+
.onFlingEnd()
|
|
339
|
+
.then([
|
|
340
|
+
cmds
|
|
341
|
+
.state()
|
|
342
|
+
.fireNexusEvent(
|
|
343
|
+
vLinkProvide!.nexusNode,
|
|
344
|
+
ScrollInnerStyle.UpdatePercentNexusCode
|
|
345
|
+
),
|
|
346
|
+
]),
|
|
347
|
+
// 触发跟随节点记录进度
|
|
348
|
+
cmds
|
|
349
|
+
.condition(cLinkMasterGroup, true)
|
|
350
|
+
.onDragEnd()
|
|
351
|
+
.then([
|
|
352
|
+
cmds
|
|
353
|
+
.state()
|
|
354
|
+
.fireNexusEvent(
|
|
355
|
+
vLinkProvide!.nexusNode,
|
|
356
|
+
ScrollInnerStyle.UpdatePercentNexusCode
|
|
357
|
+
),
|
|
358
|
+
]),
|
|
359
|
+
];
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
213
364
|
function rebuildSliderSet() {
|
|
365
|
+
// 计算slider的活动区域
|
|
366
|
+
// 运动区域无论正负都通用的算法
|
|
367
|
+
vHorizontalGap = rFixedBoxWidth.value - rSliderWidth.value;
|
|
368
|
+
vVerticalGap = rFixedBoxHeight.value - rSliderHeight.value;
|
|
369
|
+
|
|
370
|
+
// 更新slider的活动范围
|
|
371
|
+
rSliderEdgeBox.left = vHorizontalGap > 0 ? 0 : vHorizontalGap;
|
|
372
|
+
rSliderEdgeBox.top = vVerticalGap > 0 ? 0 : vVerticalGap;
|
|
373
|
+
rSliderEdgeBox.right = vHorizontalGap < 0 ? 0 : vHorizontalGap;
|
|
374
|
+
rSliderEdgeBox.bottom = vVerticalGap < 0 ? 0 : vVerticalGap;
|
|
375
|
+
|
|
214
376
|
if (vMounted) {
|
|
215
|
-
//
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
cSliderActor.run([
|
|
221
|
-
cSliderActor.state().removeConditionByGroup(cWallConditionGroup),
|
|
222
|
-
cSliderActor
|
|
377
|
+
// 设置Actor的活动边界
|
|
378
|
+
cSliderActor.run((cmds) => [
|
|
379
|
+
cmds.state().removeConditionByGroup(cWallConditionGroup),
|
|
380
|
+
cmds
|
|
223
381
|
.condition(cWallConditionGroup, true)
|
|
224
382
|
.boxPosition(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
383
|
+
rSliderEdgeBox.left,
|
|
384
|
+
rSliderEdgeBox.top,
|
|
385
|
+
rSliderEdgeBox.right,
|
|
386
|
+
rSliderEdgeBox.bottom
|
|
229
387
|
)!
|
|
230
|
-
.then([
|
|
388
|
+
.then([cmds.action().stopMoving(true)]),
|
|
389
|
+
// 跟进抬起时进度信息
|
|
390
|
+
cmds
|
|
391
|
+
.condition(cWallConditionGroup, true)
|
|
392
|
+
.onFlingEnd()
|
|
393
|
+
.then([
|
|
394
|
+
(pointInfo: any) => {
|
|
395
|
+
vCurrentPercent = positionToPercent(pointInfo);
|
|
396
|
+
},
|
|
397
|
+
]),
|
|
398
|
+
// 跟进fling结束时的进度信息
|
|
399
|
+
cmds
|
|
400
|
+
.condition(cWallConditionGroup, true)
|
|
401
|
+
.onDragEnd()
|
|
402
|
+
.then([
|
|
403
|
+
(pointInfo: any) => {
|
|
404
|
+
vCurrentPercent = positionToPercent(pointInfo);
|
|
405
|
+
},
|
|
406
|
+
]),
|
|
231
407
|
]);
|
|
408
|
+
|
|
409
|
+
// 尺寸变化时,重建Sync同步的信息
|
|
410
|
+
rebuildSyncMaster();
|
|
411
|
+
rebuildAckSync();
|
|
232
412
|
}
|
|
233
413
|
}
|
|
234
414
|
|
|
235
415
|
// setSensor 函数声明
|
|
236
416
|
function setSensor(callback: Function, sensitivity: number) {
|
|
237
|
-
cSliderActor.run([
|
|
238
|
-
|
|
417
|
+
cSliderActor.run((cmds) => [
|
|
418
|
+
cmds.state().removeConditionByGroup(cSensorConditionGroup),
|
|
239
419
|
]);
|
|
240
420
|
if (callback != null) {
|
|
241
|
-
cSliderActor.run([
|
|
242
|
-
|
|
421
|
+
cSliderActor.run((cmds) => [
|
|
422
|
+
cmds
|
|
243
423
|
.condition(cSensorConditionGroup, true)
|
|
244
424
|
.onMovement(sensitivity) // 设置x或y移动超过12时才触发回调,以此减少回调的频次,规避js的性能影响
|
|
245
425
|
.then([
|
|
246
426
|
(pointInfo: any) => {
|
|
247
|
-
let percent =
|
|
248
|
-
|
|
249
|
-
? pointInfo.xPos / vHorizontalGap
|
|
250
|
-
: pointInfo.yPos / vVerticalGap;
|
|
427
|
+
let percent: number = positionToPercent(pointInfo);
|
|
428
|
+
vCurrentPercent = percent;
|
|
251
429
|
callback(percent, pointInfo.xPos, pointInfo.yPos);
|
|
252
430
|
},
|
|
253
431
|
]),
|
|
@@ -255,6 +433,17 @@ function setSensor(callback: Function, sensitivity: number) {
|
|
|
255
433
|
}
|
|
256
434
|
}
|
|
257
435
|
|
|
436
|
+
// 内部函数,位置信息转成百分比信息
|
|
437
|
+
function positionToPercent(pointInfo: any): number {
|
|
438
|
+
let percent: number = 0;
|
|
439
|
+
if (cDirection == HORIZONTAL) {
|
|
440
|
+
percent = vHorizontalGap != 0 ? pointInfo.xPos / vHorizontalGap : 0;
|
|
441
|
+
} else {
|
|
442
|
+
percent = vVerticalGap != 0 ? pointInfo.yPos / vVerticalGap : 0;
|
|
443
|
+
}
|
|
444
|
+
return percent;
|
|
445
|
+
}
|
|
446
|
+
|
|
258
447
|
// updatePercent 函数声明
|
|
259
448
|
function updatePercent(percent: number) {
|
|
260
449
|
let xPos: number = 0;
|
|
@@ -264,7 +453,12 @@ function updatePercent(percent: number) {
|
|
|
264
453
|
} else {
|
|
265
454
|
yPos = Math.floor(percent * vVerticalGap);
|
|
266
455
|
}
|
|
267
|
-
cSliderActor.run([
|
|
456
|
+
cSliderActor.run((cmds) => [cmds.action().teleportTo(xPos, yPos)]);
|
|
457
|
+
vCurrentPercent = percent;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function currentPercent(): number {
|
|
461
|
+
return vCurrentPercent;
|
|
268
462
|
}
|
|
269
463
|
|
|
270
464
|
onMounted(() => {
|
|
@@ -291,18 +485,42 @@ onMounted(() => {
|
|
|
291
485
|
let fixedBoxView = (rFixedViewRef.value as any).jsvGetProxyView();
|
|
292
486
|
cFixedBoxActor.bindForgeView(fixedBoxView, true);
|
|
293
487
|
fixedBoxView.DragEnables?.(ForgeConst.DragFlags.TOUCH_RECV_FIRST_START); // 仅激活touchDown即可捕获并触发 TouchAttractChild
|
|
294
|
-
cFixedBoxActor.run([
|
|
295
|
-
|
|
488
|
+
cFixedBoxActor.run((cmds) => [
|
|
489
|
+
cmds.state().setTouchAttractChild(cSliderActor),
|
|
296
490
|
]);
|
|
297
491
|
}
|
|
298
492
|
|
|
493
|
+
// 创建提供同步信息来源的 SyncLinkSource,并登录到SyncLinkManager中(SourceOnMounted)
|
|
494
|
+
// 注意:此处理一定要在 onUnmounted 时进行 SourceOnUnmounted,才能规避内存泄漏
|
|
495
|
+
if (cLinkName != null) {
|
|
496
|
+
vLinkProvide = new SyncLinkSource(cLinkName, newNexus());
|
|
497
|
+
rebuildSyncMaster();
|
|
498
|
+
cSyncLinkManager.SourceOnMounted(vLinkProvide);
|
|
499
|
+
}
|
|
500
|
+
|
|
299
501
|
// 设置滑动区域和关联区域
|
|
300
502
|
rebuildSliderSet();
|
|
301
503
|
});
|
|
302
504
|
|
|
505
|
+
onUnmounted(() => {
|
|
506
|
+
/** 关于LinkSource的释放 **/
|
|
507
|
+
// 释放作为linkSource master时的句柄
|
|
508
|
+
if (vLinkProvide != null) {
|
|
509
|
+
cSyncLinkManager.SourceOnUnmounted(cLinkName);
|
|
510
|
+
vLinkProvide = null;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// 释放作为linkSource slave时的句柄
|
|
514
|
+
if (vWaitMasterLinkSourceReady != null) {
|
|
515
|
+
cSyncLinkManager.UnListen(vWaitMasterLinkSourceReady);
|
|
516
|
+
vWaitMasterLinkSourceReady = null;
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
|
|
303
520
|
defineExpose({
|
|
304
521
|
setSensor,
|
|
305
522
|
updatePercent,
|
|
523
|
+
currentPercent,
|
|
306
524
|
});
|
|
307
525
|
</script>
|
|
308
526
|
|