@shijiu/jsview-vue 2.2.373 → 2.3.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/jsview-vue-common.mjs +1 -1
- package/bin/jsview-vue.mjs +7678 -7306
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/CheckType.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusBlock.vue.d.ts +0 -34
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusHub.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusManager.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Const.d.ts +0 -4
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +8 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/DebugTools.d.ts +5 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Dispatcher.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/ListWidget.vue.d.ts +24 -14
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +179 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidgetSetup.d.ts +9 -6
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/PageUpdater.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/RenderItem.d.ts +3 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Slide.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/SlotComponent.vue.d.ts +0 -4
- 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/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/VisibleInfo.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/WidgetRectInfo.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/RangeModel.d.ts +0 -4
- package/bin/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/CommonMetroTemplate.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/Fence.d.ts +2 -6
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/ListMetroTemplate.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/MetroTemplate.d.ts +3 -7
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/TemplateItemAdder.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/index.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/WidgetCommon.d.ts +0 -4
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/index.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAccount/JsvAccount.d.ts +0 -4
- package/bin/types/utils/JsViewPlugin/JsvAudio/AudioProxy.d.ts +2 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -8
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/CheckType.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/Events.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudio.vue.d.ts +4 -8
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioBridgeProxy.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioProxy.vue.d.ts +0 -4
- package/bin/types/utils/JsViewPlugin/JsvAudio/PluginLoader.d.ts +1 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/ScreenLockManager.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/index.d.ts +0 -4
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +14 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/version.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserDomBuilder.d.ts +0 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserJsvLatex.vue.d.ts +5 -9
- package/bin/types/utils/JsViewPlugin/JsvLatex/Color.d.ts +1 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatex.vue.d.ts +5 -29
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +3 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexProxy.vue.d.ts +0 -4
- package/bin/types/utils/JsViewPlugin/JsvLatex/PluginLoader.d.ts +1 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/index.d.ts +0 -4
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +13 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/version.d.ts +0 -4
- package/bin/types/utils/JsViewPlugin/JsvPlayer/AckEventDefine.d.ts +10 -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 +596 -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/{JsViewPlugin → utils/JsViewPlugin}/index.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ConstSymbol.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugContentShellJBridge.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugTool.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DefaultKeyMap.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/FeatureActive.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeConstDefine.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeHandles.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicCssStyle.d.ts +0 -17
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicKeyFrames.d.ts +0 -17
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvFederationTools.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvHashHistory.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvImpactTracer.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPerformance.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPreDownloader.d.ts +0 -21
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRefTaker.d.ts +0 -26
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRuntimeBridge.d.ts +6 -8
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleClass.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleSheetsDeclarer.d.ts +0 -18
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +61 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureDefines.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureLoadTool.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CommandList.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/Path.d.ts +20 -3
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/JsvTextureStore.d.ts +1 -23
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Store.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Texture.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/NinePatchHelper.d.ts +0 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/TextureManagerTools.d.ts +0 -4
- package/bin/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +3 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/index.d.ts +0 -6
- package/bin/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +120 -0
- package/bin/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +144 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/ActorControlBase.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +64 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMoveControl.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/index.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -5
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/JsvApic.vue.d.ts +0 -20
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +50 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -5
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +23 -0
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +23 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/GifData.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/Viewer.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/WebpData.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvCommonLoopToolBase.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/JsvClipDiv.vue.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvClipDiv/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +13 -0
- package/bin/types/utils/JsViewVueWidget/JsvConnectLine/index.d.ts +2 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDragBox/JsvDragBox.vue.d.ts +0 -25
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/JsvDriftScope.vue.d.ts +4 -8
- package/bin/types/utils/JsViewVueWidget/JsvDriftScope/index.d.ts +1 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvEnableRenderBreak.vue.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFilterView.vue.d.ts +6 -25
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +72 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +78 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +75 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFlexCell/index.d.ts +1 -4
- package/bin/types/{JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts → utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts} +1 -5
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +1 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorControl.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/CallbackManager.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ForgeTypeDefine.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +12 -37
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +6 -28
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +7 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/NexusNode.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetAction.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetCondition.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetState.d.ts +1 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SyncLinkManager.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/index.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvGrid.vue.d.ts +0 -73
- package/bin/types/utils/JsViewVueWidget/JsvHole.d.ts +2 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/Cursor.vue.d.ts +2 -6
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/EditViewOperator.d.ts +2 -5
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/EditVisibleArea.d.ts +4 -5
- package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +12 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/SharedDefine.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/SystemTextTools.d.ts +7 -5
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/index.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +12 -0
- package/bin/types/utils/JsViewVueWidget/JsvLine/LineManager.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvLine/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +12 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMaskClipDiv.vue.d.ts +0 -22
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Constant.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/DataTree.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Geometry.d.ts +2 -6
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/JsvMindMap.vue.d.ts +12 -95
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/index.d.ts +1 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/rtree.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNativeSharedDiv.vue.d.ts +0 -18
- package/bin/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +21 -0
- package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +9 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterDiv.vue.d.ts +3 -17
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterImage.vue.d.ts +3 -18
- package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +25 -0
- package/bin/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +12 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvQrcode/JsvQrcode.vue.d.ts +1 -26
- package/bin/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +13 -0
- package/bin/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
- package/bin/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +84 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/index.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +10 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollBox.vue.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollFollow.vue.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollSymbol.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/index.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSector.vue.d.ts +0 -18
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSoundPool.d.ts +0 -42
- package/bin/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +11 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/FrameBuidler.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +18 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +0 -16
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteTools.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/SpriteController.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/index.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/JsvSwiper.vue.d.ts +0 -39
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/JsvSwiper.vue.d.ts +3 -27
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/index.d.ts +2 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextBox.vue.d.ts +0 -26
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/CommonType.d.ts +0 -4
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/JsvTextureAnim.vue.d.ts +0 -4
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTouchModeSwitcher.vue.d.ts +3 -28
- package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +9 -34
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/index.d.ts +9 -13
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/index.d.ts +4 -6
- package/bin/types/{index.d.ts → utils/index.d.ts} +0 -4
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/tools/jsview-vue-build.mjs +3 -2
- package/tsconfig.json +27 -0
- package/utils/JsViewEngineWidget/CheckType.js +3 -3
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +25 -6
- package/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue +22 -0
- package/utils/JsViewEngineWidget/MetroWidget/DebugTools.ts +37 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +42 -7
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +62 -10
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +177 -77
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +30 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/Fence.ts +2 -2
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -4
- package/utils/JsViewPlugin/JsvPlayer/AckEventDefine.ts +82 -0
- package/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue +49 -31
- package/utils/JsViewVueTools/JsvHashHistory.js +26 -29
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +82 -73
- package/utils/JsViewVueTools/JsvTextTools.ts +63 -130
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -2
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +1 -1
- package/utils/JsViewVueTools/TypeCheckAndSet.ts +66 -0
- package/utils/JsViewVueTools/index.js +1 -2
- package/utils/JsViewVueWidget/Jsv3dDiv.vue +85 -0
- package/utils/JsViewVueWidget/Jsv3dStage.vue +50 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/index.js +1 -8
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/index.js +1 -8
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue +151 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +11 -16
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +1 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +4 -1
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +2 -9
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +8 -0
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +48 -15
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +43 -10
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +22 -9
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +41 -27
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +3 -57
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +57 -71
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +15 -8
- package/utils/JsViewVueWidget/JsvPosterImage.vue +12 -3
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +21 -44
- package/utils/JsViewVueWidget/JsvPreload/index.js +2 -13
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +3 -2
- package/utils/JsViewVueWidget/JsvSoundPool.js +3 -7
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +116 -75
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +0 -5
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +27 -32
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +2 -9
- package/utils/JsViewVueWidget/index.js +4 -2
- package/bin/browser/BrowserApic.vue.mjs +0 -114
- package/bin/browser/BrowserApic2.vue.mjs +0 -108
- package/bin/browser/BrowserApicLib.mjs +0 -431
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +0 -79
- package/bin/browser/BrowserPreload.vue.mjs +0 -139
- package/bin/browser/BrowserQrcode.vue.mjs +0 -176
- package/bin/browser/BrowserSpray.vue.mjs +0 -56
- package/bin/browser/BrowserTextureAnim.vue.mjs +0 -322
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +0 -435
- package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +0 -6
- package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +0 -5
- package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +0 -5
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +0 -7
- package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +0 -5
- package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +0 -6
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +0 -95
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +0 -102
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +0 -51
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +0 -5
- package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +0 -5
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +0 -34
- package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +0 -5
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +0 -106
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +0 -106
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +0 -60
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvHole.d.ts +0 -19
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +0 -65
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +0 -32
- package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +0 -5
- package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +0 -33
- package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +0 -5
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +0 -50
- package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +0 -26
- package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +0 -14
- package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +0 -67
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +0 -21
- package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +0 -31
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +0 -15
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +0 -37
- package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +0 -8
- package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +0 -129
- package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +0 -28
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +0 -8
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +0 -29
- package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +0 -78
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +0 -70
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +0 -6
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +0 -155
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +0 -18
- package/tools/config/tsconfig.json +0 -16
- package/utils/JsViewVueTools/JsvDemoTester.js +0 -81
- package/utils/JsViewVueTools/TypeCheckAndSet.js +0 -27
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +0 -75
- 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/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActionRefObject.d.ts +0 -0
- /package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorState.d.ts +0 -0
- /package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/CommonType.d.ts +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
4
|
+
* 【模块 export 内容】
|
|
5
|
+
* JsvFullscreenAdjust: 将给定的宽高区域(一般为主屏幕),放到屏幕中心,保持横纵比
|
|
6
|
+
* props说明:
|
|
7
|
+
* childWidth: number 主屏幕的宽
|
|
8
|
+
* childHeight: number 主屏幕的高
|
|
9
|
+
* onSized: Function(width:number, height:number)
|
|
10
|
+
可以通过回调知道尺寸变化后的时机,回调参数(width, height)为flex后的尺寸
|
|
11
|
+
* background: {string} (选填)背景图案 可选值: 绝对路径url|url(相对路径url)|#FFFFFF|rbga(255,0,0,1.0)
|
|
12
|
+
*
|
|
13
|
+
* expose说明:
|
|
14
|
+
* getWidth(): onSize生效时,获取元素的宽度
|
|
15
|
+
* getHeight(): onSize生效时,获取元素的高度
|
|
16
|
+
*
|
|
17
|
+
-->
|
|
18
|
+
<script setup>
|
|
19
|
+
import { shallowRef, watchEffect } from "vue";
|
|
20
|
+
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
21
|
+
import JsvScreenFlex from "./JsvScreenFlex.vue";
|
|
22
|
+
|
|
23
|
+
const rProps = defineProps({
|
|
24
|
+
childWidth: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0,
|
|
27
|
+
},
|
|
28
|
+
childHeight: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0,
|
|
31
|
+
},
|
|
32
|
+
askSize: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
onSized: {
|
|
37
|
+
type: Function,
|
|
38
|
+
default: null,
|
|
39
|
+
},
|
|
40
|
+
background: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: null,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// 此div的宽度是固定的全屏尺寸,在jsview体系下,全屏的宽度就是designMapWidth
|
|
47
|
+
const cDivMaxWidth = Forge.sRenderBridge.GetScreenInfo().designedWidth;
|
|
48
|
+
|
|
49
|
+
let rScreenFlexRef = shallowRef(null);
|
|
50
|
+
let rChildWidth = shallowRef(0);
|
|
51
|
+
let rChildHeight = shallowRef(0);
|
|
52
|
+
let rScaleSet = shallowRef(null);
|
|
53
|
+
|
|
54
|
+
let vGetScreenSize = false;
|
|
55
|
+
let vScreenWidth = 0;
|
|
56
|
+
let vScreenHeight = 0;
|
|
57
|
+
|
|
58
|
+
watchEffect(() => {
|
|
59
|
+
if (vGetScreenSize) {
|
|
60
|
+
// 响应child的width, height的变化设置
|
|
61
|
+
_ResizeContainer(
|
|
62
|
+
vScreenWidth,
|
|
63
|
+
vScreenHeight,
|
|
64
|
+
rProps.childWidth,
|
|
65
|
+
rProps.childHeight
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
let cOnSizeFunc = (width, height) => {
|
|
71
|
+
if (rProps.onSized) {
|
|
72
|
+
rProps.onSized(width, height);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
vScreenWidth = width;
|
|
76
|
+
vScreenHeight = height;
|
|
77
|
+
_ResizeContainer(
|
|
78
|
+
vScreenWidth,
|
|
79
|
+
vScreenHeight,
|
|
80
|
+
rProps.childWidth,
|
|
81
|
+
rProps.childHeight
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
function _ResizeContainer(screenWidth, screenHeight, childWidth, childHeight) {
|
|
86
|
+
if (childWidth == 0 || childHeight == 0) {
|
|
87
|
+
console.error(`Error: size is 0 set w=${childWidth} h=${childHeight}`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (childWidth > cDivMaxWidth) {
|
|
92
|
+
console.error(
|
|
93
|
+
`Error: over max-width max-with=${cDivMaxWidth} set width=${childWidth}`
|
|
94
|
+
);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
rChildWidth.value = childWidth;
|
|
99
|
+
rChildHeight.value = childHeight;
|
|
100
|
+
|
|
101
|
+
let scale = 1.0;
|
|
102
|
+
let requireHeight = Math.floor((childWidth * screenHeight) / screenWidth);
|
|
103
|
+
if (requireHeight < childHeight) {
|
|
104
|
+
// height展示不下,以height为主,保留3位小数
|
|
105
|
+
scale = Math.floor((requireHeight / childHeight) * 1000) / 1000;
|
|
106
|
+
} else {
|
|
107
|
+
// height能展示下,以width为主, scale不变
|
|
108
|
+
}
|
|
109
|
+
rScaleSet.value = `scale3d(${scale}, ${scale}, 1)`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
defineExpose({
|
|
113
|
+
// TODO: PC模拟环境中目前没有浏览器的类似ResizeObserver接口
|
|
114
|
+
// 可以监听到left/ top变化,所以先关闭Left / Top的获取
|
|
115
|
+
// getLeft: () => {
|
|
116
|
+
// return SizeX.value;
|
|
117
|
+
// },
|
|
118
|
+
// getTop: () => {
|
|
119
|
+
// return SizeY.value;
|
|
120
|
+
// },
|
|
121
|
+
|
|
122
|
+
getWidth: () => {
|
|
123
|
+
return rScreenFlexRef.value?.getWidth();
|
|
124
|
+
},
|
|
125
|
+
getHeight: () => {
|
|
126
|
+
return rScreenFlexRef.value?.getHeight();
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<template>
|
|
132
|
+
<jsv-screen-flex
|
|
133
|
+
:style="{
|
|
134
|
+
flexDirection: 'row',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
}"
|
|
138
|
+
:onSized="cOnSizeFunc"
|
|
139
|
+
:background="rProps.background"
|
|
140
|
+
>
|
|
141
|
+
<div
|
|
142
|
+
:style="{
|
|
143
|
+
width: rProps.childWidth,
|
|
144
|
+
height: rProps.childHeight,
|
|
145
|
+
transform: rScaleSet,
|
|
146
|
+
}"
|
|
147
|
+
>
|
|
148
|
+
<slot />
|
|
149
|
+
</div>
|
|
150
|
+
</jsv-screen-flex>
|
|
151
|
+
</template>
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* 副轴方向多行内容总体的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
|
|
17
17
|
* 特别注意: 这些属性会引起位置对齐问题, 所以会自动去掉: "overflow:hidden"
|
|
18
18
|
* askSize: boolean 设置会跟进flex的尺寸变化,设置后可通过getWidth/getHeight拿到尺寸,但会降低性能
|
|
19
|
-
* onSized: Function
|
|
20
|
-
|
|
19
|
+
* onSized: Function(width:number, height:number)
|
|
20
|
+
比askSize更进一步,可以通过回调知道尺寸变化后的时机,回调参数(width, height)为flex后的尺寸* background: {string} (选填)背景图案 可选值: 绝对路径url|url(相对路径url)|#FFFFFF|rbga(255,0,0,1.0)
|
|
21
21
|
*
|
|
22
22
|
* expose说明:
|
|
23
23
|
* getWidth(): 当askSize或者onSize生效时,获取元素的宽度
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
29
29
|
import { shallowRef, watchEffect, onUnmounted } from "vue";
|
|
30
30
|
import JsvFlexDiv from "./JsvFlexDiv.vue";
|
|
31
|
+
import { urlCheckSet } from "../../JsViewVueTools/TypeCheckAndSet.ts";
|
|
31
32
|
import { ForgeTextureApis } from "../../JsViewVueTools/TextureManagerTools.ts";
|
|
32
33
|
import ForgeHandles from "../../JsViewVueTools/ForgeHandles";
|
|
33
34
|
|
|
@@ -52,7 +53,7 @@ const cDivWidth = Forge.sRenderBridge.GetScreenInfo().designedWidth;
|
|
|
52
53
|
|
|
53
54
|
let rConfig = shallowRef({});
|
|
54
55
|
|
|
55
|
-
let
|
|
56
|
+
let vTextureStringCache = null; // 用于判断是否需要texture更换的flag
|
|
56
57
|
let vStretchViewRef = null;
|
|
57
58
|
|
|
58
59
|
// 创建AutoStretchView来自动识别JsView的视窗大小
|
|
@@ -74,29 +75,23 @@ watchEffect(() => {
|
|
|
74
75
|
rConfig.value.askSize = rProps.askSize;
|
|
75
76
|
rConfig.value.onSized = rProps.onSized;
|
|
76
77
|
|
|
77
|
-
if (rProps.background !=
|
|
78
|
+
if (rProps.background != vTextureStringCache) {
|
|
78
79
|
// 构建背景Texture
|
|
79
|
-
|
|
80
|
+
vTextureStringCache = rProps.background;
|
|
80
81
|
|
|
81
82
|
let texture_setting = null;
|
|
82
83
|
|
|
83
|
-
if (
|
|
84
|
+
if (vTextureStringCache != null) {
|
|
84
85
|
const texture_manager = ForgeHandles.TextureManager;
|
|
85
86
|
if (
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
vTextureStringCache.trim().startsWith("#") ||
|
|
88
|
+
vTextureStringCache.trim().startsWith("rgba")
|
|
88
89
|
) {
|
|
89
90
|
texture_setting = new Forge.TextureSetting(
|
|
90
|
-
ForgeTextureApis.GetColorTexture(texture_manager,
|
|
91
|
+
ForgeTextureApis.GetColorTexture(texture_manager, vTextureStringCache)
|
|
91
92
|
);
|
|
92
93
|
} else {
|
|
93
|
-
|
|
94
|
-
let image_url = base_url;
|
|
95
|
-
if (base_url && base_url.indexOf("http") === 0) {
|
|
96
|
-
image_url = base_url;
|
|
97
|
-
} else if (window.JsView?.Dom.UrlRef) {
|
|
98
|
-
image_url = new window.JsView.Dom.UrlRef(base_url).href;
|
|
99
|
-
}
|
|
94
|
+
let image_url = urlCheckSet(vTextureStringCache);
|
|
100
95
|
texture_setting = new Forge.ExternalTextureSetting(
|
|
101
96
|
ForgeTextureApis.GetImage(texture_manager, image_url)
|
|
102
97
|
);
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
<script setup>
|
|
45
45
|
import { onMounted, onUnmounted, shallowRef } from "vue";
|
|
46
46
|
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
47
|
+
import { urlCheckSet } from "../../JsViewVueTools/TypeCheckAndSet.ts";
|
|
47
48
|
import ForgeHandles from "../../JsViewVueTools/ForgeHandles";
|
|
48
49
|
import {
|
|
49
50
|
FeatureNames,
|
|
@@ -87,6 +88,8 @@ const rProps = defineProps({
|
|
|
87
88
|
// 激活引擎中的功能支持
|
|
88
89
|
JsvUseFeature("JsvFragShaderView", FeatureNames.CustomFragShader);
|
|
89
90
|
|
|
91
|
+
console.log("LudlDebug using JsvFragShaderView...");
|
|
92
|
+
|
|
90
93
|
let rAnimRunning = shallowRef(false); // 动画是否在执行,画面只在动画进行时进行显示
|
|
91
94
|
let vPreloadHandler = null;
|
|
92
95
|
let vPreloadDone = false;
|
|
@@ -115,7 +118,7 @@ if (rProps.textures) {
|
|
|
115
118
|
if (typeof item.resource == "string") {
|
|
116
119
|
let image_url = item.resource;
|
|
117
120
|
if (item.resource && item.resource.trim().indexOf("url(") === 0) {
|
|
118
|
-
image_url =
|
|
121
|
+
image_url = urlCheckSet(image_url);
|
|
119
122
|
}
|
|
120
123
|
const texture = texture_manager.GetImage2(
|
|
121
124
|
image_url,
|
|
@@ -6,13 +6,6 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
*/
|
|
8
8
|
//! 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
9
|
-
import * as JsvFragShaderView from "./JsvFragShaderView.vue";
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
_JsvFragShaderView = JsvFragShaderView.default;
|
|
14
|
-
} else {
|
|
15
|
-
const BrowserJsvFragShaderView = await import("./BrowserJsvFragShaderView.vue");
|
|
16
|
-
_JsvFragShaderView = BrowserJsvFragShaderView.default;
|
|
17
|
-
}
|
|
18
|
-
export default _JsvFragShaderView;
|
|
10
|
+
export { default } from "./JsvFragShaderView.vue"
|
|
11
|
+
|
|
@@ -24,6 +24,14 @@ class StatePackBuilder {
|
|
|
24
24
|
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.RemoveByGroup(group));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/*
|
|
28
|
+
* removeConditionByGroup
|
|
29
|
+
* 清理指定名字的condition
|
|
30
|
+
*/
|
|
31
|
+
removeConditionByName(specName: String) {
|
|
32
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.RemoveByName(specName));
|
|
33
|
+
}
|
|
34
|
+
|
|
27
35
|
/**
|
|
28
36
|
* activeCondition
|
|
29
37
|
* 重新激活对应gid或者specName的condition
|
|
@@ -24,7 +24,7 @@ export class EditViewOperator {
|
|
|
24
24
|
private _EditViewHandle: any = null;
|
|
25
25
|
private _CursorHandle: CursorOperater | null = null;
|
|
26
26
|
private _EditViewId: number = -1;
|
|
27
|
-
private _CursorResumeTimeoutToken:
|
|
27
|
+
private _CursorResumeTimeoutToken: any = -1;
|
|
28
28
|
|
|
29
29
|
private _InputType: number = 0;
|
|
30
30
|
private _FontStyle: FontStyleDefine | null = null
|
|
@@ -41,6 +41,8 @@ export class EditViewOperator {
|
|
|
41
41
|
|
|
42
42
|
private _EditVisibleArea?: EditVisibleArea;
|
|
43
43
|
|
|
44
|
+
private _TextChangedCount: number = 0; // 记录文字变化的次数,可用于确认文字是否变化,当style变化或者文字内容变化时+1
|
|
45
|
+
|
|
44
46
|
// Callback
|
|
45
47
|
private _OnTextChangedCallback: TextChangedFunc;
|
|
46
48
|
private _OnCursorMoved: CursorMovedFunc;
|
|
@@ -68,7 +70,9 @@ export class EditViewOperator {
|
|
|
68
70
|
this._EditViewHandle.showIme(
|
|
69
71
|
this._InputType,
|
|
70
72
|
this._CurrentFullText,
|
|
71
|
-
this._CurrentCursorOffset
|
|
73
|
+
this._CurrentCursorOffset,
|
|
74
|
+
Math.ceil(-this._TextLeft),
|
|
75
|
+
0
|
|
72
76
|
);
|
|
73
77
|
}
|
|
74
78
|
}
|
|
@@ -88,7 +92,9 @@ export class EditViewOperator {
|
|
|
88
92
|
this._EditViewHandle.showIme(
|
|
89
93
|
this._InputType,
|
|
90
94
|
this._CurrentFullText,
|
|
91
|
-
this._CurrentCursorOffset
|
|
95
|
+
this._CurrentCursorOffset,
|
|
96
|
+
Math.ceil(-this._TextLeft),
|
|
97
|
+
0
|
|
92
98
|
);
|
|
93
99
|
}
|
|
94
100
|
|
|
@@ -96,8 +102,12 @@ export class EditViewOperator {
|
|
|
96
102
|
box_width: number, box_height: number,
|
|
97
103
|
cursor_width: number,
|
|
98
104
|
font_style: FontStyleDefine,
|
|
99
|
-
input_type: number,
|
|
100
|
-
|
|
105
|
+
input_type: number,
|
|
106
|
+
max_input_lenth: number,
|
|
107
|
+
text_read_only: boolean,
|
|
108
|
+
editorTextColor: string,
|
|
109
|
+
editorBackground: string
|
|
110
|
+
) {
|
|
101
111
|
|
|
102
112
|
// format fontStyle
|
|
103
113
|
this._FontStyle = {
|
|
@@ -118,13 +128,23 @@ export class EditViewOperator {
|
|
|
118
128
|
font_style,
|
|
119
129
|
font_style.textAlign === "right"
|
|
120
130
|
);
|
|
131
|
+
|
|
132
|
+
this._EditViewHandle.setEditorStyle(
|
|
133
|
+
this._FontStyle.fontSize,
|
|
134
|
+
this._FontStyle.textAlign,
|
|
135
|
+
editorTextColor,
|
|
136
|
+
editorBackground
|
|
137
|
+
)
|
|
121
138
|
}
|
|
122
139
|
|
|
123
140
|
generateView(): number {
|
|
124
141
|
// 构建EditControlView来处理输入
|
|
125
142
|
this._EditViewHandle = new Forge.EditControlView();
|
|
126
|
-
this._EditViewHandle.
|
|
127
|
-
|
|
143
|
+
this._EditViewHandle.addImeEventListener({
|
|
144
|
+
OnTextChanged: this._OnTextChanged.bind(this),
|
|
145
|
+
OnStatusChanged: this._OnStatusChanged.bind(this),
|
|
146
|
+
OnEditAction: null
|
|
147
|
+
});
|
|
128
148
|
|
|
129
149
|
this._EditViewId = Forge.sViewStore.add(
|
|
130
150
|
new Forge.ViewInfo(this._EditViewHandle)
|
|
@@ -163,7 +183,8 @@ export class EditViewOperator {
|
|
|
163
183
|
this._CurrentDspWith,
|
|
164
184
|
this._CurrentDspWith,
|
|
165
185
|
new_cursor_index,
|
|
166
|
-
true
|
|
186
|
+
true,
|
|
187
|
+
this._TextChangedCount
|
|
167
188
|
);
|
|
168
189
|
this._UpdateDispay(new_text_left, new_cursor_index)
|
|
169
190
|
}
|
|
@@ -181,6 +202,8 @@ export class EditViewOperator {
|
|
|
181
202
|
}
|
|
182
203
|
|
|
183
204
|
onUnmounted() {
|
|
205
|
+
this._EditViewHandle?.releaseResource();
|
|
206
|
+
this._EditVisibleArea!.releaseResource();
|
|
184
207
|
if (this._EditViewId != -1) {
|
|
185
208
|
Forge.sViewStore.remove(this._EditViewId);
|
|
186
209
|
this._EditViewId = -1;
|
|
@@ -208,13 +231,20 @@ export class EditViewOperator {
|
|
|
208
231
|
}
|
|
209
232
|
|
|
210
233
|
// EditControlView当输入变化时的回调
|
|
211
|
-
private _OnTextChanged(text: string, cursor_index: number) {
|
|
234
|
+
private _OnTextChanged(text: string, cursor_index: number, scroll_left?: number) {
|
|
235
|
+
let p = {
|
|
236
|
+
text,
|
|
237
|
+
cursor_index,
|
|
238
|
+
scroll_left
|
|
239
|
+
}
|
|
212
240
|
if (typeof text != 'string' || text.length >= this._MaxInputLenth) {
|
|
213
241
|
// 非法输入或者输入限制,超输入限制,文字内容不改变
|
|
214
242
|
if (this._EditViewHandle && this._IsFocus) {
|
|
215
243
|
this._EditViewHandle.updateCursorOffset(
|
|
216
244
|
this._CurrentDspText,
|
|
217
|
-
this._CurrentCursorOffset
|
|
245
|
+
this._CurrentCursorOffset,
|
|
246
|
+
Math.ceil(-this._TextLeft),
|
|
247
|
+
0
|
|
218
248
|
);
|
|
219
249
|
}
|
|
220
250
|
return;
|
|
@@ -231,7 +261,9 @@ export class EditViewOperator {
|
|
|
231
261
|
// 输入内容非法,不更换内容
|
|
232
262
|
this._EditViewHandle!.updateCursorOffset(
|
|
233
263
|
this._CurrentDspText,
|
|
234
|
-
this._CurrentCursorOffset
|
|
264
|
+
this._CurrentCursorOffset,
|
|
265
|
+
Math.ceil(-this._TextLeft),
|
|
266
|
+
0
|
|
235
267
|
);
|
|
236
268
|
return;
|
|
237
269
|
}
|
|
@@ -251,6 +283,7 @@ export class EditViewOperator {
|
|
|
251
283
|
this._CurrentDspText = text;
|
|
252
284
|
}
|
|
253
285
|
this._CurrentDspWith = getTextDisplayWidth(this._CurrentDspText, this._FontStyle!);
|
|
286
|
+
this._TextChangedCount++; // 记录文字信息发生了变化
|
|
254
287
|
} else {
|
|
255
288
|
// 仅由EditView发出来的光标移动事件
|
|
256
289
|
}
|
|
@@ -262,7 +295,8 @@ export class EditViewOperator {
|
|
|
262
295
|
origin_dsp_width,
|
|
263
296
|
this._CurrentDspWith,
|
|
264
297
|
cursor_index,
|
|
265
|
-
false
|
|
298
|
+
false,
|
|
299
|
+
this._TextChangedCount
|
|
266
300
|
);
|
|
267
301
|
|
|
268
302
|
this._UpdateDispay(new_text_left, cursor_index);
|
|
@@ -272,8 +306,7 @@ export class EditViewOperator {
|
|
|
272
306
|
}
|
|
273
307
|
}
|
|
274
308
|
|
|
275
|
-
private _OnStatusChanged() {
|
|
276
|
-
// console.log("OnStatusChanged status", status);
|
|
309
|
+
private _OnStatusChanged(visible: boolean) {
|
|
277
310
|
}
|
|
278
311
|
|
|
279
312
|
public addText(text: string) {
|
|
@@ -317,4 +350,4 @@ export class EditViewOperator {
|
|
|
317
350
|
// 全部内容替换
|
|
318
351
|
this._OnTextChanged(text, text?.length);
|
|
319
352
|
}
|
|
320
|
-
}
|
|
353
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { calculateCursorPosition } from "./SystemTextTools";
|
|
1
|
+
import { calculateCursorPosition, calculateCursorPositionCached, recycleCursorMeasureCache } from "./SystemTextTools";
|
|
2
2
|
import { FontStyleDefine, MAX_WIDTH } from "./SharedDefine";
|
|
3
3
|
|
|
4
4
|
export class EditVisibleArea {
|
|
@@ -13,6 +13,10 @@ export class EditVisibleArea {
|
|
|
13
13
|
private _TextVisibleEndPos: number = 0; // 显示区域的末尾是整段文字第几个像素上
|
|
14
14
|
private _VisibleAreaCurPos: number = 0; // 光标在整段文字的第几个像素上
|
|
15
15
|
|
|
16
|
+
// 管理Cursor measure的cache
|
|
17
|
+
private _CursorMeasureCachedId: number = 0;
|
|
18
|
+
private _CursorMeasuredToken: number = 0;
|
|
19
|
+
|
|
16
20
|
constructor(area_width: number, area_height: number,
|
|
17
21
|
cursor_width: number,
|
|
18
22
|
font_style: FontStyleDefine,
|
|
@@ -33,10 +37,17 @@ export class EditVisibleArea {
|
|
|
33
37
|
return this._VisibleAreaCurPos;
|
|
34
38
|
}
|
|
35
39
|
|
|
40
|
+
releaseResource() {
|
|
41
|
+
if (this._CursorMeasureCachedId > 0) {
|
|
42
|
+
recycleCursorMeasureCache(this._CursorMeasureCachedId);
|
|
43
|
+
this._CursorMeasureCachedId = 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
36
47
|
calculateSlide(
|
|
37
48
|
pre_str: string, target_str: string,
|
|
38
49
|
pre_str_dsp_width: number, target_str_dsp_width: number, // 使用外部缓存,减少本地计算
|
|
39
|
-
cur_index: number, moved: boolean): number {
|
|
50
|
+
cur_index: number, moved: boolean, text_info_token: number): number {
|
|
40
51
|
if (target_str.length === 0) {
|
|
41
52
|
// 当字符内容清空的场景
|
|
42
53
|
this._VisibleAreaCurPos = 0;
|
|
@@ -45,14 +56,36 @@ export class EditVisibleArea {
|
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
let new_left = this._TextLeft;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
target_str_dsp_width
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
|
|
59
|
+
let current_cursor_position = 0;
|
|
60
|
+
if (cur_index == target_str.length) {
|
|
61
|
+
// calculateCursorPosition 无法计算最后一个字的位置,所以在此支持返回文字的边缘
|
|
62
|
+
current_cursor_position = target_str_dsp_width;
|
|
63
|
+
} else {
|
|
64
|
+
// 使用 calculateCursorPosition 获得光标显示位置
|
|
65
|
+
if (this._CursorMeasuredToken == text_info_token && this._CursorMeasureCachedId > 0) {
|
|
66
|
+
current_cursor_position = calculateCursorPositionCached(
|
|
67
|
+
cur_index,
|
|
68
|
+
this._CursorMeasureCachedId
|
|
69
|
+
)
|
|
70
|
+
} else {
|
|
71
|
+
if (this._CursorMeasureCachedId > 0) {
|
|
72
|
+
recycleCursorMeasureCache(this._CursorMeasureCachedId);
|
|
73
|
+
this._CursorMeasureCachedId = 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
let measure_result = calculateCursorPosition(
|
|
77
|
+
target_str,
|
|
78
|
+
cur_index,
|
|
79
|
+
target_str_dsp_width,
|
|
80
|
+
this._AreaHeight,
|
|
81
|
+
this._AreaHeight,
|
|
82
|
+
this._FontStyle
|
|
83
|
+
);
|
|
84
|
+
current_cursor_position = measure_result.x;
|
|
85
|
+
this._CursorMeasureCachedId = measure_result.cachedId; // 注意cached资源需要手动释放
|
|
86
|
+
this._CursorMeasuredToken = text_info_token; // 记录此token的数据已经有measure cache
|
|
87
|
+
}
|
|
88
|
+
}
|
|
56
89
|
let option_mode = "op_vis_normal"; // 可视区域内移动
|
|
57
90
|
// 计算模式
|
|
58
91
|
if (pre_str.length > target_str.length) {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* type Input.type.TEXT 若为number类型,则输入时,非number无法输入
|
|
11
11
|
* placeholder {string} 文字颜色值为灰色,默认值为"请输入文字"
|
|
12
12
|
* placeholderColor {string} 默认文字颜色,默认值为灰色
|
|
13
|
+
* editorBackground {string} 当ime出现时,输入框呈现的强调颜色,注意:不能为半透明色
|
|
13
14
|
* maxLength {number} 最大字符长度, 默认100,支持单行最大宽度为1920*2,
|
|
14
15
|
* fontsize为30,则字数大约为1920*2/30 = 100个左右
|
|
15
16
|
* readonly {bool} 属性规定输入字段是只读的, 默认false
|
|
@@ -89,6 +90,10 @@ const rProps = defineProps({
|
|
|
89
90
|
type: String,
|
|
90
91
|
default: "#CDCCD6",
|
|
91
92
|
},
|
|
93
|
+
editorBackground: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: "#5d5c76",
|
|
96
|
+
},
|
|
92
97
|
maxLength: {
|
|
93
98
|
type: Number,
|
|
94
99
|
default: 100,
|
|
@@ -155,12 +160,6 @@ function _OnTextChanged(input_final_text, dsp_text) {
|
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
function _OnCursorPositionChanged(text_left, cursor_left) {
|
|
158
|
-
console.log(
|
|
159
|
-
"_OnCursorPositionChanged text_left=" +
|
|
160
|
-
text_left +
|
|
161
|
-
" cursor_left=" +
|
|
162
|
-
cursor_left
|
|
163
|
-
);
|
|
164
163
|
rTextPosLeft.value = text_left;
|
|
165
164
|
rCursorLeft.value = cursor_left + text_left;
|
|
166
165
|
}
|
|
@@ -172,6 +171,7 @@ let cEditViewOperator = new EditViewOperator(
|
|
|
172
171
|
rProps.onTextOverflow
|
|
173
172
|
);
|
|
174
173
|
let vEditViewInnerId = cEditViewOperator.generateView(); // 建立Forge.EditView
|
|
174
|
+
|
|
175
175
|
cEditViewOperator.updateInputConfig(
|
|
176
176
|
rProps.width,
|
|
177
177
|
rProps.height,
|
|
@@ -179,7 +179,9 @@ cEditViewOperator.updateInputConfig(
|
|
|
179
179
|
rProps.fontStyle,
|
|
180
180
|
rProps.type,
|
|
181
181
|
rProps.maxLength,
|
|
182
|
-
rProps.readonly
|
|
182
|
+
rProps.readonly,
|
|
183
|
+
rProps.fontStyle.color,
|
|
184
|
+
rProps.editorBackground
|
|
183
185
|
);
|
|
184
186
|
|
|
185
187
|
function _FocusBlockOnFocus() {
|
|
@@ -252,7 +254,7 @@ function _FocusBlockOnKeyDown(keyEvent) {
|
|
|
252
254
|
}
|
|
253
255
|
|
|
254
256
|
function _FocusBlockOnKeyUp(ev) {
|
|
255
|
-
if (
|
|
257
|
+
if (ev.keyCode == 10000) {
|
|
256
258
|
return !!rProps.onBackKey?.(true);
|
|
257
259
|
}
|
|
258
260
|
|
|
@@ -354,6 +356,17 @@ defineExpose({
|
|
|
354
356
|
:color="rCursorColorInner"
|
|
355
357
|
:width="rProps.cursorWidth"
|
|
356
358
|
/>
|
|
357
|
-
<div
|
|
359
|
+
<div
|
|
360
|
+
:style="{
|
|
361
|
+
width: rProps.width,
|
|
362
|
+
height: rProps.height,
|
|
363
|
+
}"
|
|
364
|
+
:data-jsv-vw-innerview="vEditViewInnerId"
|
|
365
|
+
/>
|
|
358
366
|
</jsv-focus-block>
|
|
359
367
|
</template>
|
|
368
|
+
<style scoped>
|
|
369
|
+
.testColor {
|
|
370
|
+
background-color: #5d5c76;
|
|
371
|
+
}
|
|
372
|
+
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
TextTools
|
|
3
|
+
} from "../../JsViewVueTools/JsvTextTools"
|
|
3
4
|
|
|
4
5
|
declare interface FontStyleDefine {
|
|
5
6
|
fontSize: number,
|
|
@@ -9,6 +10,11 @@ declare interface FontStyleDefine {
|
|
|
9
10
|
fontWeight: string
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
export interface CursorResult {
|
|
14
|
+
x: number,
|
|
15
|
+
cachedId: number
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
// 获取单行输入框光标所在位置
|
|
13
19
|
export function calculateCursorPosition(
|
|
14
20
|
display_text: string,
|
|
@@ -16,32 +22,40 @@ export function calculateCursorPosition(
|
|
|
16
22
|
rect_width: number,
|
|
17
23
|
rect_height: number,
|
|
18
24
|
line_height: number,
|
|
19
|
-
font_style: FontStyleDefine) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
font_style: FontStyleDefine): CursorResult {
|
|
26
|
+
|
|
27
|
+
let css_font_style = {
|
|
28
|
+
fontFamily: font_style.fontFamily,
|
|
29
|
+
fontSize: font_style.fontSize,
|
|
30
|
+
fontStyle: font_style.fontStyle,
|
|
31
|
+
fontWeight: font_style.fontWeight
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
let css_textlayout_style = {
|
|
35
|
+
width: rect_width,
|
|
36
|
+
height: rect_height,
|
|
37
|
+
lineHeight: line_height,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
let cursor_info = TextTools.getCursorPosition(cursor_offset, display_text, css_font_style, css_textlayout_style, true);
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
x: cursor_info.x,
|
|
44
|
+
cachedId: cursor_info.cachedId
|
|
45
|
+
}
|
|
34
46
|
}
|
|
35
47
|
|
|
36
|
-
export function
|
|
37
|
-
|
|
48
|
+
export function calculateCursorPositionCached(
|
|
49
|
+
cursor_offset: number,
|
|
50
|
+
cached_id: number): number {
|
|
51
|
+
let cursor_info = TextTools.getCursorPositionCached(cached_id, cursor_offset);
|
|
52
|
+
return cursor_info.x;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function recycleCursorMeasureCache(cached_id: any) {
|
|
56
|
+
TextTools.recycleCursorPositionCache(cached_id);
|
|
38
57
|
}
|
|
39
58
|
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const alignment = font_style.textAlign;
|
|
44
|
-
const italic = font_style.fontStyle === "italic";
|
|
45
|
-
const bold = font_style.fontWeight === "bold";
|
|
46
|
-
return TextTools.PackFontParams(font!, size, bold, italic, alignment!, null)
|
|
47
|
-
}
|
|
59
|
+
export function getTextDisplayWidth(text: string, font_style: FontStyleDefine) {
|
|
60
|
+
return TextTools.getTextWidth(text, font_style);
|
|
61
|
+
}
|