@@ -12,8 +12,6 @@ import {
1212 Toolbar ,
1313 ToolbarButton ,
1414 addIcon ,
15- redoIcon ,
16- undoIcon ,
1715} from '@jupyterlab/ui-components' ;
1816import { CommandRegistry } from '@lumino/commands' ;
1917import { Widget } from '@lumino/widgets' ;
@@ -74,42 +72,12 @@ export class ToolbarWidget extends ReactiveToolbar {
7472 this . addClass ( 'jGIS-toolbar-widget' ) ;
7573
7674 if ( options . commands ) {
77- const undoButton = new CommandToolbarButton ( {
78- id : CommandIDs . undo ,
79- label : '' ,
80- icon : undoIcon ,
81- commands : options . commands ,
82- } ) ;
83-
84- this . addItem ( 'undo' , undoButton ) ;
85- undoButton . node . dataset . testid = 'undo-button' ;
86-
87- const redoButton = new CommandToolbarButton ( {
88- id : CommandIDs . redo ,
89- label : '' ,
90- icon : redoIcon ,
91- commands : options . commands ,
92- } ) ;
93- this . addItem ( 'redo' , redoButton ) ;
94-
95- this . addItem ( 'separator0' , new Separator ( ) ) ;
96-
97- const toggleConsoleButton = new CommandToolbarButton ( {
98- id : CommandIDs . toggleConsole ,
99- commands : options . commands ,
100- label : '' ,
101- icon : terminalToolbarIcon ,
102- } ) ;
103- this . addItem ( 'Toggle console' , toggleConsoleButton ) ;
104- toggleConsoleButton . node . dataset . testid = 'toggle-console-button' ;
105-
106- this . addItem ( 'separator1' , new Separator ( ) ) ;
107-
10875 const openLayersBrowserButton = new CommandToolbarButton ( {
10976 id : CommandIDs . openLayerBrowser ,
11077 label : '' ,
11178 commands : options . commands ,
11279 } ) ;
80+
11381 this . addItem ( 'openLayerBrowser' , openLayersBrowserButton ) ;
11482 openLayersBrowserButton . node . dataset . testid = 'open-layers-browser' ;
11583
@@ -138,17 +106,18 @@ export class ToolbarWidget extends ReactiveToolbar {
138106 NewSubMenu . open ( bbox . x , bbox . bottom ) ;
139107 } ,
140108 } ) ;
141- NewEntryButton . node . dataset . testid = 'new-entry-button' ;
142109
143110 this . addItem ( 'New' , NewEntryButton ) ;
111+ NewEntryButton . node . dataset . testid = 'new-entry-button' ;
144112
145- this . addItem ( 'separator2 ' , new Separator ( ) ) ;
113+ this . addItem ( 'separator1 ' , new Separator ( ) ) ;
146114
147115 const geolocationButton = new CommandToolbarButton ( {
148116 id : CommandIDs . getGeolocation ,
149117 commands : options . commands ,
150118 label : '' ,
151119 } ) ;
120+
152121 this . addItem ( 'Geolocation' , geolocationButton ) ;
153122 geolocationButton . node . dataset . testid = 'geolocation-button' ;
154123
@@ -166,6 +135,7 @@ export class ToolbarWidget extends ReactiveToolbar {
166135 label : '' ,
167136 commands : options . commands ,
168137 } ) ;
138+
169139 this . addItem ( 'temporalController' , temporalControllerButton ) ;
170140 temporalControllerButton . node . dataset . testid =
171141 'temporal-controller-button' ;
@@ -175,9 +145,21 @@ export class ToolbarWidget extends ReactiveToolbar {
175145 label : '' ,
176146 commands : options . commands ,
177147 } ) ;
148+
178149 this . addItem ( 'addMarker' , addMarkerButton ) ;
179150 addMarkerButton . node . dataset . testid = 'add-marker-controller-button' ;
180151
152+ this . addItem ( 'separator2' , new Separator ( ) ) ;
153+
154+ const toggleConsoleButton = new CommandToolbarButton ( {
155+ id : CommandIDs . toggleConsole ,
156+ commands : options . commands ,
157+ label : '' ,
158+ icon : terminalToolbarIcon ,
159+ } ) ;
160+ this . addItem ( 'Toggle console' , toggleConsoleButton ) ;
161+ toggleConsoleButton . node . dataset . testid = 'toggle-console-button' ;
162+
181163 this . addItem ( 'spacer' , ReactiveToolbar . createSpacerItem ( ) ) ;
182164
183165 // Users
0 commit comments