@jupytergis/jupytergis-lab 0.4.4 → 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 +49 -5
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
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.jGIS-sidepanel-widget {
|
|
98
|
+
overflow: auto;
|
|
98
99
|
height: 100%;
|
|
99
100
|
}
|
|
100
101
|
|
|
@@ -235,7 +236,7 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
235
236
|
margin-left: 1px;
|
|
236
237
|
margin-top: 1px;
|
|
237
238
|
padding: 1em;
|
|
238
|
-
color:
|
|
239
|
+
color: var(--jp-ui-font-color0);
|
|
239
240
|
background: var(--jp-layout-color1);
|
|
240
241
|
border-radius: 0.5em;
|
|
241
242
|
font-size: 12px;
|
|
@@ -252,10 +253,6 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
252
253
|
overflow: auto;
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
.jGIS-Annotations {
|
|
256
|
-
overflow: auto;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
256
|
.jGIS-Annotation-Card {
|
|
260
257
|
max-height: 400px;
|
|
261
258
|
overflow: auto;
|
|
@@ -376,6 +373,11 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
376
373
|
z-index: 20;
|
|
377
374
|
}
|
|
378
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
|
+
}
|
|
379
381
|
.jGIS-Remote-Pointer-Icon:hover {
|
|
380
382
|
scale: 1.3;
|
|
381
383
|
}
|
|
@@ -420,6 +422,18 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
420
422
|
height: 600px;
|
|
421
423
|
width: 100%;
|
|
422
424
|
}
|
|
425
|
+
|
|
426
|
+
/* Support output views, created with "Create new view for cell output" context menu */
|
|
427
|
+
.jp-LinkedOutputView .jp-OutputArea-child:only-child {
|
|
428
|
+
/* NOTE: This will eventually be supported directly in JupyterLab
|
|
429
|
+
* (https://github.com/jupyterlab/jupyterlab/pull/17487), but we should keep
|
|
430
|
+
* it around for a while for backwards compatibility. */
|
|
431
|
+
height: 100%;
|
|
432
|
+
}
|
|
433
|
+
.jp-LinkedOutputView .jupytergis-notebook-widget {
|
|
434
|
+
height: 100%;
|
|
435
|
+
}
|
|
436
|
+
|
|
423
437
|
.jupytergis-notebook-widget > div {
|
|
424
438
|
height: 100%;
|
|
425
439
|
width: 100%;
|
|
@@ -690,6 +704,9 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
690
704
|
|
|
691
705
|
.jgis-identify-grid-item-header {
|
|
692
706
|
display: flex;
|
|
707
|
+
align-items: center;
|
|
708
|
+
justify-content: space-between;
|
|
709
|
+
gap: 8px;
|
|
693
710
|
grid-column: span 2;
|
|
694
711
|
font-weight: bold;
|
|
695
712
|
font-size: var(--jp-ui-font-size1);
|
|
@@ -739,6 +756,11 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
739
756
|
padding-bottom: 8px;
|
|
740
757
|
}
|
|
741
758
|
|
|
759
|
+
.jgis-scrollable {
|
|
760
|
+
overflow: auto;
|
|
761
|
+
height: 100%;
|
|
762
|
+
}
|
|
763
|
+
|
|
742
764
|
/* Style the file path text */
|
|
743
765
|
.file-container {
|
|
744
766
|
display: flex;
|
|
@@ -746,3 +768,25 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {
|
|
|
746
768
|
margin-bottom: 16px;
|
|
747
769
|
gap: 10px;
|
|
748
770
|
}
|
|
771
|
+
|
|
772
|
+
.jgis-highlight-button {
|
|
773
|
+
background: none;
|
|
774
|
+
border: none;
|
|
775
|
+
cursor: pointer;
|
|
776
|
+
padding: 0;
|
|
777
|
+
display: flex;
|
|
778
|
+
align-items: center;
|
|
779
|
+
justify-content: center;
|
|
780
|
+
min-width: 28px;
|
|
781
|
+
min-height: 28px;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.jgis-highlight-button:hover {
|
|
785
|
+
color: var(--jp-brand-color1);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.jgis-highlight-button:disabled {
|
|
789
|
+
opacity: 0.4;
|
|
790
|
+
cursor: not-allowed;
|
|
791
|
+
pointer-events: auto;
|
|
792
|
+
}
|