@shijiu/jsview-vue 2.3.0 → 2.3.728-alpha.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/BrowserAudio.vue.mjs +4 -1
- package/bin/browser/BrowserJsvLatex.vue.mjs +9 -90
- package/bin/jsview-vue.mjs +13913 -8048
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +39 -3
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +225 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +225 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.d.ts +5 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +25 -2
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +7 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +28 -4
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +2 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +1 -1
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +70 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +24 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +19 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +42 -0
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +5 -4
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +12 -4
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +9 -7
- package/bin/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +27 -14
- package/bin/types/utils/JsViewEngineWidget/index.d.ts +3 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +3 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +29 -2
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +107 -4
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +94 -18
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +611 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +24 -23
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +77 -20
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +77 -20
- package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/ForgeHandles.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +6 -0
- package/bin/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +44 -1
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +43 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +54 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +13 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +5 -3
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +88 -25
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/Store.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/Texture.d.ts +4 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +49 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/index.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +12 -22
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +12 -22
- package/bin/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +11 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.d.ts +101 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.d.ts +61 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.d.ts +58 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +55 -12
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +178 -35
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +119 -17
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +9 -3
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +22 -1
- package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +1 -1
- package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +5 -2
- package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +39 -1
- package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +72 -0
- package/bin/types/utils/JsViewVueWidget/JsvSoundPool.d.ts +26 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +112 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +142 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/index.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +15 -3
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +22 -96
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +6 -0
- package/bin/types/utils/JsViewVueWidget/{JsvPosterDiv.vue.d.ts → TypesDiv/JsvPosterDiv.vue.d.ts} +9 -0
- package/bin/types/utils/JsViewVueWidget/{JsvPosterImage.vue.d.ts → TypesDiv/JsvPosterImage.vue.d.ts} +15 -3
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +72 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +90 -0
- package/bin/types/utils/JsViewVueWidget/index.d.ts +8 -4
- package/dist/types/utils/JsViewEngineWidget/CheckType.d.ts +7 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +106 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +128 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +25 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +23 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +12 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/DebugTools.d.ts +9 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +16 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +412 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +751 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.d.ts +9 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +82 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +31 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +80 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Slide.d.ts +25 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +52 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +69 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +6 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +20 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +21 -0
- package/dist/types/utils/JsViewEngineWidget/RangeModel.d.ts +166 -0
- package/dist/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +74 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +28 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +23 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +46 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +42 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/Fence.d.ts +62 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +21 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +103 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +28 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/index.d.ts +8 -0
- package/dist/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +160 -0
- package/dist/types/utils/JsViewEngineWidget/index.d.ts +21 -0
- package/dist/types/utils/JsViewPlugin/JsvAccount/JsvAccount.d.ts +46 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/AudioProxy.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +22 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +212 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/CheckType.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +17 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +22 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +12 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/PluginLoader.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +9 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/index.d.ts +7 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/version.d.mts +14 -0
- package/{bin/types/utils/JsViewPlugin/JsvLatex → dist/types/utils/JsViewPlugin/JsvAudio}/version.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +17 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/Color.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +18 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +46 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +8 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +9 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/PluginLoader.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/index.d.ts +8 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/version.d.mts +40 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/AckEventDefine.d.ts +10 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +523 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +119 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +664 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-0.9.vue.d.ts +45 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +611 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue.d.ts +597 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +415 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +415 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
- package/dist/types/utils/JsViewPlugin/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueTools/BlobApi.d.ts +42 -0
- package/dist/types/utils/JsViewVueTools/ConstSymbol.d.ts +6 -0
- package/dist/types/utils/JsViewVueTools/DebugContentShellJBridge.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/DebugTool.d.ts +12 -0
- package/dist/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +14 -0
- package/dist/types/utils/JsViewVueTools/FeatureActive.d.ts +15 -0
- package/dist/types/utils/JsViewVueTools/ForgeConstDefine.d.ts +15 -0
- package/dist/types/utils/JsViewVueTools/ForgeHandles.d.ts +11 -0
- package/dist/types/utils/JsViewVueTools/JsvDynamicCssStyle.d.ts +33 -0
- package/dist/types/utils/JsViewVueTools/JsvDynamicKeyFrames.d.ts +40 -0
- package/dist/types/utils/JsViewVueTools/JsvFederationTools.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvHashHistory.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvImpactTracer.d.ts +44 -0
- package/dist/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/JsvPerformance.d.ts +9 -0
- package/dist/types/utils/JsViewVueTools/JsvPreDownloader.d.ts +55 -0
- package/dist/types/utils/JsViewVueTools/JsvRefTaker.d.ts +52 -0
- package/dist/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +378 -0
- package/dist/types/utils/JsViewVueTools/JsvStyleClass.d.ts +35 -0
- package/dist/types/utils/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +35 -0
- package/dist/types/utils/JsViewVueTools/JsvTextTools.d.ts +66 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureDefines.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +47 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +99 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +58 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +113 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +17 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +170 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/Store.d.ts +16 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/Texture.d.ts +31 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +53 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueTools/NinePatchHelper.d.ts +25 -0
- package/dist/types/utils/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/dist/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +7 -0
- package/dist/types/utils/JsViewVueTools/index.d.ts +29 -0
- package/dist/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +124 -0
- package/dist/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +148 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +35 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +102 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +37 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +15 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +77 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +54 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +44 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +17 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +3 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +12 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +26 -0
- package/dist/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +74 -0
- package/dist/types/utils/JsViewVueWidget/JsvClipDiv/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +34 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +33 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.d.ts +105 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.d.ts +65 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.d.ts +62 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +108 -0
- package/dist/types/utils/JsViewVueWidget/JsvDriftScope/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +61 -0
- package/dist/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +91 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +106 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +100 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +108 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +63 -0
- package/dist/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.d.ts +4 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +228 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +106 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +107 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +11 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +12 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +118 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +244 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +169 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +22 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +24 -0
- package/dist/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +241 -0
- package/dist/types/utils/JsViewVueWidget/JsvHole.d.ts +19 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +52 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +98 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +32 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/LineManager.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +33 -0
- package/dist/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +101 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/CommonType.d.ts +1 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/Constant.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/DataTree.d.ts +75 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +72 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +235 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +44 -0
- package/dist/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +93 -0
- package/dist/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +55 -0
- package/dist/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +68 -0
- package/dist/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +31 -0
- package/dist/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +85 -0
- package/dist/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +37 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +129 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +28 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +278 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +157 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +76 -0
- package/dist/types/utils/JsViewVueWidget/JsvSoundPool.d.ts +114 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +58 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +18 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +70 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +85 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +15 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +21 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/index.d.ts +9 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +141 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +248 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +181 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +121 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +121 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +38 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/dist/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +88 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +94 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +115 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +94 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +115 -0
- package/dist/types/utils/JsViewVueWidget/index.d.ts +53 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/utils/browser/BrowserAudio.vue.mjs +258 -0
- package/dist/utils/browser/BrowserJsvLatex.vue.mjs +64 -0
- package/dist/utils/export-sfc.mjs +12 -0
- package/dist/utils/index.mjs +29000 -0
- package/dist/utils/jsview-vue-common.mjs +39 -0
- package/package.json +1 -1
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +32 -16
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.ts +51 -3
- package/utils/JsViewEngineWidget/MetroWidget/Const.ts +5 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +193 -89
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +347 -145
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.ts +15 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +1603 -588
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +41 -23
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +146 -38
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +39 -26
- package/utils/JsViewEngineWidget/MetroWidget/Utils.ts +6 -0
- package/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.ts +2 -1
- package/utils/JsViewEngineWidget/RectUtils.js +1 -1
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue +62 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.ts +260 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.ts +32 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.ts +236 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +434 -264
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +54 -5
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +109 -41
- package/utils/JsViewEngineWidget/WidgetCommon.ts +29 -7
- package/utils/JsViewEngineWidget/index.ts +7 -2
- package/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue +4 -0
- package/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue +13 -13
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +46 -46
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +54 -41
- package/utils/JsViewPlugin/JsvLatex/Color.ts +104 -39
- package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +71 -17
- package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +14 -2
- package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +63 -31
- package/utils/JsViewPlugin/JsvLatex/version.mjs +26 -13
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +2 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +402 -23
- package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +100 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +363 -468
- package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue → JsvPlayerBrowser-wasm.vue} +61 -11
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +511 -0
- package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +52 -10
- package/utils/JsViewPlugin/JsvPlayer/index.js +58 -9
- package/utils/JsViewPlugin/JsvPlayer/package.json +8 -0
- package/utils/JsViewVueTools/BlobApi.ts +55 -0
- package/utils/JsViewVueTools/FeatureActive.ts +5 -1
- package/utils/JsViewVueTools/ForgeHandles.ts +8 -2
- package/utils/JsViewVueTools/JsvInteractionMode.js +16 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +125 -8
- package/utils/JsViewVueTools/JsvTextTools.ts +12 -2
- package/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.ts +180 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.ts +304 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +30 -12
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +157 -51
- package/utils/JsViewVueTools/JsvTextureStore/Store.ts +33 -21
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +56 -41
- package/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.ts +92 -0
- package/utils/JsViewVueTools/JsvTextureStore/index.js +2 -0
- package/utils/JsViewVueTools/index.js +3 -1
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +111 -86
- package/utils/JsViewVueWidget/JsvDashPath.vue +150 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.ts +212 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.ts +146 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.ts +748 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +10 -1
- package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +6 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +11 -5
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue +3 -1
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +3 -1
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +24 -8
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +269 -26
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +2 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.ts +24 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +3 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +5 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.ts +10 -2
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +223 -100
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +245 -64
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +95 -29
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +27 -5
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +30 -2
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +24 -7
- package/utils/JsViewVueWidget/JsvMarquee.vue +1 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +12 -10
- package/utils/JsViewVueWidget/JsvNinePatch.vue +22 -12
- package/utils/JsViewVueWidget/JsvPieChart.vue +93 -70
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +34 -31
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +56 -25
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +11 -11
- package/utils/JsViewVueWidget/JsvSector.vue +66 -28
- package/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue +108 -0
- package/utils/JsViewVueWidget/JsvSoundPool.js +75 -12
- package/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue +543 -0
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +3 -3
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue +644 -0
- package/utils/JsViewVueWidget/JsvSwiper/index.js +3 -1
- package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +315 -299
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +56 -14
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +8 -6
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue +54 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue +88 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue +177 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue +267 -0
- package/utils/JsViewVueWidget/index.js +9 -3
- package/utils/JsViewPlugin/JsvLatex/version.js +0 -24
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +0 -56
- package/utils/JsViewVueWidget/JsvPosterImage.vue +0 -105
- /package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +0 -0
- /package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue.d.ts → JsvFreeMoveActor.vue.d.ts} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fence, GapInfo } from "./Fence";
|
|
2
|
-
import { MetroTemplate, TemplateItem, MeasureInfo } from "./MetroTemplate"
|
|
2
|
+
import { MetroTemplate, TemplateItem, MeasureInfo } from "./MetroTemplate";
|
|
3
3
|
import { RangesModel, SingleRangeModel } from "../RangeModel";
|
|
4
4
|
import { VERTICAL, HORIZONTAL, FocusMoveType } from "../WidgetCommon";
|
|
5
5
|
|
|
@@ -7,29 +7,29 @@ const TAG = "CommonTemplateParser";
|
|
|
7
7
|
|
|
8
8
|
/** neighbor related interface */
|
|
9
9
|
interface Edge {
|
|
10
|
-
position: number
|
|
11
|
-
range: RangesModel
|
|
10
|
+
position: number;
|
|
11
|
+
range: RangesModel;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
interface EdgeInfo {
|
|
15
|
-
index: number
|
|
15
|
+
index: number;
|
|
16
16
|
edgeObj: {
|
|
17
|
-
leftEdge: Edge | null
|
|
18
|
-
rightEdge: Edge | null
|
|
19
|
-
topEdge: Edge | null
|
|
20
|
-
bottomEdge: Edge | null
|
|
21
|
-
}
|
|
17
|
+
leftEdge: Edge | null;
|
|
18
|
+
rightEdge: Edge | null;
|
|
19
|
+
topEdge: Edge | null;
|
|
20
|
+
bottomEdge: Edge | null;
|
|
21
|
+
};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/** get visible list related interface */
|
|
25
25
|
interface VisibleSearchConfigCommon {
|
|
26
|
-
resultStartIdx: number
|
|
27
|
-
resultEndIdx: number
|
|
28
|
-
enableBackwardSearching: boolean
|
|
29
|
-
enableForwardSearching: boolean
|
|
30
|
-
checkingStartLinePos: number
|
|
31
|
-
checkingEndLinePos: number
|
|
32
|
-
}
|
|
26
|
+
resultStartIdx: number;
|
|
27
|
+
resultEndIdx: number;
|
|
28
|
+
enableBackwardSearching: boolean;
|
|
29
|
+
enableForwardSearching: boolean;
|
|
30
|
+
checkingStartLinePos: number;
|
|
31
|
+
checkingEndLinePos: number;
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
interface VisibleSearchConfig {
|
|
35
35
|
searchDirect: number;
|
|
@@ -45,20 +45,45 @@ interface VisibleSearchConfig {
|
|
|
45
45
|
firstEndLineBlockIdx: number;
|
|
46
46
|
searchToBorder: boolean;
|
|
47
47
|
common: VisibleSearchConfigCommon;
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function left(item: TemplateItem) {
|
|
51
|
+
return item.left;
|
|
52
|
+
}
|
|
53
|
+
function right(item: TemplateItem) {
|
|
54
|
+
return item.left + item.width - 1;
|
|
55
|
+
}
|
|
56
|
+
function top(item: TemplateItem) {
|
|
57
|
+
return item.top;
|
|
58
|
+
}
|
|
59
|
+
function bottom(item: TemplateItem) {
|
|
60
|
+
return item.top + item.height - 1;
|
|
61
|
+
}
|
|
49
62
|
|
|
50
63
|
class CommonMetroTemplate extends MetroTemplate {
|
|
51
64
|
private _FenceStack: Array<Fence>;
|
|
52
|
-
private _FenceEdge: { StartX: number
|
|
65
|
+
private _FenceEdge: { StartX: number; StartY: number };
|
|
53
66
|
private _NotOccupiedEdgeList: Array<EdgeInfo>;
|
|
54
67
|
|
|
55
|
-
constructor(
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
constructor(
|
|
69
|
+
direction: Symbol,
|
|
70
|
+
lineMax: number,
|
|
71
|
+
pageSize: number,
|
|
72
|
+
layoutType: string,
|
|
73
|
+
supportHistoryPath: boolean,
|
|
74
|
+
errorLogger: Function
|
|
75
|
+
) {
|
|
76
|
+
super(
|
|
77
|
+
direction,
|
|
78
|
+
lineMax,
|
|
79
|
+
pageSize,
|
|
80
|
+
layoutType,
|
|
81
|
+
supportHistoryPath,
|
|
82
|
+
errorLogger
|
|
83
|
+
);
|
|
58
84
|
this._FenceStack = [new Fence(0, 0, this.lineMax, 0)];
|
|
59
85
|
this._FenceEdge = { StartX: 0, StartY: 0 }; // 新的未占用边列表生成
|
|
60
86
|
this._NotOccupiedEdgeList = []; // 未占用边列表
|
|
61
|
-
|
|
62
87
|
}
|
|
63
88
|
|
|
64
89
|
public calculateNeighborWhenAddStop(): void {
|
|
@@ -126,8 +151,11 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
126
151
|
return found;
|
|
127
152
|
}
|
|
128
153
|
|
|
129
|
-
|
|
130
|
-
|
|
154
|
+
private _GetValidNeighborIndex(
|
|
155
|
+
srcItemId: number,
|
|
156
|
+
lastItemId: number,
|
|
157
|
+
neighborDirection: string
|
|
158
|
+
) {
|
|
131
159
|
const templateList = this.templateList;
|
|
132
160
|
let validId = -1;
|
|
133
161
|
const item = templateList[lastItemId];
|
|
@@ -189,10 +217,9 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
189
217
|
(item.neighborIndexList as any)[direction].length > 0 &&
|
|
190
218
|
!this._CheckIdsHasFocusable((item.neighborIndexList as any)[direction])
|
|
191
219
|
) {
|
|
192
|
-
const lastItemId =
|
|
193
|
-
(item.neighborIndexList as any)[direction][
|
|
220
|
+
const lastItemId = (item.neighborIndexList as any)[direction][
|
|
194
221
|
(item.neighborIndexList as any)[direction].length - 1
|
|
195
|
-
|
|
222
|
+
];
|
|
196
223
|
const idx = this._GetValidNeighborIndex(item.id, lastItemId, direction); // 查找其左右邻居
|
|
197
224
|
if (idx !== -1) {
|
|
198
225
|
(item.neighborIndexList as any)[direction] = []; // 清除无效项
|
|
@@ -202,7 +229,7 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
202
229
|
}
|
|
203
230
|
|
|
204
231
|
public addItemInner(itemObj: MeasureInfo): TemplateItem {
|
|
205
|
-
const templateItem: any =
|
|
232
|
+
const templateItem: any = this.getTemplateItem(itemObj);
|
|
206
233
|
// Layout template items
|
|
207
234
|
const fenceStack = this._FenceStack;
|
|
208
235
|
const itemWidth = templateItem.width;
|
|
@@ -249,6 +276,7 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
249
276
|
itemKeyPos = gapInfo.GapStart;
|
|
250
277
|
itemSecondPos = topFence.AheadOffset;
|
|
251
278
|
} else {
|
|
279
|
+
this.errorLogger(TAG, "parse template error");
|
|
252
280
|
throw new Error(
|
|
253
281
|
`${TAG} item size ${itemWidth}x${itemHeight} is greater than widget line max ${this.lineMax}`
|
|
254
282
|
);
|
|
@@ -291,8 +319,9 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
291
319
|
positionKey = "top";
|
|
292
320
|
sizeKey = "height";
|
|
293
321
|
}
|
|
294
|
-
const curPageStart =
|
|
295
|
-
|
|
322
|
+
const curPageStart = (this.templateList as any)[curPageHeadIndex][
|
|
323
|
+
positionKey
|
|
324
|
+
];
|
|
296
325
|
if (
|
|
297
326
|
templateItem[positionKey] + templateItem[sizeKey] >
|
|
298
327
|
curPageStart + this.pageSize
|
|
@@ -314,10 +343,14 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
314
343
|
let pre: number, cur: number;
|
|
315
344
|
if (this.direction === VERTICAL) {
|
|
316
345
|
cur = templateItem.height + templateItem.top;
|
|
317
|
-
pre =
|
|
346
|
+
pre =
|
|
347
|
+
this.templateList[this.tailItemIndex].height +
|
|
348
|
+
this.templateList[this.tailItemIndex].top;
|
|
318
349
|
} else {
|
|
319
350
|
cur = templateItem.width + templateItem.left;
|
|
320
|
-
pre =
|
|
351
|
+
pre =
|
|
352
|
+
this.templateList[this.tailItemIndex].width +
|
|
353
|
+
this.templateList[this.tailItemIndex].left;
|
|
321
354
|
}
|
|
322
355
|
if (cur >= pre) {
|
|
323
356
|
this.tailItemIndex = templateItem.index;
|
|
@@ -393,8 +426,12 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
393
426
|
}
|
|
394
427
|
|
|
395
428
|
/** get next item functions */
|
|
396
|
-
public getNextItem(
|
|
397
|
-
|
|
429
|
+
public getNextItem(
|
|
430
|
+
baseId: number,
|
|
431
|
+
vOffset: number,
|
|
432
|
+
hOffset: number,
|
|
433
|
+
moveType: number
|
|
434
|
+
): TemplateItem | null {
|
|
398
435
|
if (vOffset === 0 && hOffset === 0)
|
|
399
436
|
console.log("GetNextItem(): offset is 0");
|
|
400
437
|
// Forge.ThrowError("GetNextItem(): offset is 0");
|
|
@@ -422,11 +459,7 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
422
459
|
|
|
423
460
|
if (nextTemplateItem === null) {
|
|
424
461
|
// 在次方向的焦点移动才会loop
|
|
425
|
-
if (
|
|
426
|
-
isVertical &&
|
|
427
|
-
moveType & FocusMoveType.ROW_LOOP &&
|
|
428
|
-
hOffset != 0
|
|
429
|
-
) {
|
|
462
|
+
if (isVertical && moveType & FocusMoveType.ROW_LOOP && hOffset != 0) {
|
|
430
463
|
nextTemplateItem = this._GetNextLoopItem(
|
|
431
464
|
itemIndex,
|
|
432
465
|
hOffset,
|
|
@@ -445,27 +478,157 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
445
478
|
}
|
|
446
479
|
}
|
|
447
480
|
|
|
448
|
-
if (
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
vOffset
|
|
452
|
-
|
|
453
|
-
) {
|
|
454
|
-
nextTemplateItem =
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
481
|
+
if (vOffset != 0 && moveType & FocusMoveType.ROW_FIND_NEAR) {
|
|
482
|
+
let rowNear = this._GetDirectionNearItem(
|
|
483
|
+
itemIndex,
|
|
484
|
+
vOffset > 0 ? "bottom" : "top"
|
|
485
|
+
);
|
|
486
|
+
if (rowNear) {
|
|
487
|
+
nextTemplateItem = rowNear;
|
|
488
|
+
}
|
|
489
|
+
} else if (hOffset != 0 && moveType & FocusMoveType.COLUMN_FIND_NEAR) {
|
|
490
|
+
let colNear = this._GetDirectionNearItem(
|
|
491
|
+
itemIndex,
|
|
492
|
+
hOffset > 0 ? "right" : "left"
|
|
493
|
+
);
|
|
494
|
+
if (colNear) {
|
|
495
|
+
nextTemplateItem = colNear;
|
|
460
496
|
}
|
|
461
497
|
}
|
|
462
498
|
|
|
463
499
|
return nextTemplateItem;
|
|
464
500
|
}
|
|
465
501
|
|
|
502
|
+
private _GetDirectionNearItem(
|
|
503
|
+
index: number,
|
|
504
|
+
direction: string,
|
|
505
|
+
mustFocusable: boolean = true
|
|
506
|
+
) {
|
|
507
|
+
const SEARCH_RANGE = 100;
|
|
508
|
+
let searchMin = Math.max(0, index - SEARCH_RANGE);
|
|
509
|
+
let searchMax = Math.min(
|
|
510
|
+
this.templateList.length - 1,
|
|
511
|
+
index + SEARCH_RANGE
|
|
512
|
+
);
|
|
513
|
+
let targetItem = this.templateList[index];
|
|
514
|
+
let tl = left(targetItem);
|
|
515
|
+
let tr = right(targetItem);
|
|
516
|
+
let tt = top(targetItem);
|
|
517
|
+
let tb = bottom(targetItem);
|
|
518
|
+
let info: {
|
|
519
|
+
item: TemplateItem | null;
|
|
520
|
+
minMainDistance: number;
|
|
521
|
+
minSubDistance: number;
|
|
522
|
+
} = {
|
|
523
|
+
item: null,
|
|
524
|
+
minMainDistance: -1,
|
|
525
|
+
minSubDistance: -1,
|
|
526
|
+
};
|
|
527
|
+
const compare = (
|
|
528
|
+
item: TemplateItem,
|
|
529
|
+
getMainDistance: (i: TemplateItem) => number,
|
|
530
|
+
getSubDistance: (i: TemplateItem) => number
|
|
531
|
+
) => {
|
|
532
|
+
if (mustFocusable && !item.focusable) return;
|
|
533
|
+
const mainDistance = getMainDistance(item);
|
|
534
|
+
if (mainDistance <= 0) return;
|
|
535
|
+
const subDistance = getSubDistance(item);
|
|
536
|
+
if (info.minMainDistance < 0 || mainDistance < info.minMainDistance) {
|
|
537
|
+
info.minMainDistance = mainDistance;
|
|
538
|
+
info.minSubDistance = subDistance;
|
|
539
|
+
info.item = item;
|
|
540
|
+
} else if (
|
|
541
|
+
mainDistance === info.minMainDistance &&
|
|
542
|
+
subDistance < info.minSubDistance
|
|
543
|
+
) {
|
|
544
|
+
info.minSubDistance = subDistance;
|
|
545
|
+
info.item = item;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
for (let i = searchMin; i <= searchMax; i++) {
|
|
550
|
+
const item = this.templateList[i];
|
|
551
|
+
let il = left(item);
|
|
552
|
+
let ir = right(item);
|
|
553
|
+
let it = top(item);
|
|
554
|
+
let ib = bottom(item);
|
|
555
|
+
switch (direction) {
|
|
556
|
+
case "left":
|
|
557
|
+
compare(
|
|
558
|
+
item,
|
|
559
|
+
(item) => {
|
|
560
|
+
return tl - il;
|
|
561
|
+
},
|
|
562
|
+
(item) => {
|
|
563
|
+
return Math.min(
|
|
564
|
+
Math.abs(tt - it),
|
|
565
|
+
Math.abs(tb - ib),
|
|
566
|
+
Math.abs(tt - ib),
|
|
567
|
+
Math.abs(tb - it)
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
);
|
|
571
|
+
break;
|
|
572
|
+
case "right":
|
|
573
|
+
compare(
|
|
574
|
+
item,
|
|
575
|
+
(item) => {
|
|
576
|
+
return ir - tr;
|
|
577
|
+
},
|
|
578
|
+
(item) => {
|
|
579
|
+
return Math.min(
|
|
580
|
+
Math.abs(tt - it),
|
|
581
|
+
Math.abs(tb - ib),
|
|
582
|
+
Math.abs(tt - ib),
|
|
583
|
+
Math.abs(tb - it)
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
);
|
|
587
|
+
break;
|
|
588
|
+
case "top":
|
|
589
|
+
compare(
|
|
590
|
+
item,
|
|
591
|
+
(item) => {
|
|
592
|
+
return tt - it;
|
|
593
|
+
},
|
|
594
|
+
(item) => {
|
|
595
|
+
return Math.min(
|
|
596
|
+
Math.abs(tl - il),
|
|
597
|
+
Math.abs(tr - ir),
|
|
598
|
+
Math.abs(tl - ir),
|
|
599
|
+
Math.abs(tr - il)
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
);
|
|
603
|
+
break;
|
|
604
|
+
case "bottom":
|
|
605
|
+
compare(
|
|
606
|
+
item,
|
|
607
|
+
(item) => {
|
|
608
|
+
return ib - tb;
|
|
609
|
+
},
|
|
610
|
+
(item) => {
|
|
611
|
+
return Math.min(
|
|
612
|
+
Math.abs(tl - il),
|
|
613
|
+
Math.abs(tr - ir),
|
|
614
|
+
Math.abs(tl - ir),
|
|
615
|
+
Math.abs(tr - il)
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
);
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
return info.item;
|
|
623
|
+
}
|
|
466
624
|
|
|
467
|
-
private getNextItemInner(
|
|
468
|
-
|
|
625
|
+
private getNextItemInner(
|
|
626
|
+
index: number,
|
|
627
|
+
offset: number,
|
|
628
|
+
vertical: boolean,
|
|
629
|
+
useHistory: boolean,
|
|
630
|
+
checkAnchor: number = -1
|
|
631
|
+
): any {
|
|
469
632
|
const templateList: any = this.templateList;
|
|
470
633
|
const baseItem = templateList[index];
|
|
471
634
|
if (checkAnchor < 0) {
|
|
@@ -479,14 +642,14 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
479
642
|
checkAnchor =
|
|
480
643
|
baseItem.left +
|
|
481
644
|
baseItem.findNextAnchor.bottom *
|
|
482
|
-
|
|
645
|
+
(baseItem.width + baseItem.marginRight);
|
|
483
646
|
}
|
|
484
647
|
} else {
|
|
485
648
|
if (baseItem.findNextAnchor.top) {
|
|
486
649
|
checkAnchor =
|
|
487
650
|
baseItem.left +
|
|
488
651
|
baseItem.findNextAnchor.top *
|
|
489
|
-
|
|
652
|
+
(baseItem.width + baseItem.marginRight);
|
|
490
653
|
}
|
|
491
654
|
}
|
|
492
655
|
} else {
|
|
@@ -495,14 +658,14 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
495
658
|
checkAnchor =
|
|
496
659
|
baseItem.top +
|
|
497
660
|
baseItem.findNextAnchor.right *
|
|
498
|
-
|
|
661
|
+
(baseItem.height + baseItem.marginBottom);
|
|
499
662
|
}
|
|
500
663
|
} else {
|
|
501
664
|
if (baseItem.findNextAnchor.left) {
|
|
502
665
|
checkAnchor =
|
|
503
666
|
baseItem.top +
|
|
504
667
|
baseItem.findNextAnchor.left *
|
|
505
|
-
|
|
668
|
+
(baseItem.height + baseItem.marginBottom);
|
|
506
669
|
}
|
|
507
670
|
}
|
|
508
671
|
}
|
|
@@ -513,9 +676,15 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
513
676
|
} else {
|
|
514
677
|
// checkAncher可能在baseItem的范围之外, 将其调整至自身范围内
|
|
515
678
|
if (vertical) {
|
|
516
|
-
checkAnchor = Math.max(
|
|
679
|
+
checkAnchor = Math.max(
|
|
680
|
+
Math.min(checkAnchor, baseItem.left + baseItem.width - 1),
|
|
681
|
+
baseItem.left
|
|
682
|
+
);
|
|
517
683
|
} else {
|
|
518
|
-
checkAnchor = Math.max(
|
|
684
|
+
checkAnchor = Math.max(
|
|
685
|
+
Math.min(checkAnchor, baseItem.top + baseItem.height - 1),
|
|
686
|
+
baseItem.top
|
|
687
|
+
);
|
|
519
688
|
}
|
|
520
689
|
}
|
|
521
690
|
|
|
@@ -572,8 +741,7 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
572
741
|
nextIndex = neighborList[i];
|
|
573
742
|
const checkingItem = templateList[nextIndex];
|
|
574
743
|
if (
|
|
575
|
-
checkAnchor <=
|
|
576
|
-
checkingItem[posKey] + checkingItem[sizeKey] - 1 &&
|
|
744
|
+
checkAnchor <= checkingItem[posKey] + checkingItem[sizeKey] - 1 &&
|
|
577
745
|
checkAnchor >= checkingItem[posKey]
|
|
578
746
|
) {
|
|
579
747
|
if (
|
|
@@ -583,8 +751,7 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
583
751
|
) {
|
|
584
752
|
// horizontal lastItemIndex bottom 不记历史路径
|
|
585
753
|
templateList[index].pathHistory[direction] = nextIndex; // 更新历史路径
|
|
586
|
-
templateList[nextIndex].pathHistory[pathHistoryDirection] =
|
|
587
|
-
index; // 更新历史路径
|
|
754
|
+
templateList[nextIndex].pathHistory[pathHistoryDirection] = index; // 更新历史路径
|
|
588
755
|
}
|
|
589
756
|
found = true;
|
|
590
757
|
break;
|
|
@@ -631,7 +798,13 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
631
798
|
if (found) {
|
|
632
799
|
if (!templateList[nextIndex].focusable) {
|
|
633
800
|
// 如果是占位符,则查找占位符的下一个
|
|
634
|
-
return this.getNextItemInner(
|
|
801
|
+
return this.getNextItemInner(
|
|
802
|
+
nextIndex,
|
|
803
|
+
offset,
|
|
804
|
+
vertical,
|
|
805
|
+
false,
|
|
806
|
+
checkAnchor
|
|
807
|
+
);
|
|
635
808
|
}
|
|
636
809
|
return templateList[nextIndex];
|
|
637
810
|
}
|
|
@@ -652,7 +825,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
652
825
|
);
|
|
653
826
|
}
|
|
654
827
|
|
|
655
|
-
private _GetNearestItem(
|
|
828
|
+
private _GetNearestItem(
|
|
829
|
+
targetItemIndex: number,
|
|
830
|
+
itemIndexList: Array<number>
|
|
831
|
+
) {
|
|
656
832
|
let nearestIndex = -1,
|
|
657
833
|
minDistance = Number.POSITIVE_INFINITY;
|
|
658
834
|
let targetItem = this.templateList[targetItemIndex];
|
|
@@ -666,7 +842,34 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
666
842
|
return nearestIndex;
|
|
667
843
|
}
|
|
668
844
|
|
|
669
|
-
private
|
|
845
|
+
private _FindNearestByDirection(
|
|
846
|
+
itemIndexList: Array<number>,
|
|
847
|
+
direction: string
|
|
848
|
+
) {
|
|
849
|
+
return itemIndexList.reduce((acc, cur) => {
|
|
850
|
+
const curItem = this.templateList[cur];
|
|
851
|
+
const accItem = this.templateList[acc];
|
|
852
|
+
if (direction == "left") {
|
|
853
|
+
return curItem.left < accItem.left ? cur : acc;
|
|
854
|
+
} else if (direction == "right") {
|
|
855
|
+
return curItem.left + curItem.width > accItem.left + accItem.width
|
|
856
|
+
? cur
|
|
857
|
+
: acc;
|
|
858
|
+
} else if (direction == "top") {
|
|
859
|
+
return curItem.top < accItem.top ? cur : acc;
|
|
860
|
+
} else {
|
|
861
|
+
return curItem.top + curItem.height > accItem.top + accItem.height
|
|
862
|
+
? cur
|
|
863
|
+
: acc;
|
|
864
|
+
}
|
|
865
|
+
}, itemIndexList[0]);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
private _GetNextLoopItem(
|
|
869
|
+
index: number,
|
|
870
|
+
offset: number,
|
|
871
|
+
isVertical: boolean
|
|
872
|
+
): TemplateItem | null {
|
|
670
873
|
const templateList = this.templateList;
|
|
671
874
|
const baseItem = templateList[index];
|
|
672
875
|
let searchDirection = isVertical ? "right" : "bottom";
|
|
@@ -679,176 +882,108 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
679
882
|
let focusableTarget = -1;
|
|
680
883
|
let startIndex = -1;
|
|
681
884
|
let neighborList = [];
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
885
|
+
//目前的算法针对规整的列表, 瀑布流这种不对齐, 以及列表中存在非focusable项, 行为不可控
|
|
886
|
+
|
|
887
|
+
let curIndex = index;
|
|
888
|
+
let nextLevelNeighborList = this._GetTotalNeighbor(
|
|
889
|
+
curIndex,
|
|
890
|
+
startDirection
|
|
891
|
+
);
|
|
892
|
+
while (!nextLevelNeighborList || nextLevelNeighborList.length == 0) {
|
|
893
|
+
//查询同级的邻居
|
|
894
|
+
const sameLevelList = this._GetTotalNeighbor(curIndex, searchDirection);
|
|
895
|
+
if (sameLevelList.length > 0) {
|
|
896
|
+
//找最边缘的同级邻居
|
|
897
|
+
const i = this._FindNearestByDirection(sameLevelList, startDirection);
|
|
898
|
+
nextLevelNeighborList = this._GetTotalNeighbor(i, startDirection);
|
|
899
|
+
curIndex = i;
|
|
900
|
+
} else {
|
|
901
|
+
//没有同级邻居, 返回null
|
|
902
|
+
return null;
|
|
693
903
|
}
|
|
694
904
|
}
|
|
695
|
-
if (startIndex >= 0) {
|
|
696
|
-
neighborList = this._GetTotalNeighbor(startIndex, startDirection);
|
|
697
|
-
|
|
698
|
-
//寻找最近的neighbor
|
|
699
|
-
let nearestIndex = -1,
|
|
700
|
-
minDistance = Number.POSITIVE_INFINITY;
|
|
701
|
-
for (let i of neighborList) {
|
|
702
|
-
const d = this._GetItemDistance(templateList[i], baseItem);
|
|
703
|
-
if (d < minDistance) {
|
|
704
|
-
nearestIndex = i;
|
|
705
|
-
minDistance = d;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
905
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
if (
|
|
713
|
-
focusableTarget =
|
|
906
|
+
if (nextLevelNeighborList && nextLevelNeighborList.length > 0) {
|
|
907
|
+
for (let i of nextLevelNeighborList) {
|
|
908
|
+
const item = templateList[i];
|
|
909
|
+
if (item.focusable) {
|
|
910
|
+
focusableTarget = i;
|
|
911
|
+
startIndex = i;
|
|
912
|
+
break;
|
|
714
913
|
}
|
|
715
|
-
neighborList = this._GetTotalNeighbor(targetIndex, searchDirection);
|
|
716
|
-
}
|
|
717
|
-
if (focusableTarget >= 0) {
|
|
718
|
-
return templateList[focusableTarget];
|
|
719
|
-
} else if (targetIndex >= 0) {
|
|
720
|
-
return this._GetNextLoopItem(targetIndex, offset, isVertical);
|
|
721
914
|
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
let startDirection = isVertical ? "top" : "left";
|
|
731
|
-
if (offset > 0) {
|
|
732
|
-
searchDirection = isVertical ? "left" : "top";
|
|
733
|
-
startDirection = isVertical ? "bottom" : "right";
|
|
734
|
-
}
|
|
735
|
-
let startIndex = -1;
|
|
736
|
-
let neighborList = [];
|
|
737
|
-
//寻找下一列的起始item
|
|
738
|
-
neighborList = this._GetTotalNeighbor(index, searchDirection);
|
|
739
|
-
while (startIndex < 0 && neighborList.length > 0) {
|
|
740
|
-
for (let i of neighborList) {
|
|
741
|
-
const n = this._GetTotalNeighbor(i, startDirection);
|
|
742
|
-
if (n.length > 0) {
|
|
743
|
-
return templateList[this._GetNearestItem(index, n)];
|
|
744
|
-
} else {
|
|
745
|
-
//TODO 是否要用递归
|
|
746
|
-
neighborList = this._GetTotalNeighbor(i, searchDirection);
|
|
915
|
+
neighborList = this._GetTotalNeighbor(startIndex, searchDirection);
|
|
916
|
+
while (neighborList.length > 0) {
|
|
917
|
+
for (let i of neighborList) {
|
|
918
|
+
const item = templateList[i];
|
|
919
|
+
if (item.focusable) {
|
|
920
|
+
focusableTarget = i;
|
|
921
|
+
break;
|
|
922
|
+
}
|
|
747
923
|
}
|
|
924
|
+
neighborList = this._GetTotalNeighbor(focusableTarget, searchDirection);
|
|
748
925
|
}
|
|
749
926
|
}
|
|
750
|
-
return null;
|
|
927
|
+
return focusableTarget >= 0 ? templateList[focusableTarget] : null;
|
|
751
928
|
}
|
|
752
929
|
|
|
753
|
-
public updateItemSize(
|
|
754
|
-
|
|
930
|
+
public updateItemSize(
|
|
931
|
+
index: number,
|
|
932
|
+
newSize: { width: number; height: number }
|
|
933
|
+
): void {
|
|
934
|
+
this.errorLogger(TAG, "updateItemSize is not supported.");
|
|
755
935
|
}
|
|
756
936
|
|
|
757
937
|
static intersects(s0: number, e0: number, s1: number, e1: number): boolean {
|
|
758
938
|
return s0 <= e1 && s1 <= e0;
|
|
759
939
|
}
|
|
760
940
|
|
|
761
|
-
static iterCount = 0;
|
|
762
|
-
|
|
763
941
|
/** get visible item list functions */
|
|
764
942
|
public getVisibleItemList(
|
|
765
943
|
visibleStart: number,
|
|
766
944
|
visibleEnd: number,
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
945
|
+
_baseId: number
|
|
946
|
+
): [number, number] {
|
|
947
|
+
// _baseId 与抽象接口保持一致;可视判定改为主轴线性扫描,不再依赖邻居图连通性
|
|
948
|
+
if (visibleStart > visibleEnd || this.templateList.length === 0) {
|
|
770
949
|
return [-1, -1];
|
|
771
950
|
}
|
|
772
951
|
|
|
773
952
|
visibleStart = Math.round(visibleStart);
|
|
774
953
|
visibleEnd = Math.round(visibleEnd);
|
|
775
|
-
let searchBaseItemIdx = this.id2Index(baseId);
|
|
776
|
-
if (searchBaseItemIdx < 0) searchBaseItemIdx = 0;
|
|
777
954
|
const vertical = this.direction === VERTICAL;
|
|
778
955
|
const sizeKey = vertical ? "height" : "width";
|
|
779
|
-
const posKey = vertical ? "top" : "left"
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
startIndex = baseItem.index;
|
|
793
|
-
} else {
|
|
794
|
-
endIndex = baseItem.index;
|
|
795
|
-
}
|
|
796
|
-
if (Math.abs(startIndex - endIndex) <= 1) {
|
|
797
|
-
const startItem = this.templateList[startIndex];
|
|
798
|
-
const endItem = this.templateList[endIndex];
|
|
799
|
-
if (visible(startItem[posKey], startItem[posKey] + startItem[sizeKey])) {
|
|
800
|
-
baseItem = startItem;
|
|
801
|
-
break;
|
|
802
|
-
} else if (visible(endItem[posKey], endItem[posKey] + endItem[sizeKey])) {
|
|
803
|
-
baseItem = endItem;
|
|
804
|
-
break;
|
|
805
|
-
} else {
|
|
806
|
-
const tailItem = this.templateList[this.getTailItemIndex()];
|
|
807
|
-
let tailInfo: any = null;
|
|
808
|
-
if (tailItem) {
|
|
809
|
-
tailInfo = {
|
|
810
|
-
left: tailItem.left,
|
|
811
|
-
top: tailItem.top,
|
|
812
|
-
width: tailItem.width,
|
|
813
|
-
height: tailItem.height,
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
console.log("MetroWidget: can not find visible item", visibleStart, visibleEnd, tailInfo);
|
|
817
|
-
return [-1, -1];
|
|
956
|
+
const posKey = vertical ? "top" : "left";
|
|
957
|
+
|
|
958
|
+
let minIdx = -1;
|
|
959
|
+
let maxIdx = -1;
|
|
960
|
+
const list = this.templateList;
|
|
961
|
+
for (let i = 0; i < list.length; i++) {
|
|
962
|
+
const item = list[i];
|
|
963
|
+
const s = item[posKey];
|
|
964
|
+
const e = s + item[sizeKey];
|
|
965
|
+
if (CommonMetroTemplate.intersects(visibleStart, visibleEnd, s, e)) {
|
|
966
|
+
const idx = item.index;
|
|
967
|
+
if (minIdx < 0 || idx < minIdx) {
|
|
968
|
+
minIdx = idx;
|
|
818
969
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
CommonMetroTemplate.iterCount = 0;
|
|
825
|
-
|
|
826
|
-
let visibleItem: Set<number> = new Set();
|
|
827
|
-
visibleItem.add(baseItem.index);
|
|
828
|
-
const nKeys = ["left", "top", "bottom", "right"];
|
|
829
|
-
const addVisibleNeighbor = (targetItem: TemplateItem) => {
|
|
830
|
-
for (let key of nKeys) {
|
|
831
|
-
let n = this._GetTotalNeighbor(targetItem.index, key);
|
|
832
|
-
if (n && n.length > 0) {
|
|
833
|
-
for (let i of n) {
|
|
834
|
-
let item = this.templateList[i];
|
|
835
|
-
if (visible(item[posKey], item[posKey] + item[sizeKey]) && !visibleItem.has(i)) {
|
|
836
|
-
visibleItem.add(i);
|
|
837
|
-
addVisibleNeighbor(item);
|
|
838
|
-
}
|
|
839
|
-
}
|
|
970
|
+
if (maxIdx < 0 || idx > maxIdx) {
|
|
971
|
+
maxIdx = idx;
|
|
840
972
|
}
|
|
841
973
|
}
|
|
842
974
|
}
|
|
843
|
-
|
|
844
|
-
return [
|
|
845
|
-
Math.min(...visibleItem),
|
|
846
|
-
Math.max(...visibleItem),
|
|
847
|
-
]
|
|
975
|
+
|
|
976
|
+
return minIdx >= 0 ? [minIdx, maxIdx] : [-1, -1];
|
|
848
977
|
}
|
|
849
978
|
|
|
850
979
|
/** neighbor calculate functions */
|
|
851
|
-
private _TryCalculateNeighborItem(
|
|
980
|
+
private _TryCalculateNeighborItem(
|
|
981
|
+
index: number,
|
|
982
|
+
xPos: number,
|
|
983
|
+
yPos: number,
|
|
984
|
+
width: number,
|
|
985
|
+
height: number
|
|
986
|
+
) {
|
|
852
987
|
const curNotOccupiedEdge: EdgeInfo = {
|
|
853
988
|
index,
|
|
854
989
|
edgeObj: {
|
|
@@ -940,7 +1075,8 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
940
1075
|
// 临时邻居不触发fence edge
|
|
941
1076
|
// 超过fenceedge范围,不作为对比相
|
|
942
1077
|
if (
|
|
943
|
-
!tmpNeighbor &&
|
|
1078
|
+
!tmpNeighbor &&
|
|
1079
|
+
crossEdgeObj.bottomEdge != null &&
|
|
944
1080
|
crossEdgeObj.bottomEdge.position > this._FenceEdge.StartY
|
|
945
1081
|
) {
|
|
946
1082
|
continue;
|
|
@@ -955,7 +1091,8 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
955
1091
|
// 临时邻居不触发fence edge
|
|
956
1092
|
// 超过fenceedge范围,不作为对比相
|
|
957
1093
|
if (
|
|
958
|
-
!tmpNeighbor &&
|
|
1094
|
+
!tmpNeighbor &&
|
|
1095
|
+
crossEdgeObj.rightEdge &&
|
|
959
1096
|
crossEdgeObj.rightEdge.position > this._FenceEdge.StartX
|
|
960
1097
|
) {
|
|
961
1098
|
continue;
|
|
@@ -980,18 +1117,17 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
980
1117
|
//更新每个方向找到的邻居
|
|
981
1118
|
if (neighbor[key] !== -1) {
|
|
982
1119
|
const targetItem = this._NotOccupiedEdgeList[neighbor[key]];
|
|
983
|
-
this._TryUpdateItemNeighbor(
|
|
984
|
-
tmpNeighbor,
|
|
985
|
-
key,
|
|
986
|
-
crossItem,
|
|
987
|
-
targetItem
|
|
988
|
-
);
|
|
1120
|
+
this._TryUpdateItemNeighbor(tmpNeighbor, key, crossItem, targetItem);
|
|
989
1121
|
}
|
|
990
1122
|
}
|
|
991
1123
|
}
|
|
992
1124
|
}
|
|
993
1125
|
|
|
994
|
-
private _IfBlockedByOtherNeighbor(
|
|
1126
|
+
private _IfBlockedByOtherNeighbor(
|
|
1127
|
+
direction: string,
|
|
1128
|
+
crossItem: EdgeInfo,
|
|
1129
|
+
targetItem: EdgeInfo
|
|
1130
|
+
) {
|
|
995
1131
|
//检查是否被其他neighbor遮挡
|
|
996
1132
|
let positionKey = "top";
|
|
997
1133
|
let sizeKey = "height";
|
|
@@ -1020,8 +1156,7 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1020
1156
|
|
|
1021
1157
|
let valid = true;
|
|
1022
1158
|
if (crossTemplateItem && targetTemplateItem) {
|
|
1023
|
-
const crossNeighborList =
|
|
1024
|
-
crossTemplateItem.neighborIndexList[direction];
|
|
1159
|
+
const crossNeighborList = crossTemplateItem.neighborIndexList[direction];
|
|
1025
1160
|
const targetStart = targetTemplateItem[positionKey];
|
|
1026
1161
|
const targetEnd = targetStart + targetTemplateItem[sizeKey] - 1;
|
|
1027
1162
|
for (let i = crossNeighborList.length - 1; i >= 0; i--) {
|
|
@@ -1034,12 +1169,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1034
1169
|
if (itemStart <= targetEnd && itemEnd >= targetStart) {
|
|
1035
1170
|
//有重叠, 检查两个item那个离 cross item 更近
|
|
1036
1171
|
if (
|
|
1037
|
-
Math.abs(
|
|
1038
|
-
item[subPositionKey] - crossTemplateItem[subPositionKey]
|
|
1039
|
-
) <
|
|
1172
|
+
Math.abs(item[subPositionKey] - crossTemplateItem[subPositionKey]) <
|
|
1040
1173
|
Math.abs(
|
|
1041
1174
|
targetTemplateItem[subPositionKey] -
|
|
1042
|
-
|
|
1175
|
+
crossTemplateItem[subPositionKey]
|
|
1043
1176
|
)
|
|
1044
1177
|
) {
|
|
1045
1178
|
//已有的neighbor更近
|
|
@@ -1055,7 +1188,11 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1055
1188
|
return valid;
|
|
1056
1189
|
}
|
|
1057
1190
|
|
|
1058
|
-
private _CheckNeighborItemMatching(
|
|
1191
|
+
private _CheckNeighborItemMatching(
|
|
1192
|
+
direction: string,
|
|
1193
|
+
crossItem: EdgeInfo,
|
|
1194
|
+
targetItem: EdgeInfo
|
|
1195
|
+
) {
|
|
1059
1196
|
const crossEdgeObj: any = crossItem.edgeObj;
|
|
1060
1197
|
const targetEdgeObj: any = targetItem.edgeObj;
|
|
1061
1198
|
let targetEdgeName = "rightEdge";
|
|
@@ -1093,14 +1230,11 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1093
1230
|
// targetEdgeObj[targetEdgeName].range.Clone().Ranges
|
|
1094
1231
|
// );
|
|
1095
1232
|
|
|
1096
|
-
const targetEdgeRangeClone =
|
|
1097
|
-
targetEdgeObj[targetEdgeName].range.Clone();
|
|
1233
|
+
const targetEdgeRangeClone = targetEdgeObj[targetEdgeName].range.Clone();
|
|
1098
1234
|
targetEdgeObj[targetEdgeName].range.ExcludeRanges(
|
|
1099
1235
|
crossEdgeObj[crossEdgeName].range
|
|
1100
1236
|
);
|
|
1101
|
-
crossEdgeObj[crossEdgeName].range.ExcludeRanges(
|
|
1102
|
-
targetEdgeRangeClone
|
|
1103
|
-
);
|
|
1237
|
+
crossEdgeObj[crossEdgeName].range.ExcludeRanges(targetEdgeRangeClone);
|
|
1104
1238
|
|
|
1105
1239
|
// console.log(
|
|
1106
1240
|
// "cchtest after exclude",
|
|
@@ -1138,15 +1272,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1138
1272
|
continue;
|
|
1139
1273
|
}
|
|
1140
1274
|
// 左边最近项
|
|
1141
|
-
if (
|
|
1142
|
-
crossEdgeObj.leftEdge !== null &&
|
|
1143
|
-
targetEdgeObj.rightEdge !== null
|
|
1144
|
-
) {
|
|
1275
|
+
if (crossEdgeObj.leftEdge !== null && targetEdgeObj.rightEdge !== null) {
|
|
1145
1276
|
if (
|
|
1146
1277
|
crossEdgeObj.leftEdge.position >= targetEdgeObj.rightEdge.position &&
|
|
1147
|
-
crossEdgeObj.leftEdge.range.IsInterAct(
|
|
1148
|
-
targetEdgeObj.rightEdge.range
|
|
1149
|
-
)
|
|
1278
|
+
crossEdgeObj.leftEdge.range.IsInterAct(targetEdgeObj.rightEdge.range)
|
|
1150
1279
|
) {
|
|
1151
1280
|
// 在其左侧,且有交叉,才为neighbor
|
|
1152
1281
|
// 计算最短距离
|
|
@@ -1167,15 +1296,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1167
1296
|
}
|
|
1168
1297
|
}
|
|
1169
1298
|
// 右边最近项
|
|
1170
|
-
if (
|
|
1171
|
-
crossEdgeObj.rightEdge !== null &&
|
|
1172
|
-
targetEdgeObj.leftEdge !== null
|
|
1173
|
-
) {
|
|
1299
|
+
if (crossEdgeObj.rightEdge !== null && targetEdgeObj.leftEdge !== null) {
|
|
1174
1300
|
if (
|
|
1175
1301
|
crossEdgeObj.rightEdge.position <= targetEdgeObj.leftEdge.position &&
|
|
1176
|
-
crossEdgeObj.rightEdge.range.IsInterAct(
|
|
1177
|
-
targetEdgeObj.leftEdge.range
|
|
1178
|
-
)
|
|
1302
|
+
crossEdgeObj.rightEdge.range.IsInterAct(targetEdgeObj.leftEdge.range)
|
|
1179
1303
|
) {
|
|
1180
1304
|
// 在其左侧,且有交叉,才为neighbor
|
|
1181
1305
|
// 计算最短距离
|
|
@@ -1197,15 +1321,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1197
1321
|
}
|
|
1198
1322
|
|
|
1199
1323
|
// 上边最近项
|
|
1200
|
-
if (
|
|
1201
|
-
crossEdgeObj.topEdge !== null &&
|
|
1202
|
-
targetEdgeObj.bottomEdge !== null
|
|
1203
|
-
) {
|
|
1324
|
+
if (crossEdgeObj.topEdge !== null && targetEdgeObj.bottomEdge !== null) {
|
|
1204
1325
|
if (
|
|
1205
1326
|
crossEdgeObj.topEdge.position >= targetEdgeObj.bottomEdge.position &&
|
|
1206
|
-
crossEdgeObj.topEdge.range.IsInterAct(
|
|
1207
|
-
targetEdgeObj.bottomEdge.range
|
|
1208
|
-
)
|
|
1327
|
+
crossEdgeObj.topEdge.range.IsInterAct(targetEdgeObj.bottomEdge.range)
|
|
1209
1328
|
) {
|
|
1210
1329
|
// 在其左侧,且有交叉,才为neighbor
|
|
1211
1330
|
// 计算最短距离
|
|
@@ -1226,15 +1345,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1226
1345
|
}
|
|
1227
1346
|
}
|
|
1228
1347
|
// 下边的最近项
|
|
1229
|
-
if (
|
|
1230
|
-
crossEdgeObj.bottomEdge !== null &&
|
|
1231
|
-
targetEdgeObj.topEdge !== null
|
|
1232
|
-
) {
|
|
1348
|
+
if (crossEdgeObj.bottomEdge !== null && targetEdgeObj.topEdge !== null) {
|
|
1233
1349
|
if (
|
|
1234
1350
|
crossEdgeObj.bottomEdge.position <= targetEdgeObj.topEdge.position &&
|
|
1235
|
-
crossEdgeObj.bottomEdge.range.IsInterAct(
|
|
1236
|
-
targetEdgeObj.topEdge.range
|
|
1237
|
-
)
|
|
1351
|
+
crossEdgeObj.bottomEdge.range.IsInterAct(targetEdgeObj.topEdge.range)
|
|
1238
1352
|
) {
|
|
1239
1353
|
// 在其左侧,且有交叉,才为neighbor
|
|
1240
1354
|
// 计算最短距离
|
|
@@ -1264,7 +1378,12 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1264
1378
|
};
|
|
1265
1379
|
}
|
|
1266
1380
|
|
|
1267
|
-
private _TryUpdateItemNeighbor(
|
|
1381
|
+
private _TryUpdateItemNeighbor(
|
|
1382
|
+
tmpNeighbor: boolean,
|
|
1383
|
+
direction: string,
|
|
1384
|
+
crossItem: EdgeInfo,
|
|
1385
|
+
targetItem: EdgeInfo
|
|
1386
|
+
) {
|
|
1268
1387
|
const keyMap: any = {
|
|
1269
1388
|
target: {
|
|
1270
1389
|
left: "right",
|
|
@@ -1282,7 +1401,10 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1282
1401
|
let crossNeighborKey = keyMap.cross[direction];
|
|
1283
1402
|
let targetNeighborKey = keyMap.target[direction];
|
|
1284
1403
|
if (!crossNeighborKey || !targetNeighborKey) {
|
|
1285
|
-
|
|
1404
|
+
this.errorLogger(
|
|
1405
|
+
"_TryUpdateItemNeighbor: undefined direction",
|
|
1406
|
+
direction
|
|
1407
|
+
);
|
|
1286
1408
|
}
|
|
1287
1409
|
|
|
1288
1410
|
const targetIndex = targetItem.index;
|
|
@@ -1295,24 +1417,72 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
1295
1417
|
templateList[targetIndex].neighborIndexList[targetNeighborKey].push(
|
|
1296
1418
|
crossItemIndex
|
|
1297
1419
|
);
|
|
1298
|
-
templateList[crossItemIndex].neighborIndexList[
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
templateList[targetIndex].tmpNeighborIndexList[targetNeighborKey] =
|
|
1420
|
+
templateList[crossItemIndex].neighborIndexList[crossNeighborKey].push(
|
|
1421
|
+
targetIndex
|
|
1422
|
+
);
|
|
1423
|
+
templateList[targetIndex].tmpNeighborIndexList[targetNeighborKey] = [];
|
|
1424
|
+
templateList[crossItemIndex].tmpNeighborIndexList[crossNeighborKey] =
|
|
1302
1425
|
[];
|
|
1303
|
-
templateList[crossItemIndex].tmpNeighborIndexList[
|
|
1304
|
-
crossNeighborKey
|
|
1305
|
-
] = [];
|
|
1306
1426
|
} else {
|
|
1307
|
-
templateList[targetIndex].tmpNeighborIndexList[
|
|
1308
|
-
|
|
1309
|
-
|
|
1427
|
+
templateList[targetIndex].tmpNeighborIndexList[targetNeighborKey].push(
|
|
1428
|
+
crossItemIndex
|
|
1429
|
+
);
|
|
1310
1430
|
templateList[crossItemIndex].tmpNeighborIndexList[
|
|
1311
1431
|
crossNeighborKey
|
|
1312
1432
|
].push(targetIndex);
|
|
1313
1433
|
}
|
|
1314
1434
|
}
|
|
1315
1435
|
}
|
|
1436
|
+
|
|
1437
|
+
public removeItemTo(index: number): void {
|
|
1438
|
+
if (index < 0 || index >= this.templateList.length) {
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
this.templateList.splice(index);
|
|
1442
|
+
//TODO 删除时需要计算fence和neighbor,这里通过一个新的对象重新计算来实现
|
|
1443
|
+
const tmpMetroTemplate = new CommonMetroTemplate(
|
|
1444
|
+
this.direction,
|
|
1445
|
+
this.lineMax,
|
|
1446
|
+
this.pageSize,
|
|
1447
|
+
this.layoutType,
|
|
1448
|
+
this.supportHistoryPath,
|
|
1449
|
+
this.errorLogger
|
|
1450
|
+
);
|
|
1451
|
+
for (let i of this.templateList) {
|
|
1452
|
+
tmpMetroTemplate.addItemInner(i);
|
|
1453
|
+
}
|
|
1454
|
+
tmpMetroTemplate.calculateNeighborWhenAddStop();
|
|
1455
|
+
|
|
1456
|
+
this._FenceStack = tmpMetroTemplate._FenceStack;
|
|
1457
|
+
this._FenceEdge = tmpMetroTemplate._FenceEdge;
|
|
1458
|
+
this._NotOccupiedEdgeList = tmpMetroTemplate._NotOccupiedEdgeList;
|
|
1459
|
+
//更新邻居信息
|
|
1460
|
+
for (let i of this.templateList) {
|
|
1461
|
+
i.neighborIndexList =
|
|
1462
|
+
tmpMetroTemplate.templateList[i.index].neighborIndexList;
|
|
1463
|
+
i.tmpNeighborIndexList =
|
|
1464
|
+
tmpMetroTemplate.templateList[i.index].tmpNeighborIndexList;
|
|
1465
|
+
i.pathHistory.left =
|
|
1466
|
+
i.pathHistory.left >= index ? -1 : i.pathHistory.left;
|
|
1467
|
+
i.pathHistory.right =
|
|
1468
|
+
i.pathHistory.right >= index ? -1 : i.pathHistory.right;
|
|
1469
|
+
i.pathHistory.top = i.pathHistory.top >= index ? -1 : i.pathHistory.top;
|
|
1470
|
+
i.pathHistory.bottom =
|
|
1471
|
+
i.pathHistory.bottom >= index ? -1 : i.pathHistory.bottom;
|
|
1472
|
+
}
|
|
1473
|
+
//更新idsMap
|
|
1474
|
+
for (let i = this.idsMap.length - 1; i >= 0; --i) {
|
|
1475
|
+
if (this.idsMap[i] >= index) {
|
|
1476
|
+
this.idsMap.splice(i, 1);
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
this.tailItemIndex = this.templateList.length - 1;
|
|
1480
|
+
for (let uid in this.uidMap) {
|
|
1481
|
+
if ((this.uidMap as any)[uid].index >= index) {
|
|
1482
|
+
delete (this.uidMap as any)[uid];
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1316
1486
|
}
|
|
1317
1487
|
|
|
1318
|
-
export { CommonMetroTemplate };
|
|
1488
|
+
export { CommonMetroTemplate };
|