Skip to content

Commit

Permalink
fix(components): 🐛 vc-navigation-sm
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tanghuang-liu committed Dec 27, 2023
1 parent f375892 commit 2170235
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
26 changes: 13 additions & 13 deletions packages/components/controls/navigation-sm/compass-sm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions packages/components/controls/navigation-sm/use-compass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2170235

Please sign in to comment.