@shijiu/jsview-vue 2.2.201 → 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 +2 -13
- package/bin/browser/BrowserApic2.vue.mjs +2 -13
- package/bin/browser/BrowserApicLib.mjs +24 -24
- package/bin/browser/BrowserAudio.vue.mjs +2 -10
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +21 -5
- 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 +3216 -2086
- 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 +15 -2
- package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +14 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +280 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +7 -1
- package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +4 -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 +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +4 -0
- 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 +5 -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 +4 -0
- 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 +4 -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 +4 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +24 -2
- 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 +30 -4
- 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 +7 -0
- 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 +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +28 -0
- 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 +4 -0
- 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 +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +4 -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 +4 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +4 -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 +6 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +48 -1
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +4 -0
- 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 +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +4 -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 +30 -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 +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +4 -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 +6 -0
- package/bin/types/index.d.ts +4 -0
- package/index.d.ts +8 -0
- package/package.json +1 -1
- 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.ts +22 -3
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +208 -84
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -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/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 +2 -1
- 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 +7 -3
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
- package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
- package/utils/JsViewVueTools/index.js +3 -0
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +10 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +12 -1
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +4 -2
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +11 -9
- 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 +39 -12
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +210 -62
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
- 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 +5 -0
- 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 +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +9 -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 +2 -0
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
|
@@ -27,9 +27,10 @@ import { RenderItem } from "./RenderItem";
|
|
|
27
27
|
import { VisibleInfo } from "./VisibleInfo";
|
|
28
28
|
import { WidgetRectInfo } from "./WidgetRectInfo";
|
|
29
29
|
import ActorControl from "../../JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts";
|
|
30
|
-
import { TaskType,
|
|
30
|
+
import { TaskType, TaskManager, AnimationManager, SlideTaskType } from "./TaskManager.ts";
|
|
31
31
|
import { getDirectionByRect, RectCache } from "./Slide.ts";
|
|
32
32
|
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine.ts";
|
|
33
|
+
import { FeatureNames, JsvUseFeature } from "../../JsViewVueTools/FeatureActive.ts";
|
|
33
34
|
|
|
34
35
|
const TAG = "MetroWidget";
|
|
35
36
|
|
|
@@ -117,6 +118,9 @@ export const setup = (
|
|
|
117
118
|
innerKeepTraceRange = props.keepTraceRange;
|
|
118
119
|
} else {
|
|
119
120
|
if (props.touchFlag > 0) {
|
|
121
|
+
// 激活引擎功能的支持
|
|
122
|
+
JsvUseFeature('MetroWidget', FeatureNames.TouchReceiver);
|
|
123
|
+
|
|
120
124
|
//触控默认3屏
|
|
121
125
|
innerKeepTraceRange = 3;
|
|
122
126
|
} else {
|
|
@@ -177,6 +181,9 @@ export const setup = (
|
|
|
177
181
|
},
|
|
178
182
|
getTouchState() {
|
|
179
183
|
return this._touchState;
|
|
184
|
+
},
|
|
185
|
+
getTouchCount() {
|
|
186
|
+
return this._touchCount;
|
|
180
187
|
}
|
|
181
188
|
}
|
|
182
189
|
|
|
@@ -238,7 +245,6 @@ export const setup = (
|
|
|
238
245
|
let slideDoAnim = false;
|
|
239
246
|
|
|
240
247
|
mRectCache.cacheManually();
|
|
241
|
-
|
|
242
248
|
/**
|
|
243
249
|
* 处理resize
|
|
244
250
|
*/
|
|
@@ -266,6 +272,9 @@ export const setup = (
|
|
|
266
272
|
})
|
|
267
273
|
});
|
|
268
274
|
|
|
275
|
+
//更新touch的size
|
|
276
|
+
updateTouchDivSize();
|
|
277
|
+
|
|
269
278
|
//使用上一帧的状态计算anchorPosition
|
|
270
279
|
if (resizeTaskMap[id2Index(focusId)]) {
|
|
271
280
|
const task = resizeTaskMap[id2Index(focusId)];
|
|
@@ -292,12 +301,14 @@ export const setup = (
|
|
|
292
301
|
let direction = undefined;
|
|
293
302
|
|
|
294
303
|
let validSlideTask = false;
|
|
304
|
+
let forceSlide = false;
|
|
295
305
|
if (allTask.slide.length > 0) {
|
|
296
306
|
validSlideTask = true;
|
|
297
307
|
//有滚动时, 取消延时加载
|
|
298
308
|
tryCancelDelayLoad();
|
|
299
309
|
let slideTask = lastOfArray(allTask.slide);
|
|
300
310
|
slideDoAnim = slideTask.params.doAnim;
|
|
311
|
+
forceSlide = slideTask.params.force;
|
|
301
312
|
switch (slideTask.subType) {
|
|
302
313
|
case SlideTaskType.SLIDE_BY_DIV: {
|
|
303
314
|
const div = slideTask.params.div;
|
|
@@ -370,7 +381,7 @@ export const setup = (
|
|
|
370
381
|
preInfo = mRectCache.getPreRect();
|
|
371
382
|
if (preInfo) {
|
|
372
383
|
let totalSize = metroTemplate.getBoundingBoxSize();
|
|
373
|
-
v.start = Math.min(Math.max(0, targetRect[pos_key] - preInfo[pos_key] + v.start), totalSize[size_key] - v.range);
|
|
384
|
+
v.start = Math.min(Math.max(0, targetRect[pos_key] - preInfo[pos_key] + v.start), Math.max(0, totalSize[size_key] - v.range));
|
|
374
385
|
preInfo[pos_key] += (v.start - visibleInfo.start);
|
|
375
386
|
}
|
|
376
387
|
}
|
|
@@ -464,7 +475,7 @@ export const setup = (
|
|
|
464
475
|
}
|
|
465
476
|
|
|
466
477
|
//处理滚动动画
|
|
467
|
-
if (needSlide) {
|
|
478
|
+
if (forceSlide || needSlide) {
|
|
468
479
|
let animInfo = undefined;
|
|
469
480
|
if (slideDoAnim) {
|
|
470
481
|
animInfo = {
|
|
@@ -661,7 +672,7 @@ export const setup = (
|
|
|
661
672
|
|
|
662
673
|
const onItemFocus = (focusItem, rect) => {
|
|
663
674
|
//触控模式不触发item的onFocus
|
|
664
|
-
if (!focusItem
|
|
675
|
+
if (!focusItem) return;
|
|
665
676
|
setItemZIndex(focusItem, innerData.length, true);
|
|
666
677
|
if (isFocus) {
|
|
667
678
|
_itemOnFocusSideEffect(focusItem, rect);
|
|
@@ -805,7 +816,7 @@ export const setup = (
|
|
|
805
816
|
}
|
|
806
817
|
};
|
|
807
818
|
|
|
808
|
-
const slideToItemInner = (index, doAnim, direction = undefined, preItem = undefined) => {
|
|
819
|
+
const slideToItemInner = (index, doAnim, direction = undefined, preItem = undefined, force = false) => {
|
|
809
820
|
taskManager.addTask(
|
|
810
821
|
TaskType.SLIDE,
|
|
811
822
|
{
|
|
@@ -813,6 +824,7 @@ export const setup = (
|
|
|
813
824
|
doAnim,
|
|
814
825
|
direction,
|
|
815
826
|
preItem,
|
|
827
|
+
force,
|
|
816
828
|
},
|
|
817
829
|
SlideTaskType.SLIDE_BY_ITEM);
|
|
818
830
|
};
|
|
@@ -835,22 +847,37 @@ export const setup = (
|
|
|
835
847
|
SlideTaskType.SLIDE_BY_DIV);
|
|
836
848
|
}
|
|
837
849
|
}
|
|
838
|
-
const
|
|
839
|
-
if (rect
|
|
840
|
-
&& typeof rect.left == 'number'
|
|
841
|
-
&& typeof rect.top == 'number'
|
|
842
|
-
&& typeof rect.width == 'number'
|
|
843
|
-
&& typeof rect.height == 'number') {
|
|
850
|
+
const slideToRectInner = (rect, doAnim, direction, force) => {
|
|
851
|
+
if (rect && typeof rect.left == "number" && typeof rect.top == "number" && typeof rect.width == "number" && typeof rect.height == "number") {
|
|
844
852
|
taskManager.addTask(
|
|
845
853
|
TaskType.SLIDE,
|
|
846
854
|
{
|
|
847
855
|
rect,
|
|
848
856
|
doAnim,
|
|
849
857
|
direction,
|
|
858
|
+
force
|
|
850
859
|
},
|
|
851
|
-
SlideTaskType.SLIDE_BY_RECT
|
|
860
|
+
SlideTaskType.SLIDE_BY_RECT
|
|
861
|
+
);
|
|
852
862
|
}
|
|
853
863
|
}
|
|
864
|
+
const slideToRect = (rect, doAnim, direction = undefined) => {
|
|
865
|
+
slideToRectInner(rect, doAnim, direction, false);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
function ifLayoutChange(type, oldMeasureItem, newMeasureItem) {
|
|
869
|
+
let changed = newMeasureItem.width !== oldMeasureItem.width
|
|
870
|
+
|| newMeasureItem.height !== oldMeasureItem.height
|
|
871
|
+
|| newMeasureItem.focusable !== oldMeasureItem.focusable
|
|
872
|
+
|| newMeasureItem.marginRight !== oldMeasureItem.marginRight
|
|
873
|
+
|| newMeasureItem.marginBottom !== oldMeasureItem.marginBottom;
|
|
874
|
+
if (type !== "relative") {
|
|
875
|
+
changed = changed
|
|
876
|
+
|| newMeasureItem.left !== oldMeasureItem.left
|
|
877
|
+
|| newMeasureItem.top !== oldMeasureItem.top
|
|
878
|
+
}
|
|
879
|
+
return changed;
|
|
880
|
+
}
|
|
854
881
|
|
|
855
882
|
const DATA_ID_KEY = "jsvKey";
|
|
856
883
|
const refreshData = (forceUpdate) => {
|
|
@@ -860,13 +887,14 @@ export const setup = (
|
|
|
860
887
|
return;
|
|
861
888
|
}
|
|
862
889
|
try {
|
|
863
|
-
let newData = toRaw(props.provideData());
|
|
890
|
+
let newData = toRaw(props.provideData()).concat();
|
|
864
891
|
if (newData instanceof Array) {
|
|
865
892
|
let maxSameIndex = -1;
|
|
866
893
|
let layoutChange = false;
|
|
867
894
|
let onlyDataChangeList = [];
|
|
895
|
+
let targetFocusId = focusId
|
|
868
896
|
if (focusId >= newData.length) {
|
|
869
|
-
|
|
897
|
+
targetFocusId = newData.length - 1
|
|
870
898
|
}
|
|
871
899
|
|
|
872
900
|
if (!forceUpdate) {
|
|
@@ -881,11 +909,7 @@ export const setup = (
|
|
|
881
909
|
} else {
|
|
882
910
|
const newMeasureItem = props.measures(newItem);
|
|
883
911
|
const oldMeasureItem = props.measures(oldItem);
|
|
884
|
-
|
|
885
|
-
layoutChange = newMeasureItem.width !== oldMeasureItem.width || newMeasureItem.height !== oldMeasureItem.height;
|
|
886
|
-
} else {
|
|
887
|
-
layoutChange = newMeasureItem.width !== oldMeasureItem.width || newMeasureItem.height !== oldMeasureItem.height || newMeasureItem.left !== oldMeasureItem.left || newMeasureItem.top !== oldMeasureItem.top;
|
|
888
|
-
}
|
|
912
|
+
layoutChange = ifLayoutChange(props.layoutType, oldMeasureItem, newMeasureItem);
|
|
889
913
|
if (layoutChange) {
|
|
890
914
|
break;
|
|
891
915
|
} else {
|
|
@@ -912,7 +936,7 @@ export const setup = (
|
|
|
912
936
|
}
|
|
913
937
|
}
|
|
914
938
|
|
|
915
|
-
dataList = newData
|
|
939
|
+
dataList = newData;
|
|
916
940
|
if (forceUpdate || layoutChange) {
|
|
917
941
|
//需要更新布局
|
|
918
942
|
pageUpdateToken.value++;
|
|
@@ -938,16 +962,16 @@ export const setup = (
|
|
|
938
962
|
if (props.onScroll) {
|
|
939
963
|
templateItemAdder.tryAddItemByIndex(dataList.length - 1);
|
|
940
964
|
} else {
|
|
941
|
-
templateItemAdder.tryAddItemById(
|
|
965
|
+
templateItemAdder.tryAddItemById(targetFocusId);
|
|
942
966
|
}
|
|
943
967
|
} else {
|
|
944
|
-
if (maxSameIndex < newData.length) {
|
|
968
|
+
if (maxSameIndex < newData.length - 1) {
|
|
945
969
|
//追加数据
|
|
946
970
|
templateItemAdder.updateData(newData);
|
|
947
971
|
if (props.onScroll) {
|
|
948
972
|
templateItemAdder.tryAddItemByIndex(dataList.length - 1);
|
|
949
973
|
} else {
|
|
950
|
-
templateItemAdder.tryAddItemById(
|
|
974
|
+
templateItemAdder.tryAddItemById(targetFocusId);
|
|
951
975
|
}
|
|
952
976
|
}
|
|
953
977
|
|
|
@@ -956,6 +980,7 @@ export const setup = (
|
|
|
956
980
|
for (let i of onlyDataChangeList) {
|
|
957
981
|
if (i.index < innerData.length) {
|
|
958
982
|
innerData[i.index].updateCustomData(i.data, _getItemConfigFromMeasursObj(i.measureObj));
|
|
983
|
+
innerData[i.index].enableTap = i.measureObj.enableTap ?? false;
|
|
959
984
|
} else {
|
|
960
985
|
//之后的数据未布局, 尚未添加到innerData中
|
|
961
986
|
break;
|
|
@@ -964,6 +989,15 @@ export const setup = (
|
|
|
964
989
|
}
|
|
965
990
|
}
|
|
966
991
|
|
|
992
|
+
if (targetFocusId != focusId) {
|
|
993
|
+
//重置所有的滚动信息
|
|
994
|
+
_changeFocusId(targetFocusId, false);
|
|
995
|
+
visibleInfo = visibleInfo.copy();
|
|
996
|
+
visibleInfo.start = 0;
|
|
997
|
+
visibleInfo._startMax = 0;
|
|
998
|
+
slideDivLeft.value = 0;
|
|
999
|
+
slideDivTop.value = 0;
|
|
1000
|
+
}
|
|
967
1001
|
const updater = pageUpdater.update(
|
|
968
1002
|
metroTemplate,
|
|
969
1003
|
visibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
@@ -976,9 +1010,9 @@ export const setup = (
|
|
|
976
1010
|
onItemFocus(getItemById(focusId), null);
|
|
977
1011
|
let targetRect = mRectCache.getCurRect() ?? mRectCache.getPreRect();
|
|
978
1012
|
if (targetRect) {
|
|
979
|
-
|
|
1013
|
+
slideToRectInner(targetRect, false, 0, true);
|
|
980
1014
|
} else {
|
|
981
|
-
|
|
1015
|
+
slideToItemInner(id2Index(focusId), false, 0, 0, true);
|
|
982
1016
|
}
|
|
983
1017
|
//template和slideDivStyle均确定后再次重设box condition
|
|
984
1018
|
updateTouchBoxCondition();
|
|
@@ -1026,10 +1060,6 @@ export const setup = (
|
|
|
1026
1060
|
return id2Index(focusId);
|
|
1027
1061
|
}
|
|
1028
1062
|
|
|
1029
|
-
const getCurMode = () => {
|
|
1030
|
-
return mode.getMode();
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
1063
|
const getTemplatePosition = (index) => {
|
|
1034
1064
|
return _getTemplatePosition(index);
|
|
1035
1065
|
}
|
|
@@ -1050,6 +1080,13 @@ export const setup = (
|
|
|
1050
1080
|
}
|
|
1051
1081
|
}
|
|
1052
1082
|
|
|
1083
|
+
const tryCancelDelayLoad = () => {
|
|
1084
|
+
if (delayLoadHandler > 0) {
|
|
1085
|
+
clearTimeout(delayLoadHandler);
|
|
1086
|
+
delayLoadHandler = -1;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1053
1090
|
const exportObject = {
|
|
1054
1091
|
lockSlide,
|
|
1055
1092
|
unlockSlide,
|
|
@@ -1069,9 +1106,10 @@ export const setup = (
|
|
|
1069
1106
|
getVisibleItems,
|
|
1070
1107
|
getCustomerDataSize,
|
|
1071
1108
|
getCurrentFocusIndex,
|
|
1072
|
-
getCurMode,
|
|
1073
1109
|
getTemplatePosition,
|
|
1074
|
-
setSlideSetting
|
|
1110
|
+
setSlideSetting,
|
|
1111
|
+
cancelDelayLoad: tryCancelDelayLoad,
|
|
1112
|
+
setSensorSensitivity,
|
|
1075
1113
|
};
|
|
1076
1114
|
|
|
1077
1115
|
const _calculateNearestItemByRect = (visibleSet, enter_rect_info) => {
|
|
@@ -1269,6 +1307,24 @@ export const setup = (
|
|
|
1269
1307
|
}
|
|
1270
1308
|
};
|
|
1271
1309
|
|
|
1310
|
+
const onDispatchKeyDown = (ev) => {
|
|
1311
|
+
if (mode.getMode() == TOUCH_MODE && !mode.duringTouch()) {
|
|
1312
|
+
if (ev.keyCode == 37 || ev.keyCode == 38 || ev.keyCode == 39 || ev.keyCode == 40) {
|
|
1313
|
+
//只有在上下左右键切换为focus_mode
|
|
1314
|
+
mode.keyDown();
|
|
1315
|
+
//touch切换为focus的首次按键只显示焦点
|
|
1316
|
+
const focusItem = _getVisibleFocusableItem();
|
|
1317
|
+
const preFocusItem = getItemById(focusId);
|
|
1318
|
+
_changeFocusId(focusItem.id, false);
|
|
1319
|
+
if (preFocusItem.id !== focusItem.id) {
|
|
1320
|
+
onItemBlur(preFocusItem);
|
|
1321
|
+
}
|
|
1322
|
+
onItemFocus(focusItem);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
return false;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1272
1328
|
const focusBlockOnKeyDown = (ev) => {
|
|
1273
1329
|
if (onKeyDownLock) {
|
|
1274
1330
|
return true;
|
|
@@ -1278,14 +1334,6 @@ export const setup = (
|
|
|
1278
1334
|
if (mode.duringTouch()) {
|
|
1279
1335
|
//touch过程中的按键不处理
|
|
1280
1336
|
return true;
|
|
1281
|
-
} else {
|
|
1282
|
-
//切换为focus_mode
|
|
1283
|
-
mode.keyDown();
|
|
1284
|
-
//touch切换为focus的首次按键只显示焦点
|
|
1285
|
-
const focusItem = _getVisibleFocusableItem();
|
|
1286
|
-
_changeFocusId(focusItem.id, false);
|
|
1287
|
-
onItemFocus(focusItem);
|
|
1288
|
-
return true;
|
|
1289
1337
|
}
|
|
1290
1338
|
}
|
|
1291
1339
|
|
|
@@ -1319,14 +1367,11 @@ export const setup = (
|
|
|
1319
1367
|
);
|
|
1320
1368
|
};
|
|
1321
1369
|
|
|
1322
|
-
|
|
1323
|
-
//update slideDiv size
|
|
1370
|
+
function updateTouchDivSize() {
|
|
1324
1371
|
const lastTemplateInfo = getItemByIndex(
|
|
1325
1372
|
metroTemplate.getTailItemIndex()
|
|
1326
1373
|
)?.templateInfo;
|
|
1327
1374
|
if (lastTemplateInfo) {
|
|
1328
|
-
let preTouchW = touchDivSize.width;
|
|
1329
|
-
let preTouchH = touchDivSize.height;
|
|
1330
1375
|
if (vertical) {
|
|
1331
1376
|
touchDivSize.width = props.width;
|
|
1332
1377
|
touchDivSize.height = lastTemplateInfo.top + lastTemplateInfo.height - 1;
|
|
@@ -1334,9 +1379,16 @@ export const setup = (
|
|
|
1334
1379
|
touchDivSize.width = lastTemplateInfo.left + lastTemplateInfo.width - 1;
|
|
1335
1380
|
touchDivSize.height = props.height;
|
|
1336
1381
|
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
const _onTemplateAddDone = () => {
|
|
1386
|
+
//update slideDiv size
|
|
1387
|
+
let preTouchW = touchDivSize.width;
|
|
1388
|
+
let preTouchH = touchDivSize.height;
|
|
1389
|
+
updateTouchDivSize();
|
|
1390
|
+
if (preTouchW !== touchDivSize.width || preTouchH !== touchDivSize.height) {
|
|
1391
|
+
updateTouchBoxCondition();
|
|
1340
1392
|
}
|
|
1341
1393
|
}
|
|
1342
1394
|
|
|
@@ -1644,11 +1696,10 @@ export const setup = (
|
|
|
1644
1696
|
if ((innerSlideSetting.BoundaryProtect & SlideSetting.START_PROTECT) > 0) {
|
|
1645
1697
|
if (vInfo.start >= 0) {
|
|
1646
1698
|
let boundary = 0;
|
|
1647
|
-
//首个元素是占位符时, 在保证获焦区域完全展示的前提下要保证首个不可获焦元素的完全展示
|
|
1648
1699
|
const headTemplateInfo = getItemByIndex(0).templateInfo;
|
|
1649
1700
|
if (
|
|
1650
1701
|
targetRect
|
|
1651
|
-
&& (
|
|
1702
|
+
&& (index == headTemplateInfo.index)
|
|
1652
1703
|
&& targetRect[pos_key] + targetRect[size_key] <=
|
|
1653
1704
|
vInfo.range
|
|
1654
1705
|
) {
|
|
@@ -1669,7 +1720,7 @@ export const setup = (
|
|
|
1669
1720
|
let boundary = lastVisibleStart;
|
|
1670
1721
|
if (
|
|
1671
1722
|
targetRect
|
|
1672
|
-
&& (
|
|
1723
|
+
&& (index == lastTemplateInfo.index)
|
|
1673
1724
|
&& targetRect[pos_key] - lastVisibleStart >= 0
|
|
1674
1725
|
) {
|
|
1675
1726
|
boundary = lastTemplateInfo[pos_key] - vInfo.range;
|
|
@@ -1961,13 +2012,16 @@ export const setup = (
|
|
|
1961
2012
|
|
|
1962
2013
|
//touch setting
|
|
1963
2014
|
let actorController = null;
|
|
1964
|
-
const touchLoadItemRect = visibleInfo.range;
|
|
1965
2015
|
const reachAnchorGroup = 2;
|
|
1966
2016
|
const wallConditionGroup = 1;
|
|
1967
|
-
const
|
|
2017
|
+
const ScensorCondigionGroup = 3;
|
|
2018
|
+
const TouchDownConditionGroup = 4;
|
|
1968
2019
|
|
|
1969
2020
|
let divPos = -1;
|
|
1970
2021
|
let frameCount = -1;
|
|
2022
|
+
const DEFAULT_SENSITIVITY = 10;
|
|
2023
|
+
let onMoveSensitivity = -1;
|
|
2024
|
+
|
|
1971
2025
|
const getVisibleStart = (moveInfo) => {
|
|
1972
2026
|
divPos = vertical ? slideDivTop.value + freeMoveSlideGapTop : slideDivLeft.value + freeMoveSlideGapLeft;
|
|
1973
2027
|
if (vertical) {
|
|
@@ -1977,6 +2031,51 @@ export const setup = (
|
|
|
1977
2031
|
}
|
|
1978
2032
|
}
|
|
1979
2033
|
|
|
2034
|
+
function onSensor(pos) {
|
|
2035
|
+
const lastTemplateInfo = getItemByIndex(
|
|
2036
|
+
metroTemplate.getTailItemIndex()
|
|
2037
|
+
)?.templateInfo;
|
|
2038
|
+
let totalWidth = 0;
|
|
2039
|
+
if (lastTemplateInfo) {
|
|
2040
|
+
if (vertical) {
|
|
2041
|
+
totalWidth = lastTemplateInfo.top + lastTemplateInfo.height - 1;
|
|
2042
|
+
} else {
|
|
2043
|
+
totalWidth = lastTemplateInfo.left + lastTemplateInfo.width - 1;
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
props.onScroll?.(
|
|
2047
|
+
vertical ? -(pos.yPos + slideDivTop.value + freeMoveSlideGapTop) : -(pos.xPos + slideDivLeft.value + freeMoveSlideGapLeft),
|
|
2048
|
+
visibleInfo.range,
|
|
2049
|
+
totalWidth
|
|
2050
|
+
);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
function setOnMovement(sensitivity) {
|
|
2054
|
+
onMoveSensitivity = sensitivity;
|
|
2055
|
+
actorController.run((cmds) => [
|
|
2056
|
+
cmds.state().removeConditionByGroup(ScensorCondigionGroup),
|
|
2057
|
+
cmds
|
|
2058
|
+
.condition(ScensorCondigionGroup, true)
|
|
2059
|
+
.onMovement(sensitivity) // 设置x或y移动超过10时才触发回调,以此减少回调的频次,规避js的性能影响
|
|
2060
|
+
.then([onSensor]),
|
|
2061
|
+
]);
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
function setSensorSensitivity(sensitivity = DEFAULT_SENSITIVITY) {
|
|
2065
|
+
if (!actorController) { return }
|
|
2066
|
+
if (sensitivity <= 0) {
|
|
2067
|
+
actorController.run((cmds) => [
|
|
2068
|
+
cmds.state().removeConditionByGroup(ScensorCondigionGroup),
|
|
2069
|
+
]);
|
|
2070
|
+
return;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
if (sensitivity != onMoveSensitivity) {
|
|
2074
|
+
setOnMovement(sensitivity)
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
|
|
1980
2079
|
const getTouchCount = (nexusCustomData) => {
|
|
1981
2080
|
let touchCount = -1;
|
|
1982
2081
|
if (nexusCustomData) {
|
|
@@ -2017,15 +2116,19 @@ export const setup = (
|
|
|
2017
2116
|
])
|
|
2018
2117
|
]);
|
|
2019
2118
|
}
|
|
2119
|
+
function onTouchActionDone(touchCount) {
|
|
2120
|
+
//一次触控动作结束
|
|
2121
|
+
mergeTouchSlideToSlideDiv(touchCount);
|
|
2122
|
+
//由于movement的监听是有帧数间隔的, 所以结束时需要再调用一次onScroll
|
|
2123
|
+
_onScroll();
|
|
2124
|
+
}
|
|
2020
2125
|
|
|
2021
2126
|
const onTouchDown = (data, customData, nexusCustomData) => {
|
|
2022
2127
|
touchRecorder.reset();
|
|
2023
2128
|
let touchCount = getTouchCount(nexusCustomData);
|
|
2024
2129
|
touchRecorder.setTouchCount(touchCount);
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
updateTouchBoxCondition();
|
|
2028
|
-
}
|
|
2130
|
+
updateTouchBoxCondition();
|
|
2131
|
+
|
|
2029
2132
|
mode.touchStart(touchCount);
|
|
2030
2133
|
// console.log("touchtest", `${props.name} animId:${debugAnimId} viewId:${debugViewId}`,
|
|
2031
2134
|
// "onTouchDown", data, customData, nexusCustomData)
|
|
@@ -2044,18 +2147,18 @@ export const setup = (
|
|
|
2044
2147
|
let passDownTouchInfo = nexusCustomData;
|
|
2045
2148
|
actorController.run((cmds) => [
|
|
2046
2149
|
cmds
|
|
2047
|
-
.condition(
|
|
2150
|
+
.condition(TouchDownConditionGroup, false)
|
|
2048
2151
|
.offsetPosition(offsetThreshold.left, offsetThreshold.top, offsetThreshold.right, offsetThreshold.bottom)
|
|
2049
2152
|
.then([
|
|
2050
2153
|
cmds.state().touchLockSwitch(true, vertical ? 1 : 2, unlockThreshold)]),
|
|
2051
2154
|
cmds
|
|
2052
|
-
.condition(
|
|
2155
|
+
.condition(TouchDownConditionGroup, false)
|
|
2053
2156
|
.startMove(true, true)
|
|
2054
2157
|
.then([SliderEditFuncReOrderWrap((d) => { onDragStart(d, null, passDownTouchInfo) })]),
|
|
2055
2158
|
])
|
|
2056
2159
|
|
|
2057
2160
|
//blur item
|
|
2058
|
-
onItemBlur(getItemById(focusId));
|
|
2161
|
+
// onItemBlur(getItemById(focusId));
|
|
2059
2162
|
|
|
2060
2163
|
templateItemAdder.tryAddItemByPosition(visibleInfo.end + visibleInfo.range);
|
|
2061
2164
|
|
|
@@ -2100,19 +2203,26 @@ export const setup = (
|
|
|
2100
2203
|
mode.touchEnd(touchCount);
|
|
2101
2204
|
} else {
|
|
2102
2205
|
if (touchRecorder.moved && !mode.duringFling()) {
|
|
2103
|
-
|
|
2206
|
+
onTouchActionDone(touchRecorder.touchCount);
|
|
2104
2207
|
updateRenderItems(false, false);
|
|
2105
2208
|
mode.touchEnd(touchCount)
|
|
2106
2209
|
}
|
|
2107
2210
|
}
|
|
2211
|
+
actorController.run((cmds) => [
|
|
2212
|
+
cmds.state().removeConditionByGroup(TouchDownConditionGroup),
|
|
2213
|
+
cmds.state().touchLockSwitch(false, vertical ? 1 : 2)
|
|
2214
|
+
])
|
|
2108
2215
|
}
|
|
2109
2216
|
|
|
2110
2217
|
const exportOnTouchRelease = props.touchFlag > 0 ? onTouchRelease : undefined;
|
|
2111
2218
|
|
|
2112
2219
|
const onDragStart = (data, customData, nexusCustomData) => {
|
|
2113
|
-
let touchCount = getTouchCount(nexusCustomData);
|
|
2220
|
+
let touchCount = getTouchCount(nexusCustomData);
|
|
2114
2221
|
touchRecorder.move();
|
|
2115
|
-
mode.
|
|
2222
|
+
if (!(mode.getTouchCount() == touchCount && mode.duringFling())) {
|
|
2223
|
+
//dragStart event may be triggered after fling event because of sending it when startMove condition is satisfied
|
|
2224
|
+
mode.dragStart(touchCount)
|
|
2225
|
+
}
|
|
2116
2226
|
visibleInfo.start = getVisibleStart(data);
|
|
2117
2227
|
}
|
|
2118
2228
|
|
|
@@ -2140,12 +2250,11 @@ export const setup = (
|
|
|
2140
2250
|
}
|
|
2141
2251
|
|
|
2142
2252
|
const onFlingEnd = (data, customData, nexusCustomData) => {
|
|
2143
|
-
let touchCount = getTouchCount(nexusCustomData);
|
|
2144
2253
|
visibleInfo.start = getVisibleStart(data);
|
|
2145
2254
|
//记录拖拽的距离
|
|
2146
2255
|
if (mode.duringFling()) {
|
|
2147
2256
|
let touchCount = getTouchCount(nexusCustomData);
|
|
2148
|
-
|
|
2257
|
+
onTouchActionDone(touchCount);
|
|
2149
2258
|
updateRenderItems(false, false);
|
|
2150
2259
|
mode.flingEnd(touchCount);
|
|
2151
2260
|
mode.touchEnd(touchCount);
|
|
@@ -2166,13 +2275,13 @@ export const setup = (
|
|
|
2166
2275
|
bottom: 0,
|
|
2167
2276
|
}
|
|
2168
2277
|
if (vertical) {
|
|
2169
|
-
wall.top = -boxSize.height + props.height - slideDivTop.value;
|
|
2278
|
+
wall.top = -boxSize.height + props.height - slideDivTop.value - (widgetRectInfo.padding.top + widgetRectInfo.padding.bottom);
|
|
2170
2279
|
wall.bottom = -slideDivTop.value;
|
|
2171
2280
|
if (wall.top > wall.bottom) {
|
|
2172
2281
|
wall.top = wall.bottom;
|
|
2173
2282
|
}
|
|
2174
2283
|
} else {
|
|
2175
|
-
wall.left = -boxSize.width + props.width - slideDivLeft.value;
|
|
2284
|
+
wall.left = -boxSize.width + props.width - slideDivLeft.value - (widgetRectInfo.padding.left + widgetRectInfo.padding.right);
|
|
2176
2285
|
wall.right = -slideDivLeft.value;
|
|
2177
2286
|
if (wall.left > wall.right) {
|
|
2178
2287
|
wall.left = wall.right;
|
|
@@ -2239,11 +2348,12 @@ export const setup = (
|
|
|
2239
2348
|
}
|
|
2240
2349
|
}
|
|
2241
2350
|
|
|
2242
|
-
|
|
2243
2351
|
//TODO debug
|
|
2244
2352
|
// let debugAnimId = -1;
|
|
2245
2353
|
// let debugViewId = -1
|
|
2354
|
+
let touchInited = false;
|
|
2246
2355
|
const initTouch = () => {
|
|
2356
|
+
touchInited = true;
|
|
2247
2357
|
actorController = new ActorControl();
|
|
2248
2358
|
const divView = touchDiv.value.jsvGetProxyView();
|
|
2249
2359
|
actorController.bindForgeView(divView, true);
|
|
@@ -2266,7 +2376,6 @@ export const setup = (
|
|
|
2266
2376
|
}
|
|
2267
2377
|
)
|
|
2268
2378
|
|
|
2269
|
-
|
|
2270
2379
|
// debugAnimId = actorController.debugGetAnimId();
|
|
2271
2380
|
// debugViewId = divView.ViewId;
|
|
2272
2381
|
// console.log("testtest", props.name, `animId:${debugAnimId} viewId:${debugViewId}`);
|
|
@@ -2310,6 +2419,17 @@ export const setup = (
|
|
|
2310
2419
|
.boxPosition(walls.left, walls.top, walls.right, walls.bottom)
|
|
2311
2420
|
.then([cmds.state().setHitWallOverflow()]), //TODO 通过prop设置哪个方向overflow
|
|
2312
2421
|
]);
|
|
2422
|
+
|
|
2423
|
+
if (props.onScroll) {
|
|
2424
|
+
setOnMovement(DEFAULT_SENSITIVITY);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
function cleanTouch() {
|
|
2429
|
+
actorController.run((cmds) => [
|
|
2430
|
+
cmds.state().clearAllConditions(),
|
|
2431
|
+
cmds.state().touchLockSwitch(false, vertical ? 1 : 2)
|
|
2432
|
+
])
|
|
2313
2433
|
}
|
|
2314
2434
|
|
|
2315
2435
|
//init
|
|
@@ -2322,9 +2442,9 @@ export const setup = (
|
|
|
2322
2442
|
: { start: widgetRectInfo.padding.left, end: widgetRectInfo.padding.right };
|
|
2323
2443
|
|
|
2324
2444
|
if (props.provideData) {
|
|
2325
|
-
dataList = toRaw(props.provideData());
|
|
2445
|
+
dataList = toRaw(props.provideData())?.concat();
|
|
2326
2446
|
} else if (props.data) {
|
|
2327
|
-
dataList = toRaw(props.data);
|
|
2447
|
+
dataList = toRaw(props.data)?.concat();
|
|
2328
2448
|
}
|
|
2329
2449
|
|
|
2330
2450
|
templateItemAdder = new TemplateItemAdder(
|
|
@@ -2369,20 +2489,20 @@ export const setup = (
|
|
|
2369
2489
|
permanentItemList
|
|
2370
2490
|
);
|
|
2371
2491
|
initUpdater.apply();
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2492
|
+
//触控时, 延时加载剩余屏
|
|
2493
|
+
let delayLoadHandler = -1;
|
|
2494
|
+
if (props.touchFlag > 0) {
|
|
2495
|
+
delayLoadHandler = setTimeout(() => {
|
|
2496
|
+
const updateHandler = pageUpdater.update(
|
|
2497
|
+
metroTemplate,
|
|
2498
|
+
initVisibleInfo.startWithPadding - innerKeepTraceRange * pageRange,
|
|
2499
|
+
initVisibleInfo.endWithPadding + innerKeepTraceRange * pageRange,
|
|
2500
|
+
focusId,
|
|
2501
|
+
false,
|
|
2502
|
+
permanentItemList
|
|
2503
|
+
);
|
|
2504
|
+
updateHandler.apply();
|
|
2505
|
+
}, 200);
|
|
2386
2506
|
}
|
|
2387
2507
|
|
|
2388
2508
|
onMounted(() => {
|
|
@@ -2411,6 +2531,9 @@ export const setup = (
|
|
|
2411
2531
|
taskManager.cancelAllTask();
|
|
2412
2532
|
tryCancelDelayLoad();
|
|
2413
2533
|
mounted = false;
|
|
2534
|
+
if (touchInited) {
|
|
2535
|
+
cleanTouch();
|
|
2536
|
+
}
|
|
2414
2537
|
});
|
|
2415
2538
|
|
|
2416
2539
|
return {
|
|
@@ -2426,5 +2549,6 @@ export const setup = (
|
|
|
2426
2549
|
onTouchRelease: exportOnTouchRelease,
|
|
2427
2550
|
currentFocusIndex,
|
|
2428
2551
|
modeForExport,
|
|
2552
|
+
onDispatchKeyDown
|
|
2429
2553
|
}
|
|
2430
2554
|
}
|
|
@@ -83,7 +83,7 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
83
83
|
hOffset: number, moveType: number): TemplateItem | null {
|
|
84
84
|
const item = this.getItemById(baseId) as any;
|
|
85
85
|
if (item) {
|
|
86
|
-
let neighborDirection:
|
|
86
|
+
let neighborDirection: "left" | "right" | "bottom" | "top" | null = null;
|
|
87
87
|
if (this.direction == VERTICAL) {
|
|
88
88
|
if (vOffset > 0) {
|
|
89
89
|
neighborDirection = "bottom";
|
|
@@ -97,16 +97,22 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
97
97
|
neighborDirection = "left";
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
if (neighborDirection !== null) {
|
|
101
|
+
if (item.neighborIndexList[neighborDirection].length === 0) return null;
|
|
102
|
+
let target = this.getItemByIndex(item.neighborIndexList[neighborDirection][0]);
|
|
103
|
+
while (target) {
|
|
104
|
+
if (target.focusable) {
|
|
105
|
+
break;
|
|
106
|
+
} else {
|
|
107
|
+
if (target.neighborIndexList[neighborDirection].length > 0) {
|
|
108
|
+
target = this.getItemByIndex(target.neighborIndexList[neighborDirection][0]);
|
|
109
|
+
} else {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
107
113
|
}
|
|
114
|
+
return target;
|
|
108
115
|
}
|
|
109
|
-
return target;
|
|
110
116
|
}
|
|
111
117
|
return null;
|
|
112
118
|
}
|