Skip to content

Commit 2170235

Browse files
committed
fix(components): 🐛 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
1 parent f375892 commit 2170235

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

CHANGELOG.en-US.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
### 3.2.5
44

5-
_2023-12-23_
5+
_2023-12-27_
66

77
#### Bug fixes
88

99
- The browser crash issue occurs when using `ref` or `reactive` to wrap the `hierarchy` prop in the `vc-graphics-polygon` component.
1010
- In native Cesium, there is an error when loading SuperMap iServer map services using `vc-provider-imagery-supermap`.
11+
- 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]**
1112

1213
### 3.2.4
1314

CHANGELOG.zh-CN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
### 3.2.5
44

5-
_2023-12-23_
5+
_2023-12-27_
66

77
#### Bug 修复
88

99
- `vc-graphics-polygon` 组件使用 ref、reactive 包裹 hierarchy 参数后浏览器崩溃问题。
1010
- 原生 Cesium 下 `vc-provider-imagery-supermap`加载超图 iserver 的地图服务报错问题。
11+
- `vc-navigation-sm` 组件四个方向按钮连续点击不生效的问题。**【去掉了双击外圆盘回正北的功能】**
1112

1213
### 3.2.4
1314

packages/components/controls/navigation-sm/compass-sm.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,18 @@ export default defineComponent({
189189
ref: outerRingRef,
190190
class: 'vc-compass-outer-ring-sm',
191191
style: outerRingStyle.value
192-
},
193-
props.tooltip
194-
? h(
195-
VcTooltip,
196-
{
197-
ref: compassState.tooltipRef,
198-
...props.tooltip,
199-
onBeforeShow: compassState.onTooltipBeforeShow
200-
},
201-
() => h('strong', {}, (props.tooltip as any).tip || t('vc.navigationSm.compass.outerTip'))
202-
)
203-
: createCommentVNode('v-if')
192+
}
193+
// props.tooltip
194+
// ? h(
195+
// VcTooltip,
196+
// {
197+
// ref: compassState.tooltipRef,
198+
// ...props.tooltip,
199+
// onBeforeShow: compassState.onTooltipBeforeShow
200+
// },
201+
// () => h('strong', {}, (props.tooltip as any).tip || t('vc.navigationSm.compass.outerTip'))
202+
// )
203+
// : createCommentVNode('v-if')
204204
)
205205
)
206206
children.push(
@@ -234,7 +234,7 @@ export default defineComponent({
234234
ref: rootRef,
235235
class: 'vc-compass-sm ' + positionState.classes.value,
236236
style: rootStyle,
237-
onDblclick: compassState.handleDoubleClick,
237+
// onDblclick: compassState.handleDoubleClick,
238238
onMousedown: compassState.handleMouseDown,
239239
onMouseup: compassState.handleMouseUp,
240240
onTouchend: compassState.handleMouseUp,

packages/components/controls/navigation-sm/use-compass.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ export default function (props, { emit }, vcInstance: VcComponentInternalInstanc
220220
const scene = vcInstance.viewer.scene
221221
const sscc = scene.screenSpaceCameraController
222222
// do not orbit if it is disabled
223-
if (scene.mode === SceneMode.MORPHING || !sscc.enableInputs) {
224-
return
225-
}
223+
// if (scene.mode === SceneMode.MORPHING || !sscc.enableInputs) {
224+
// return
225+
// }
226226

227227
switch (scene.mode) {
228228
case SceneMode.COLUMBUS_VIEW:

0 commit comments

Comments
 (0)