@shijiu/jsview-vue 2.2.201 → 2.2.426-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/browser/BrowserApic.vue.mjs +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/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +3288 -2312
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +72 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/ListWidget.vue.d.ts +6 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidget.vue.d.ts +6 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidgetSetup.d.ts +3 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +64 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
- package/bin/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/Fence.d.ts +2 -2
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/MetroTemplate.d.ts +3 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/index.d.ts +1 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +13 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/index.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +13 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer-0.9.vue.d.ts +45 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue.d.ts +597 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +420 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +57 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +588 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +358 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +358 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +10 -0
- package/bin/types/utils/JsViewVueTools/ForgeHandles.d.ts +6 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicCssStyle.d.ts +3 -1
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicKeyFrames.d.ts +4 -2
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvImpactTracer.d.ts +4 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPreDownloader.d.ts +3 -2
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRefTaker.d.ts +2 -3
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRuntimeBridge.d.ts +42 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleSheetsDeclarer.d.ts +3 -1
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +61 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +63 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/JsvTextureStore.d.ts +8 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/NinePatchHelper.d.ts +1 -1
- package/bin/types/utils/JsViewVueTools/TextureManagerTools.d.ts +7 -0
- package/bin/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +3 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/index.d.ts +3 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/JsvApic.vue.d.ts +7 -0
- package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +84 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +75 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +2 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFragShaderView/JsvFragShaderView.vue.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +7 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +12 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +45 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +26 -0
- package/bin/types/{JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts → utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts} +7 -5
- package/bin/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +13 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +16 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMaskClipDiv.vue.d.ts +0 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/DataTree.d.ts +3 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Geometry.d.ts +2 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/JsvMindMap.vue.d.ts +16 -9
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNativeSharedDiv.vue.d.ts +6 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNinePatch.vue.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +75 -0
- package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/index.d.ts +4 -2
- package/index.d.ts +9 -1
- package/package.json +1 -1
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +67 -21
- package/tsconfig.json +27 -0
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +175 -65
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/Fence.ts +2 -2
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +4 -6
- 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/JsvHashHistory.js +26 -29
- 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 +125 -59
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +156 -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/TypeCheckAndSet.ts +66 -0
- package/utils/JsViewVueTools/index.js +4 -1
- 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 +140 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +214 -63
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +2 -9
- 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 +353 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +255 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +294 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +61 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +5 -48
- 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 +3 -2
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +23 -44
- package/utils/JsViewVueWidget/JsvPreload/index.js +2 -13
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +12 -12
- 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 +5 -7
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +43 -23
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -5
- 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 +48 -50
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +2 -9
- 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 +4 -2
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +0 -63
- package/bin/browser/BrowserPreload.vue.mjs +0 -143
- package/bin/browser/BrowserQrcode.vue.mjs +0 -180
- package/bin/browser/BrowserSpray.vue.mjs +0 -66
- package/bin/browser/BrowserTextureAnim.vue.mjs +0 -332
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +0 -102
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +0 -6
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +0 -37
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +0 -13
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +0 -36
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +0 -210
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +0 -17
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +0 -11
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +0 -25
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +0 -151
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +0 -14
- package/tools/config/tsconfig.json +0 -15
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
- package/utils/JsViewVueTools/TypeCheckAndSet.js +0 -27
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +0 -48
- package/utils/JsViewVueWidget/JsvPreload/BrowserPreload.vue +0 -144
- package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +0 -189
- package/utils/JsViewVueWidget/JsvQrcode/index.js +0 -18
- package/utils/JsViewVueWidget/JsvSpray/BrowserSpray.vue +0 -55
- package/utils/JsViewVueWidget/JsvSpray/index.js +0 -17
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +0 -359
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/CheckType.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusHub.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusManager.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Const.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Dispatcher.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/PageUpdater.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/RenderItem.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Slide.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/SlotComponent.vue.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/VisibleInfo.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/WidgetRectInfo.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/RangeModel.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/CommonMetroTemplate.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/ListMetroTemplate.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/TemplateItemAdder.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/index.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/WidgetCommon.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAccount/JsvAccount.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/AudioProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/CheckType.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/Events.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudio.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioBridgeProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioProxy.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/PluginLoader.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/ScreenLockManager.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/index.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/version.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserDomBuilder.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/Color.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatex.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexBridgeProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexProxy.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/PluginLoader.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/version.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/index.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ConstSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugContentShellJBridge.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugTool.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DefaultKeyMap.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeConstDefine.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDemoTester.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvFederationTools.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvHashHistory.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPerformance.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleClass.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureDefines.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CommandList.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/Path.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Store.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Texture.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/ActorControlBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMove.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMoveControl.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/JsvApic2.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/GifData.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/Viewer.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/WebpData.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvCommonLoopToolBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/JsvClipDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/ArcLineManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/JsvConnectLine.vue.d.ts +2 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/JsvDriftScope.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvEnableRenderBreak.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFilterView.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFlexCell/JsvFlexDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActionRefObject.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorControl.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorState.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/CallbackManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ForgeTypeDefine.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +9 -9
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/NexusNode.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetAction.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetCondition.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetState.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SyncLinkManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvGrid.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvHole.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/JsvLine.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/LineManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMarquee.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/CommonType.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Constant.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/rtree.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPieChart.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterImage.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPreload/JsvPreload.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvProgressBar.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRadarChart.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/Constant.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/JsvRipple.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScaleTextBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollFollow.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollInnerSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSector.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSoundPool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpray/JsvSpray.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/FrameBuidler.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteTools.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/SpriteController.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/sAnimationToken.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/JsvSwiper.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/JsvSwiper.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/CommonType.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/JsvTextureAnim.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +6 -6
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/index.d.ts +6 -6
- /package/bin/types/{index.d.ts → utils/index.d.ts} +0 -0
|
@@ -5,88 +5,96 @@
|
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
7
|
<!--
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
8
|
+
* @file
|
|
9
|
+
*
|
|
10
|
+
* [界面概述]
|
|
11
|
+
* 思维导图控件
|
|
12
|
+
*
|
|
13
|
+
* [控件介绍]
|
|
14
|
+
* JsvMindMap:
|
|
15
|
+
* props:
|
|
16
|
+
* name: {string} 焦点name
|
|
17
|
+
* provideData: {function} 提供数据的函数
|
|
18
|
+
* width: {number} 组件宽
|
|
19
|
+
* height: {number} 组件高
|
|
20
|
+
* formatNode: {function} 接受数据, 返回标准格式节点信息的函数
|
|
21
|
+
* {
|
|
22
|
+
* left: number, left(必需)
|
|
23
|
+
* top: number, top(必需)
|
|
24
|
+
* width: number, width(必需)
|
|
25
|
+
* height: number, height(必需)
|
|
26
|
+
* id: string, 节点的唯一id(必需)
|
|
27
|
+
* childrenList: Array<any>, 子数据列表
|
|
28
|
+
* moveType: "star" | "layer" | "inherit", 节点布局类型(可选)
|
|
29
|
+
* lineStyle: object 此节点线的style
|
|
30
|
+
* {
|
|
31
|
+
* lineWidth: number, 线宽
|
|
32
|
+
* backgroundColor: string, 线的颜色(与backgroundImage互斥)
|
|
33
|
+
* backgroundImage: string, 线的图片(与backgroundColor互斥)
|
|
34
|
+
* borderRadius: string | number, 线的圆角设置
|
|
35
|
+
* }
|
|
36
|
+
* enableTap: boolean, 是否支持点击
|
|
37
|
+
* }
|
|
38
|
+
* left: {number} 组件left
|
|
39
|
+
* top: {number} 组件top
|
|
40
|
+
* slideAnim: {object} 滚动动画设置, { duration: number, easing?: string }, duration为毫秒
|
|
41
|
+
* onEdge: {function} 到达边缘回调
|
|
42
|
+
* focusRectPadding: {number} 焦点区域内边距
|
|
43
|
+
* renderRectMargin: {number} 描画区域外边距
|
|
44
|
+
* methods:
|
|
45
|
+
* getCurFocusNode
|
|
46
|
+
* @description 获取当前焦点的数据
|
|
47
|
+
* @return {object} 当前焦点节点的数据
|
|
48
|
+
* getCurFocusId
|
|
49
|
+
* @description 获取当前焦点的id
|
|
50
|
+
* @return {string} 当前节点的id
|
|
51
|
+
* getCurVisibleRect
|
|
52
|
+
* @description 获取当前的可视区域
|
|
53
|
+
* @return {object} 可视区域{x: number, y: number, width: number, height: number}
|
|
54
|
+
* slideTo
|
|
55
|
+
* @description 滚动到指定位置
|
|
56
|
+
* @params {int} x x坐标
|
|
57
|
+
* @params {int} y y坐标
|
|
58
|
+
* @params {object} animInfo 动画设置, 为null时不做动画. {duration: number, easing: string, onEnd: function}
|
|
59
|
+
* setFocusTo
|
|
60
|
+
* @description 设置焦点
|
|
61
|
+
* @params {string} id 目标节点的id
|
|
62
|
+
* @params {boolean} needSlide 是否需要滚动
|
|
63
|
+
* @params {object} animInfo 滚动动画设置
|
|
64
|
+
* moveInItem
|
|
65
|
+
* @description 把指定节点移入焦点区域
|
|
66
|
+
* @params {string} id 目标节点的id
|
|
67
|
+
* @params {object} animInfo 动画信息
|
|
68
|
+
* moveFocus
|
|
69
|
+
* @description 往指定方向移动焦点
|
|
70
|
+
* @params {string} direction 移动方向 "left" | "top" | "right" | "bottom"
|
|
71
|
+
* getEntireTreeBoundingSize
|
|
72
|
+
* @description 获取整个树的包围框宽高
|
|
73
|
+
* @return {object} 宽高 {width: number, height: number}
|
|
74
|
+
* refreshData
|
|
75
|
+
* @description 刷新数据
|
|
76
|
+
* setSensor {(callback: ({left: number, top: number}) => void, sensitivity: number) => void}
|
|
77
|
+
* 设置运动后触发的回调, sensitivity为回调敏感度, 每移动多少像素进行回调,适当放大(推荐10以上)可以极大减小对js回调过多引起的性能降低
|
|
78
|
+
*
|
|
79
|
+
* [额外说明]
|
|
80
|
+
* 1. 焦点移动逻辑
|
|
81
|
+
* 每个节点首先有个父方向, 若父节点是star模式, 则父方向由父节点相对位置决定, 若父节点是layer模式, 则父方向为父节点子方向的反向
|
|
82
|
+
* layer模式的节点, 有一个子方向, 其子方向是所有子所在的一侧方向(只有上下左右四侧), 若无子, 则父方向的反向为子方向. 确定了父方向和子方向后, 剩余两个方向则寻找该方向最近的兄弟节点, 若无则寻找最近分支上最近的同级或者叶节点
|
|
83
|
+
* star模式的节点, 除了父方向, 剩余三个方向均寻找相应方向的最近子节点, 若未找到则按layer寻找兄弟节点相同的逻辑寻找同级节点
|
|
79
84
|
-->
|
|
80
85
|
<script setup>
|
|
81
|
-
import { ref, shallowRef, reactive } from "vue";
|
|
86
|
+
import { ref, shallowRef, reactive, computed, onMounted } from "vue";
|
|
82
87
|
import { DataNode } from "./DataTree";
|
|
83
88
|
import { Rect, opposite } from "./Geometry";
|
|
84
89
|
import RBush from "./rtree.js";
|
|
85
90
|
import { EdgeDirection } from "../../JsViewEngineWidget/WidgetCommon";
|
|
86
91
|
import JsvLine from "../JsvLine";
|
|
92
|
+
import JsvDragBox from "../JsvDragBox/JsvDragBox.vue";
|
|
93
|
+
import ActorControl from "../JsvFreeMoveActor/ActorControl.ts";
|
|
94
|
+
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine.ts";
|
|
87
95
|
|
|
88
96
|
const TAG = "JsvMindMap";
|
|
89
|
-
const dirMap = {
|
|
97
|
+
const dirMap = {
|
|
90
98
|
37: "left",
|
|
91
99
|
38: "top",
|
|
92
100
|
39: "right",
|
|
@@ -180,8 +188,25 @@ const props = defineProps({
|
|
|
180
188
|
type: Number,
|
|
181
189
|
default: 100,
|
|
182
190
|
},
|
|
191
|
+
touchFlag: {
|
|
192
|
+
/*
|
|
193
|
+
* 触控模式
|
|
194
|
+
* 0: 关闭
|
|
195
|
+
* 1: 支持拖拽
|
|
196
|
+
*/
|
|
197
|
+
type: Number,
|
|
198
|
+
default: 0,
|
|
199
|
+
},
|
|
183
200
|
});
|
|
184
201
|
|
|
202
|
+
const enableTouch = computed(() => {
|
|
203
|
+
return props.touchFlag == 1;
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
const KEY_MODE = 1;
|
|
207
|
+
const TOUCH_MODE = 2;
|
|
208
|
+
let mode = KEY_MODE;
|
|
209
|
+
|
|
185
210
|
let rootNode = null;
|
|
186
211
|
const currentFocusId = ref(0);
|
|
187
212
|
let preFocusNode = null;
|
|
@@ -200,6 +225,8 @@ const slideAnimInfo = {
|
|
|
200
225
|
};
|
|
201
226
|
const viewPortRect = new Rect(0, 0, widgetWidth, widgetHeight); // 组件的可视范围
|
|
202
227
|
|
|
228
|
+
let actorController = null;
|
|
229
|
+
|
|
203
230
|
// 描画范围
|
|
204
231
|
const getRenderRect = () => {
|
|
205
232
|
return new Rect(
|
|
@@ -236,7 +263,8 @@ const buildNode = (root, data) => {
|
|
|
236
263
|
depth,
|
|
237
264
|
formatedData.id,
|
|
238
265
|
data,
|
|
239
|
-
formatedData.moveType ?? "layer"
|
|
266
|
+
formatedData.moveType ?? "layer",
|
|
267
|
+
formatedData.enableTap ?? false
|
|
240
268
|
);
|
|
241
269
|
dataNode.setLineStyle(formatedData.lineStyle ?? defaultLineStyle);
|
|
242
270
|
if (root == null) {
|
|
@@ -252,7 +280,20 @@ const buildNode = (root, data) => {
|
|
|
252
280
|
}
|
|
253
281
|
};
|
|
254
282
|
|
|
283
|
+
const locateDivWidth = ref(0);
|
|
284
|
+
const locateDivHeight = ref(0);
|
|
285
|
+
|
|
255
286
|
//构建树
|
|
287
|
+
let boundingBox = new Rect(0, 0, 0, 0);
|
|
288
|
+
function updateBoundingBox(rTreeRect) {
|
|
289
|
+
boundingBox.x = rTreeRect.minX;
|
|
290
|
+
boundingBox.y = rTreeRect.minY;
|
|
291
|
+
boundingBox.width = rTreeRect.maxX - rTreeRect.minX + 1;
|
|
292
|
+
boundingBox.height = rTreeRect.maxY - rTreeRect.minY + 1;
|
|
293
|
+
locateDivWidth.value = boundingBox.right + 100;
|
|
294
|
+
locateDivHeight.value = boundingBox.bottom + 100;
|
|
295
|
+
}
|
|
296
|
+
|
|
256
297
|
const buildTree = () => {
|
|
257
298
|
//clean old tree
|
|
258
299
|
rootNode = null;
|
|
@@ -264,6 +305,7 @@ const buildTree = () => {
|
|
|
264
305
|
allNodeList.forEach((i) => i.calculateMoveInfo());
|
|
265
306
|
rTree = new RBush();
|
|
266
307
|
allNodeList.forEach((node) => rTree.insert(node));
|
|
308
|
+
updateBoundingBox(rTree.data);
|
|
267
309
|
|
|
268
310
|
//线的处理必须在moveInfo计算完成后处理
|
|
269
311
|
for (let i = 1; i < allNodeList.length; ++i) {
|
|
@@ -356,46 +398,48 @@ const focusToNext = (keyCode) => {
|
|
|
356
398
|
}
|
|
357
399
|
};
|
|
358
400
|
|
|
401
|
+
let preLeft = viewPortRect.x;
|
|
402
|
+
let preTop = viewPortRect.y;
|
|
359
403
|
const locateDivPos = reactive({
|
|
360
404
|
left: viewPortRect.x,
|
|
361
405
|
top: viewPortRect.y,
|
|
362
406
|
});
|
|
363
407
|
|
|
408
|
+
function updateVisibielPosition(info) {
|
|
409
|
+
viewPortRect.x = info.x;
|
|
410
|
+
viewPortRect.y = info.y;
|
|
411
|
+
preLeft = locateDivPos.left;
|
|
412
|
+
preTop = locateDivPos.top;
|
|
413
|
+
locateDivPos.left = -viewPortRect.x;
|
|
414
|
+
locateDivPos.top = -viewPortRect.y;
|
|
415
|
+
visibleListStore.setCurList(rTree.search(getRenderRect()));
|
|
416
|
+
}
|
|
417
|
+
|
|
364
418
|
const moveTo = (info, animInfo) => {
|
|
365
419
|
if (!info) return;
|
|
366
420
|
//info: {left: number, top: number} 新的focusRect的x, y
|
|
367
421
|
if (info.x != viewPortRect.x || info.y != viewPortRect.y) {
|
|
368
|
-
|
|
369
|
-
viewPortRect.y = info.y;
|
|
370
|
-
const preLeft = locateDivPos.left,
|
|
371
|
-
preTop = locateDivPos.top;
|
|
372
|
-
locateDivPos.left = -viewPortRect.x;
|
|
373
|
-
locateDivPos.top = -viewPortRect.y;
|
|
374
|
-
|
|
375
|
-
visibleListStore.setCurList(rTree.search(getRenderRect()));
|
|
422
|
+
updateVisibielPosition(info);
|
|
376
423
|
|
|
377
424
|
if (animInfo && !isNaN(animInfo.duration)) {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
)
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
animInfo.onEnd?.();
|
|
392
|
-
},
|
|
393
|
-
null
|
|
394
|
-
)
|
|
395
|
-
);
|
|
396
|
-
locateDiv.value?.jsvGetProxyView(true).StartAnimation(forgeAnim);
|
|
425
|
+
let deltaX = locateDivPos.left - preLeft;
|
|
426
|
+
let deltaY = locateDivPos.top - preTop;
|
|
427
|
+
let frameNum = (60 * animInfo.duration) / 1000;
|
|
428
|
+
let edgeX = Math.abs(deltaX) > 1e-2 ? locateDivPos.left : undefined;
|
|
429
|
+
let edgeY = Math.abs(deltaY) > 1e-2 ? locateDivPos.top : undefined;
|
|
430
|
+
let speedX = Math.abs(deltaX) > 1e-2 ? Math.abs(deltaX) / frameNum : undefined;
|
|
431
|
+
let speedY = Math.abs(deltaY) > 1e-2 ? Math.abs(deltaY) / frameNum : undefined;
|
|
432
|
+
actorController.run((cmds) => [
|
|
433
|
+
cmds.action().moveTo(edgeX, edgeY, speedX, speedY, () => {
|
|
434
|
+
updateVisible(visibleListStore.getCur());
|
|
435
|
+
animInfo.onEnd?.();
|
|
436
|
+
}),
|
|
437
|
+
]);
|
|
397
438
|
updateVisible(visibleListStore.getTmp());
|
|
398
439
|
} else {
|
|
440
|
+
actorController.run((cmds) => [
|
|
441
|
+
cmds.action().teleportTo(locateDivPos.left, locateDivPos.top),
|
|
442
|
+
]);
|
|
399
443
|
updateVisible(visibleListStore.getCur());
|
|
400
444
|
}
|
|
401
445
|
}
|
|
@@ -446,7 +490,23 @@ const focusBlockOnBlur = () => {
|
|
|
446
490
|
curFocusNode?.onBlur();
|
|
447
491
|
};
|
|
448
492
|
|
|
493
|
+
function findVisibleFocusNode() {
|
|
494
|
+
if (
|
|
495
|
+
curFocusNode !== null &&
|
|
496
|
+
renderNodeList.value.find((item) => item.idToken == curFocusNode.idToken)
|
|
497
|
+
) {
|
|
498
|
+
return curFocusNode;
|
|
499
|
+
} else {
|
|
500
|
+
return renderNodeList.value[0];
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
449
504
|
const onKeyDown = (ev) => {
|
|
505
|
+
if (mode == TOUCH_MODE) {
|
|
506
|
+
curFocusNode = findVisibleFocusNode();
|
|
507
|
+
mode = KEY_MODE;
|
|
508
|
+
return true;
|
|
509
|
+
}
|
|
450
510
|
switch (ev.keyCode) {
|
|
451
511
|
case 37:
|
|
452
512
|
case 38:
|
|
@@ -464,18 +524,6 @@ const onKeyDown = (ev) => {
|
|
|
464
524
|
}
|
|
465
525
|
};
|
|
466
526
|
|
|
467
|
-
//init
|
|
468
|
-
{
|
|
469
|
-
buildTree();
|
|
470
|
-
//初始焦点放置在屏幕中间
|
|
471
|
-
const center = curFocusNode.rect.center;
|
|
472
|
-
const viewPortPos = {
|
|
473
|
-
x: Math.round(center.x - viewPortRect.width / 2),
|
|
474
|
-
y: Math.round(center.y - viewPortRect.height / 2),
|
|
475
|
-
};
|
|
476
|
-
moveTo(viewPortPos);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
527
|
// expose methos
|
|
480
528
|
/**
|
|
481
529
|
* 获取当前获焦的节点
|
|
@@ -577,6 +625,111 @@ const refreshData = () => {
|
|
|
577
625
|
moveTo(viewPortPos);
|
|
578
626
|
};
|
|
579
627
|
|
|
628
|
+
/* touch */
|
|
629
|
+
function getDragBoxRect() {
|
|
630
|
+
return new Rect(
|
|
631
|
+
Math.min(viewPortRect.width - locateDivWidth.value, 0),
|
|
632
|
+
Math.min(viewPortRect.height - locateDivHeight.value, 0),
|
|
633
|
+
Math.max(
|
|
634
|
+
viewPortRect.width - locateDivWidth.value,
|
|
635
|
+
locateDivWidth.value - viewPortRect.width
|
|
636
|
+
),
|
|
637
|
+
Math.max(
|
|
638
|
+
viewPortRect.height - locateDivHeight.value,
|
|
639
|
+
locateDivHeight.value - viewPortRect.height
|
|
640
|
+
)
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
function onTouchDown() {
|
|
644
|
+
mode = TOUCH_MODE;
|
|
645
|
+
// console.log("mindmap onTouchDown");
|
|
646
|
+
}
|
|
647
|
+
function onTouchRelease() {
|
|
648
|
+
// console.log("mindmap onTouchRelease");
|
|
649
|
+
}
|
|
650
|
+
function onDragStart() {
|
|
651
|
+
// console.log("mindmap onDragStart");
|
|
652
|
+
}
|
|
653
|
+
function onDragEnd(pos) {
|
|
654
|
+
// console.log("mindmap onDragEnd");
|
|
655
|
+
onSensor(pos);
|
|
656
|
+
}
|
|
657
|
+
const WALL_GROUP_ID = 1;
|
|
658
|
+
function setDragWall(wallInfo) {
|
|
659
|
+
actorController.run((cmds) => [
|
|
660
|
+
cmds
|
|
661
|
+
.condition(WALL_GROUP_ID, true)
|
|
662
|
+
.boxPosition(wallInfo.left, wallInfo.top, wallInfo.right, wallInfo.bottom)
|
|
663
|
+
.then([cmds.state().setHitWallOverflow()]),
|
|
664
|
+
]);
|
|
665
|
+
}
|
|
666
|
+
const SENSOR_GROUP_ID = 2;
|
|
667
|
+
let customOnSensor = null;
|
|
668
|
+
function onSensor(pos) {
|
|
669
|
+
updateVisibielPosition({
|
|
670
|
+
x: -pos.xPos,
|
|
671
|
+
y: -pos.yPos,
|
|
672
|
+
});
|
|
673
|
+
updateVisible(visibleListStore.getCur());
|
|
674
|
+
customOnSensor?.({
|
|
675
|
+
left: pos.xPos,
|
|
676
|
+
top: pos.yPos,
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
let sensitivityCache = 0;
|
|
680
|
+
function innerSetSensor(s = 10) {
|
|
681
|
+
sensitivityCache = s;
|
|
682
|
+
actorController.run((cmds) => [
|
|
683
|
+
cmds.state().removeConditionByGroup(SENSOR_GROUP_ID),
|
|
684
|
+
cmds
|
|
685
|
+
.condition(SENSOR_GROUP_ID, true)
|
|
686
|
+
.onMovement(s) // 默认设置x或y移动超过10时才触发回调,以此减少回调的频次,规避js的性能影响
|
|
687
|
+
.then([onSensor]),
|
|
688
|
+
]);
|
|
689
|
+
}
|
|
690
|
+
function initTouch() {
|
|
691
|
+
console.log("initTouch");
|
|
692
|
+
const divView = locateDiv.value.jsvGetProxyView();
|
|
693
|
+
divView.DragEnables?.(
|
|
694
|
+
ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT |
|
|
695
|
+
ForgeConst.DragFlags.TOUCH_RECV_FIRST_START |
|
|
696
|
+
ForgeConst.DragFlags.TOUCH_RECV_LAST_END
|
|
697
|
+
); // 激活 Move | TouchDown | TouchEnd
|
|
698
|
+
// touch callback
|
|
699
|
+
actorController.run((cmds) => [
|
|
700
|
+
cmds.condition(undefined, true).onTouchDown().then([onTouchDown]),
|
|
701
|
+
cmds.condition(undefined, true).onDragStart().then([onDragStart]),
|
|
702
|
+
cmds.condition(undefined, true).onDragEnd().then([onDragEnd]),
|
|
703
|
+
cmds.condition(undefined, true).onTouchRelease().then([onTouchRelease]),
|
|
704
|
+
]);
|
|
705
|
+
// wall condition
|
|
706
|
+
const wallBox = getDragBoxRect();
|
|
707
|
+
setDragWall(wallBox);
|
|
708
|
+
innerSetSensor();
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
//init
|
|
712
|
+
function init() {
|
|
713
|
+
buildTree();
|
|
714
|
+
//初始焦点放置在屏幕中间
|
|
715
|
+
const center = curFocusNode.rect.center;
|
|
716
|
+
const viewPortPos = {
|
|
717
|
+
x: Math.round(center.x - viewPortRect.width / 2),
|
|
718
|
+
y: Math.round(center.y - viewPortRect.height / 2),
|
|
719
|
+
};
|
|
720
|
+
moveTo(viewPortPos);
|
|
721
|
+
if (enableTouch.value) {
|
|
722
|
+
initTouch();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function setSensor(callback, sensitivity = 10) {
|
|
727
|
+
if (sensitivity !== sensitivityCache) {
|
|
728
|
+
innerSetSensor(sensitivity);
|
|
729
|
+
}
|
|
730
|
+
customOnSensor = callback;
|
|
731
|
+
}
|
|
732
|
+
|
|
580
733
|
const exposeObj = {
|
|
581
734
|
getCurFocusNode,
|
|
582
735
|
getCurFocusId,
|
|
@@ -587,9 +740,17 @@ const exposeObj = {
|
|
|
587
740
|
moveFocus,
|
|
588
741
|
getEntireTreeBoundingSize,
|
|
589
742
|
refreshData,
|
|
743
|
+
setSensor,
|
|
590
744
|
};
|
|
591
745
|
defineExpose(exposeObj);
|
|
592
746
|
|
|
747
|
+
onMounted(() => {
|
|
748
|
+
actorController = new ActorControl();
|
|
749
|
+
const divView = locateDiv.value.jsvGetProxyView();
|
|
750
|
+
actorController.bindForgeView(divView, true);
|
|
751
|
+
init();
|
|
752
|
+
});
|
|
753
|
+
|
|
593
754
|
//debug code
|
|
594
755
|
// window.rTree = rTree;
|
|
595
756
|
// window.dataTree = rootNode;
|
|
@@ -609,10 +770,8 @@ defineExpose(exposeObj);
|
|
|
609
770
|
<div
|
|
610
771
|
ref="locateDiv"
|
|
611
772
|
:style="{
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
width: viewPortRect.width,
|
|
615
|
-
height: viewPortRect.height,
|
|
773
|
+
width: locateDivWidth,
|
|
774
|
+
height: locateDivHeight,
|
|
616
775
|
}"
|
|
617
776
|
>
|
|
618
777
|
<slot name="background"></slot>
|
|
@@ -640,6 +799,7 @@ defineExpose(exposeObj);
|
|
|
640
799
|
width: item.rect.width,
|
|
641
800
|
height: item.rect.height,
|
|
642
801
|
}"
|
|
802
|
+
@click="item.onTap.value"
|
|
643
803
|
>
|
|
644
804
|
<slot
|
|
645
805
|
:data="item.customerData"
|