|
|
|
@ -144,7 +144,6 @@ export class Wayline { |
|
|
|
|
|
|
|
const scene = viewer.scene |
|
|
|
handler.setInputAction((click: ScreenSpaceEventHandler.PositionedEvent) => { |
|
|
|
if (store.waylineMode === 'preview') return |
|
|
|
const object = scene.pick(click.position) |
|
|
|
if (object && object.id) { |
|
|
|
// 检查是否点击了高度调整按钮
|
|
|
|
@ -163,7 +162,6 @@ export class Wayline { |
|
|
|
}, ScreenSpaceEventType.LEFT_DOWN) |
|
|
|
|
|
|
|
handler.setInputAction((click: ScreenSpaceEventHandler.PositionedEvent) => { |
|
|
|
if (store.waylineMode === 'preview') return |
|
|
|
const object = scene.pick(click.position) |
|
|
|
if (object && object.id && (object.id as any).wayPoint && (object.id as any).wayPoint.selected) { |
|
|
|
isLifting = true |
|
|
|
@ -190,10 +188,6 @@ export class Wayline { |
|
|
|
}, ScreenSpaceEventType.LEFT_UP, KeyboardEventModifier.ALT) |
|
|
|
|
|
|
|
handler.setInputAction((movement: ScreenSpaceEventHandler.MotionEvent) => { |
|
|
|
if (store.waylineMode === 'preview') { |
|
|
|
scene.canvas.style.cursor = 'default' |
|
|
|
return |
|
|
|
} |
|
|
|
const object = scene.pick(movement.endPosition) |
|
|
|
if (object && object.id) { |
|
|
|
if ((object.id as any).heightAdjustButton) { |
|
|
|
@ -239,7 +233,6 @@ export class Wayline { |
|
|
|
}, ScreenSpaceEventType.MOUSE_MOVE) |
|
|
|
|
|
|
|
handler.setInputAction((movement: ScreenSpaceEventHandler.MotionEvent) => { |
|
|
|
if (store.waylineMode === 'preview') return |
|
|
|
if (isLifting && draggingWayPoint) { |
|
|
|
const lngLat = Cartographic.fromCartesian(draggingWayPoint.position) |
|
|
|
|
|
|
|
@ -274,7 +267,6 @@ export class Wayline { |
|
|
|
|
|
|
|
window.addEventListener('keydown', (event: KeyboardEvent) => { |
|
|
|
if (event.code === 'Space') { |
|
|
|
if (store.waylineMode === 'preview') return |
|
|
|
const position = minimapViewer.camera.position.clone() |
|
|
|
this.createWayPoint(position) |
|
|
|
} |
|
|
|
|