@@ -3,22 +3,24 @@ import { customElement, property, state } from 'lit/decorators.js';
3
3
import { html } from 'lit' ;
4
4
import draggable from './draggable' ;
5
5
import { DEFAULT_VIEW } from '../constants' ;
6
- import { ConstantPositionProperty , Event , Scene , Viewer } from 'cesium' ;
7
6
import {
8
7
ArcType ,
9
8
CallbackProperty ,
10
9
Cartesian3 ,
11
10
Cartographic ,
12
11
Color ,
12
+ ConstantPositionProperty ,
13
13
CustomDataSource ,
14
14
Entity ,
15
+ Event ,
15
16
JulianDate ,
16
17
KeyboardEventModifier ,
17
18
Matrix4 ,
18
19
PolylineCollection ,
19
- Transforms ,
20
+ Scene ,
20
21
ScreenSpaceEventHandler ,
21
22
ScreenSpaceEventType ,
23
+ Viewer ,
22
24
} from 'cesium' ;
23
25
import type { Interactable } from '@interactjs/types' ;
24
26
import { classMap } from 'lit/directives/class-map.js' ;
@@ -265,22 +267,17 @@ export class NgmNavTools extends LitElementI18n {
265
267
showSnackbarError ( i18next . t ( 'nav_tools_out_glob_warn' ) ) ;
266
268
return ;
267
269
}
268
- this . addTargetPoint ( position , true ) ;
270
+ this . addTargetPoint ( position ) ;
269
271
}
270
272
syncTargetParam ( position && Cartographic . fromCartesian ( position ) ) ;
271
273
NavToolsStore . setTargetPointPosition ( position ) ;
272
274
this . toggleAxis ( position ) ;
273
275
}
274
276
275
- addTargetPoint ( center : Cartesian3 , lookAtTransform = false ) {
277
+ addTargetPoint ( center : Cartesian3 ) {
276
278
this . showTargetPoint = true ;
277
279
this . refIcon . position = new ConstantPositionProperty ( center ) ;
278
- const cam = this . viewer ! . camera ;
279
280
this . refIcon . show = true ;
280
- if ( lookAtTransform ) {
281
- const transform = Transforms . eastNorthUpToFixedFrame ( center ) ;
282
- cam . lookAtTransform ( transform ) ;
283
- }
284
281
document . addEventListener ( 'keydown' , this . ctrlListener ) ;
285
282
}
286
283
@@ -325,8 +322,6 @@ export class NgmNavTools extends LitElementI18n {
325
322
this . addTargetPoint ( center ) ;
326
323
const camera = this . viewer ! . camera ;
327
324
lookAtPoint ( center , camera ) ;
328
- const transform = Transforms . eastNorthUpToFixedFrame ( center ) ;
329
- camera . lookAtTransform ( transform ) ;
330
325
this . toggleAxis ( center ) ;
331
326
332
327
this . viewer ! . scene . screenSpaceCameraController . enableInputs = true ;
@@ -445,17 +440,21 @@ export class NgmNavTools extends LitElementI18n {
445
440
} ) } "
446
441
@click =${ ( ) => this . dispatchEvent ( new CustomEvent ( 'togglecamconfig' ) ) }
447
442
> </ div >
448
- < div
449
- title ="${ i18next . t ( 'nav_target_point' ) } "
450
- class ="ngm-coords-icon ${ classMap ( {
451
- 'ngm-active-icon' : this . showTargetPoint ,
452
- 'ngm-disabled' :
453
- this . lockType !== '' && this . lockType !== 'elevation' ,
454
- } ) } "
455
- @click =${ ( ) => this . toggleReference ( ) }
456
- > </ div >
457
443
</ div >
458
444
${ dragArea }
459
445
` ;
460
446
}
447
+
448
+ // TODO Fix the target point tool and then add this icon back to the toolbar.
449
+ /*
450
+ <div
451
+ title="${i18next.t('nav_target_point')}"
452
+ class="ngm-coords-icon ${classMap({
453
+ 'ngm-active-icon': this.showTargetPoint,
454
+ 'ngm-disabled':
455
+ this.lockType !== '' && this.lockType !== 'elevation',
456
+ })}"
457
+ @click =${() => this.toggleReference()}
458
+ ></div>
459
+ */
461
460
}
0 commit comments