@jupytergis/jupytergis-lab 0.13.0 → 0.13.2
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 +13 -12
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -23,6 +23,7 @@ const plugin = {
|
|
|
23
23
|
return (tracker.currentWidget !== null &&
|
|
24
24
|
tracker.currentWidget === app.shell.currentWidget);
|
|
25
25
|
};
|
|
26
|
+
const LAYER = '.jp-gis-layerItem:not(.jp-gis-layerGroup)';
|
|
26
27
|
createDefaultLayerRegistry(layerBrowserRegistry);
|
|
27
28
|
const stateDbManager = GlobalStateDbManager.getInstance();
|
|
28
29
|
stateDbManager.initialize(state);
|
|
@@ -40,28 +41,28 @@ const plugin = {
|
|
|
40
41
|
// LAYERS and LAYER GROUPS context menu
|
|
41
42
|
app.contextMenu.addItem({
|
|
42
43
|
command: CommandIDs.symbology,
|
|
43
|
-
selector:
|
|
44
|
+
selector: LAYER,
|
|
44
45
|
rank: 1,
|
|
45
46
|
});
|
|
46
47
|
// Separator
|
|
47
48
|
app.contextMenu.addItem({
|
|
48
49
|
type: 'separator',
|
|
49
|
-
selector:
|
|
50
|
+
selector: LAYER,
|
|
50
51
|
rank: 1,
|
|
51
52
|
});
|
|
52
53
|
app.contextMenu.addItem({
|
|
53
|
-
command: CommandIDs.
|
|
54
|
-
selector:
|
|
54
|
+
command: CommandIDs.removeSelected,
|
|
55
|
+
selector: LAYER,
|
|
55
56
|
rank: 2,
|
|
56
57
|
});
|
|
57
58
|
app.contextMenu.addItem({
|
|
58
|
-
command: CommandIDs.
|
|
59
|
-
selector:
|
|
59
|
+
command: CommandIDs.renameSelected,
|
|
60
|
+
selector: LAYER,
|
|
60
61
|
rank: 2,
|
|
61
62
|
});
|
|
62
63
|
app.contextMenu.addItem({
|
|
63
64
|
command: CommandIDs.zoomToLayer,
|
|
64
|
-
selector:
|
|
65
|
+
selector: LAYER,
|
|
65
66
|
rank: 2,
|
|
66
67
|
});
|
|
67
68
|
// Create the Download submenu
|
|
@@ -74,7 +75,7 @@ const plugin = {
|
|
|
74
75
|
// Add the Download submenu to the context menu
|
|
75
76
|
app.contextMenu.addItem({
|
|
76
77
|
type: 'submenu',
|
|
77
|
-
selector:
|
|
78
|
+
selector: LAYER,
|
|
78
79
|
rank: 2,
|
|
79
80
|
submenu: downloadSubmenu,
|
|
80
81
|
});
|
|
@@ -91,7 +92,7 @@ const plugin = {
|
|
|
91
92
|
}
|
|
92
93
|
app.contextMenu.addItem({
|
|
93
94
|
type: 'submenu',
|
|
94
|
-
selector:
|
|
95
|
+
selector: LAYER,
|
|
95
96
|
rank: 2,
|
|
96
97
|
submenu: processingSubmenu,
|
|
97
98
|
});
|
|
@@ -102,18 +103,18 @@ const plugin = {
|
|
|
102
103
|
moveLayerSubmenu.id = 'jp-gis-contextmenu-movelayer';
|
|
103
104
|
app.contextMenu.addItem({
|
|
104
105
|
type: 'submenu',
|
|
105
|
-
selector:
|
|
106
|
+
selector: LAYER,
|
|
106
107
|
rank: 2,
|
|
107
108
|
submenu: moveLayerSubmenu,
|
|
108
109
|
});
|
|
109
110
|
app.contextMenu.opened.connect(() => buildGroupsMenu(app.contextMenu, tracker));
|
|
110
111
|
app.contextMenu.addItem({
|
|
111
|
-
command: CommandIDs.
|
|
112
|
+
command: CommandIDs.removeSelected,
|
|
112
113
|
selector: '.jp-gis-layerGroupHeader',
|
|
113
114
|
rank: 2,
|
|
114
115
|
});
|
|
115
116
|
app.contextMenu.addItem({
|
|
116
|
-
command: CommandIDs.
|
|
117
|
+
command: CommandIDs.renameSelected,
|
|
117
118
|
selector: '.jp-gis-layerGroupHeader',
|
|
118
119
|
rank: 2,
|
|
119
120
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/jupytergis-lab",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
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": "^4.1.2",
|
|
56
|
-
"@jupytergis/base": "^0.13.
|
|
57
|
-
"@jupytergis/schema": "^0.13.
|
|
56
|
+
"@jupytergis/base": "^0.13.2",
|
|
57
|
+
"@jupytergis/schema": "^0.13.2",
|
|
58
58
|
"@jupyterlab/application": "^4.3.0",
|
|
59
59
|
"@jupyterlab/apputils": "^4.3.0",
|
|
60
60
|
"@jupyterlab/completer": "^4.3.0",
|