From d12d7beb4955dd781b7523da83a781ab4ed278d3 Mon Sep 17 00:00:00 2001 From: tanghuang-liu <916650458@qq.com> Date: Wed, 27 Dec 2023 10:29:14 +0800 Subject: [PATCH 1/4] docs(vue-cesium): :memo: updated readme.md --- README.md | 7 ++++--- README.zh.md | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d218f73b..5b68627e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@
@@ -75,6 +75,7 @@ the project will install all dependencies. With command ```bash +$ pnpm gen:version $ pnpm website-dev ``` diff --git a/README.zh.md b/README.zh.md index 032904d6..ba34c4e1 100644 --- a/README.zh.md +++ b/README.zh.md @@ -1,10 +1,10 @@
@@ -77,6 +77,7 @@ $ pnpm i 命令 ```bash +$ pnpm gen:version $ pnpm website-dev ``` From c457b21e950e2e2df727adb41f90df016d4ee09a Mon Sep 17 00:00:00 2001 From: zouyaoji <370681295@qq.com> Date: Wed, 27 Dec 2023 10:36:04 +0800 Subject: [PATCH 2/4] refactor(composables): :recycle: add handling logic for objects not picked up --- packages/composables/use-drawing/use-drawing-fab.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/composables/use-drawing/use-drawing-fab.ts b/packages/composables/use-drawing/use-drawing-fab.ts index 44ef85fb..12e8a630 100644 --- a/packages/composables/use-drawing/use-drawing-fab.ts +++ b/packages/composables/use-drawing/use-drawing-fab.ts @@ -1,10 +1,10 @@ /* * @Author: zouyaoji@https://github.com/zouyaoji * @Date: 2021-10-13 09:45:59 - * @LastEditTime: 2023-03-13 17:52:59 + * @LastEditTime: 2023-12-06 00:13:43 * @LastEditors: zouyaoji 370681295@qq.com * @Description: - * @FilePath: \vue-cesium@next\packages\composables\use-drawing\use-drawing-fab.ts + * @FilePath: \vue-cesium\packages\composables\use-drawing\use-drawing-fab.ts */ import { VcCollectionPrimitive } from '@vue-cesium/components/primitive-collections' import type { VcFabProps, VcFabRef } from '@vue-cesium/components/ui' @@ -169,6 +169,11 @@ export default function ( return Cartesian3.clone(position, result) } } + } else { + position = scene.pickPosition(windowPosition, cartesianScratch) + if (defined(position)) { + return Cartesian3.clone(position, result) + } } } if (defined(scene.globe)) { From 7a81836a48f3d8f74b2e1518cf9d6983634b3d13 Mon Sep 17 00:00:00 2001 From: zouyaoji <370681295@qq.com> Date: Wed, 27 Dec 2023 10:36:46 +0800 Subject: [PATCH 3/4] chore(shared): :hammer: updated --- packages/shared/extends/materials/MaterialExtend.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/shared/extends/materials/MaterialExtend.ts b/packages/shared/extends/materials/MaterialExtend.ts index d3a847c6..828c4067 100644 --- a/packages/shared/extends/materials/MaterialExtend.ts +++ b/packages/shared/extends/materials/MaterialExtend.ts @@ -3,7 +3,7 @@ * @Date: 2023-08-18 00:56:13 * @Description: Do not edit * @LastEditors: zouyaoji 370681295@qq.com - * @LastEditTime: 2023-10-31 22:33:58 + * @LastEditTime: 2023-12-06 15:54:24 * @FilePath: \vue-cesium\packages\shared\extends\materials\MaterialExtend.ts */ @@ -12,7 +12,6 @@ import { VcCircleWaveMaterial, VcLineFlowMaterial } from '@vue-cesium/shared/sha let isExtended = false export default class MaterialExtend { static extend(viewer: Cesium.Viewer) { - console.log('asdf', viewer) if (isExtended) { return } From 217023536cbf79b1f77bd1d72bdeb6491709ee35 Mon Sep 17 00:00:00 2001 From: tanghuang-liu <916650458@qq.com> Date: Wed, 27 Dec 2023 10:52:15 +0800 Subject: [PATCH 4/4] fix(components): :bug: vc-navigation-sm consecutive mouse clicks not taking effect in the `vc-navigation-sm` component. BREAKING CHANGE: Removed the functionality of double-clicking the outer dial to realign with the north direction. #488 --- CHANGELOG.en-US.md | 3 ++- CHANGELOG.zh-CN.md | 3 ++- .../controls/navigation-sm/compass-sm.ts | 26 +++++++++---------- .../controls/navigation-sm/use-compass.ts | 6 ++--- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index f911ce75..7e6304b2 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -2,12 +2,13 @@ ### 3.2.5 -_2023-12-23_ +_2023-12-27_ #### Bug fixes - The browser crash issue occurs when using `ref` or `reactive` to wrap the `hierarchy` prop in the `vc-graphics-polygon` component. - In native Cesium, there is an error when loading SuperMap iServer map services using `vc-provider-imagery-supermap`. + - Fixed the issue of consecutive mouse clicks not taking effect in the `vc-navigation-sm` component. **[Removed the functionality of double-clicking the outer dial to realign with the north direction]** ### 3.2.4 diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index c5a110a7..df02b99e 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -2,12 +2,13 @@ ### 3.2.5 -_2023-12-23_ +_2023-12-27_ #### Bug 修复 - `vc-graphics-polygon` 组件使用 ref、reactive 包裹 hierarchy 参数后浏览器崩溃问题。 - 原生 Cesium 下 `vc-provider-imagery-supermap`加载超图 iserver 的地图服务报错问题。 +- `vc-navigation-sm` 组件四个方向按钮连续点击不生效的问题。**【去掉了双击外圆盘回正北的功能】** ### 3.2.4 diff --git a/packages/components/controls/navigation-sm/compass-sm.ts b/packages/components/controls/navigation-sm/compass-sm.ts index dd5b82fe..333e6fda 100644 --- a/packages/components/controls/navigation-sm/compass-sm.ts +++ b/packages/components/controls/navigation-sm/compass-sm.ts @@ -189,18 +189,18 @@ export default defineComponent({ ref: outerRingRef, class: 'vc-compass-outer-ring-sm', style: outerRingStyle.value - }, - props.tooltip - ? h( - VcTooltip, - { - ref: compassState.tooltipRef, - ...props.tooltip, - onBeforeShow: compassState.onTooltipBeforeShow - }, - () => h('strong', {}, (props.tooltip as any).tip || t('vc.navigationSm.compass.outerTip')) - ) - : createCommentVNode('v-if') + } + // props.tooltip + // ? h( + // VcTooltip, + // { + // ref: compassState.tooltipRef, + // ...props.tooltip, + // onBeforeShow: compassState.onTooltipBeforeShow + // }, + // () => h('strong', {}, (props.tooltip as any).tip || t('vc.navigationSm.compass.outerTip')) + // ) + // : createCommentVNode('v-if') ) ) children.push( @@ -234,7 +234,7 @@ export default defineComponent({ ref: rootRef, class: 'vc-compass-sm ' + positionState.classes.value, style: rootStyle, - onDblclick: compassState.handleDoubleClick, + // onDblclick: compassState.handleDoubleClick, onMousedown: compassState.handleMouseDown, onMouseup: compassState.handleMouseUp, onTouchend: compassState.handleMouseUp, diff --git a/packages/components/controls/navigation-sm/use-compass.ts b/packages/components/controls/navigation-sm/use-compass.ts index b77f44ba..e6c1a1c0 100644 --- a/packages/components/controls/navigation-sm/use-compass.ts +++ b/packages/components/controls/navigation-sm/use-compass.ts @@ -220,9 +220,9 @@ export default function (props, { emit }, vcInstance: VcComponentInternalInstanc const scene = vcInstance.viewer.scene const sscc = scene.screenSpaceCameraController // do not orbit if it is disabled - if (scene.mode === SceneMode.MORPHING || !sscc.enableInputs) { - return - } + // if (scene.mode === SceneMode.MORPHING || !sscc.enableInputs) { + // return + // } switch (scene.mode) { case SceneMode.COLUMBUS_VIEW: