@jupytergis/jupytergis-lab 0.4.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +9 -58
- package/package.json +3 -3
- package/style/base.css +5 -0
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandIDs, ControlPanelModel, GlobalStateDbManager, LeftPanelWidget, RightPanelWidget, addCommands, createDefaultLayerRegistry, logoMiniIcon } from '@jupytergis/base';
|
|
1
|
+
import { CommandIDs, ControlPanelModel, GlobalStateDbManager, LeftPanelWidget, RightPanelWidget, addCommands, createDefaultLayerRegistry, rasterSubMenu, vectorSubMenu, logoMiniIcon } from '@jupytergis/base';
|
|
2
2
|
import { IAnnotationToken, IJGISFormSchemaRegistryToken, IJGISLayerBrowserRegistryToken, IJupyterGISDocTracker } from '@jupytergis/schema';
|
|
3
3
|
import { ILayoutRestorer } from '@jupyterlab/application';
|
|
4
4
|
import { ICompletionProviderManager } from '@jupyterlab/completer';
|
|
@@ -29,43 +29,6 @@ const plugin = {
|
|
|
29
29
|
const stateDbManager = GlobalStateDbManager.getInstance();
|
|
30
30
|
stateDbManager.initialize(state);
|
|
31
31
|
addCommands(app, tracker, translator, formSchemaRegistry, layerBrowserRegistry, state, completionProviderManager);
|
|
32
|
-
// SOURCES context menu
|
|
33
|
-
const newSourceSubMenu = new Menu({ commands: app.commands });
|
|
34
|
-
newSourceSubMenu.title.label = translator
|
|
35
|
-
.load('jupyterlab')
|
|
36
|
-
.__('Add Source');
|
|
37
|
-
newSourceSubMenu.id = 'jp-gis-contextmenu-addSource';
|
|
38
|
-
app.contextMenu.addItem({
|
|
39
|
-
type: 'submenu',
|
|
40
|
-
selector: '.jp-gis-sourcePanel',
|
|
41
|
-
rank: 3,
|
|
42
|
-
submenu: newSourceSubMenu
|
|
43
|
-
});
|
|
44
|
-
newSourceSubMenu.addItem({
|
|
45
|
-
command: CommandIDs.newRasterSource,
|
|
46
|
-
args: { from: 'contextMenu' }
|
|
47
|
-
});
|
|
48
|
-
newSourceSubMenu.addItem({
|
|
49
|
-
command: CommandIDs.newVectorSource,
|
|
50
|
-
args: { from: 'contextMenu' }
|
|
51
|
-
});
|
|
52
|
-
newSourceSubMenu.addItem({
|
|
53
|
-
command: CommandIDs.newGeoJSONSource,
|
|
54
|
-
args: { from: 'contextMenu' }
|
|
55
|
-
});
|
|
56
|
-
newSourceSubMenu.addItem({
|
|
57
|
-
command: CommandIDs.newRasterDemSource,
|
|
58
|
-
args: { from: 'contextMenu' }
|
|
59
|
-
});
|
|
60
|
-
newSourceSubMenu.addItem({
|
|
61
|
-
command: CommandIDs.newImageSource,
|
|
62
|
-
args: { from: 'contextMenu' }
|
|
63
|
-
});
|
|
64
|
-
app.contextMenu.addItem({
|
|
65
|
-
type: 'separator',
|
|
66
|
-
selector: '.jp-gis-sourcePanel',
|
|
67
|
-
rank: 2
|
|
68
|
-
});
|
|
69
32
|
app.contextMenu.addItem({
|
|
70
33
|
selector: '.jp-gis-source.jp-gis-sourceUnused',
|
|
71
34
|
rank: 1,
|
|
@@ -166,32 +129,20 @@ const plugin = {
|
|
|
166
129
|
const newLayerSubMenu = new Menu({ commands: app.commands });
|
|
167
130
|
newLayerSubMenu.title.label = translator.load('jupyterlab').__('Add Layer');
|
|
168
131
|
newLayerSubMenu.id = 'jp-gis-contextmenu-addLayer';
|
|
132
|
+
newLayerSubMenu.addItem({
|
|
133
|
+
type: 'submenu',
|
|
134
|
+
submenu: rasterSubMenu(app.commands)
|
|
135
|
+
});
|
|
136
|
+
newLayerSubMenu.addItem({
|
|
137
|
+
type: 'submenu',
|
|
138
|
+
submenu: vectorSubMenu(app.commands)
|
|
139
|
+
});
|
|
169
140
|
app.contextMenu.addItem({
|
|
170
141
|
type: 'submenu',
|
|
171
142
|
selector: '.jp-gis-layerPanel',
|
|
172
143
|
rank: 3,
|
|
173
144
|
submenu: newLayerSubMenu
|
|
174
145
|
});
|
|
175
|
-
newLayerSubMenu.addItem({
|
|
176
|
-
command: CommandIDs.newRasterLayer,
|
|
177
|
-
args: { from: 'contextMenu' }
|
|
178
|
-
});
|
|
179
|
-
newLayerSubMenu.addItem({
|
|
180
|
-
command: CommandIDs.newVectorLayer,
|
|
181
|
-
args: { from: 'contextMenu' }
|
|
182
|
-
});
|
|
183
|
-
newLayerSubMenu.addItem({
|
|
184
|
-
command: CommandIDs.newHillshadeLayer,
|
|
185
|
-
args: { from: 'contextMenu' }
|
|
186
|
-
});
|
|
187
|
-
newLayerSubMenu.addItem({
|
|
188
|
-
command: CommandIDs.newImageLayer,
|
|
189
|
-
args: { from: 'contextMenu' }
|
|
190
|
-
});
|
|
191
|
-
newLayerSubMenu.addItem({
|
|
192
|
-
command: CommandIDs.newHeatmapLayer,
|
|
193
|
-
args: { from: 'contextMenu' }
|
|
194
|
-
});
|
|
195
146
|
if (mainMenu) {
|
|
196
147
|
populateMenus(mainMenu, isEnabled);
|
|
197
148
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/jupytergis-lab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "JupyterGIS Lab extension.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@jupyter/collaborative-drive": "^3.0.0",
|
|
56
|
-
"@jupytergis/base": "^0.
|
|
57
|
-
"@jupytergis/schema": "^0.
|
|
56
|
+
"@jupytergis/base": "^0.5.0",
|
|
57
|
+
"@jupytergis/schema": "^0.5.0",
|
|
58
58
|
"@jupyterlab/application": "^4.3.0",
|
|
59
59
|
"@jupyterlab/apputils": "^4.3.0",
|
|
60
60
|
"@jupyterlab/completer": "^4.3.0",
|
package/style/base.css
CHANGED
|
@@ -373,6 +373,11 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
373
373
|
z-index: 20;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
.jGIS-Remote-Pointer-Icon {
|
|
377
|
+
filter: drop-shadow(-1px 0px white) drop-shadow(1px 0px white)
|
|
378
|
+
drop-shadow(0px -1px white) drop-shadow(0px 1px white)
|
|
379
|
+
drop-shadow(0px 0px 1px black);
|
|
380
|
+
}
|
|
376
381
|
.jGIS-Remote-Pointer-Icon:hover {
|
|
377
382
|
scale: 1.3;
|
|
378
383
|
}
|