mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
fix(cockpit): keep the orbital view on a double-click at a ground point
In the orbital view a double-click on a mapped ground point went on to Cesium's own double-click, which tracks the picked entity and so ended the view. The Cockpit's double-click routing now takes it in orbit: it keeps or starts the focus on that point (a point beyond the reach is left unfocused but still not tracked). A double-click anywhere else, one a tool owns, and every one outside orbit go on to Cesium's as before, and stopping the Cockpit still hands Cesium's handler back.
This commit is contained in:
1 parent
dd063b0e83
commit
b18336d3d4
5 files changed
+116
-9
No files matched your search
@@ -29,6 +29,7 @@ import {
|
||||
} from './cockpitOrbitalView.js';
|
||||
import {
|
||||
onOrbitalClick,
|
||||
onOrbitalDoubleClick,
|
||||
routeSceneClick,
|
||||
toggleOrbitalFocus,
|
||||
} from './cockpitOrbitalFocus.js';
|
||||
@@ -445,6 +446,15 @@ export class CockpitViewController {
|
||||
onOrbitalClick(position) {
|
||||
return onOrbitalClick.call(this, position);
|
||||
}
|
||||
/**
|
||||
* A double-click on the orbital picture: on a mapped ground point it keeps
|
||||
* or starts the focus there instead of letting Cesium track the point.
|
||||
* @param {{x: number, y: number}|null|undefined} position
|
||||
* @returns {boolean} True when it was taken.
|
||||
*/
|
||||
onOrbitalDoubleClick(position) {
|
||||
return onOrbitalDoubleClick.call(this, position);
|
||||
}
|
||||
/**
|
||||
* FOCUS on the reach list: focus that point, switch to it, or end the
|
||||
* focus held on it.
|
||||
|
||||
Reference in new issue
Block a user