mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Read the followed target, not trackedEntity, in the follow readers
The tracked card, screen annotations, north-up, share links and Cockpit ask data/followed.js what the camera follows, so they work the same when a layer follows through the camera port. followed.js gains entityFollowTarget (a FollowTarget whose presentation reads the drawn entity's record), resumeFollowing and followedPosition.
This commit is contained in:
1 parent
7eec2f828c
commit
99f9a701d9
16 files changed
+215
-84
No files matched your search
@@ -1,4 +1,5 @@
|
||||
/** Route Cockpit keys while preserving the active disclosure and form-control owner. */
|
||||
import { followedOf } from '../data/followed.js';
|
||||
|
||||
export function onKeyDown(event) {
|
||||
if (this.destroyed) return false;
|
||||
@@ -49,7 +50,7 @@ export function onKeyDown(event) {
|
||||
if (key === 'c' && !event.metaKey && !event.ctrlKey && !event.altKey) {
|
||||
if (!this.active) {
|
||||
const cockpitAttempt = !!(
|
||||
this.readAircraftInfo() && this.viewer.trackedEntity?.position
|
||||
this.readAircraftInfo() && followedOf(this.viewer)?.entity?.position
|
||||
);
|
||||
if (!cockpitAttempt) return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user