@jupytergis/jupytergis-core 0.1.4 → 0.1.6

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.
@@ -6,7 +6,7 @@ import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
6
6
  import { IFileBrowserFactory } from '@jupyterlab/filebrowser';
7
7
  import { ILauncher } from '@jupyterlab/launcher';
8
8
  import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
9
- import { CommandIDs, logoIcon } from '@jupytergis/base';
9
+ import { CommandIDs, logoIcon, logoMiniIcon } from '@jupytergis/base';
10
10
  import { JupyterGISWidgetFactory } from '../factory';
11
11
  import { JupyterGISModelFactory } from './modelfactory';
12
12
  const FACTORY = 'JupyterGIS .jgis Viewer';
@@ -39,7 +39,8 @@ const activate = (app, tracker, themeManager, browserFactory, externalCommandReg
39
39
  mimeTypes: ['text/json'],
40
40
  extensions: ['.jgis', '.JGIS'],
41
41
  fileFormat: 'text',
42
- contentType: 'jgis'
42
+ contentType: 'jgis',
43
+ icon: logoMiniIcon
43
44
  });
44
45
  const jGISSharedModelFactory = () => {
45
46
  return new JupyterGISDoc();
@@ -48,6 +49,7 @@ const activate = (app, tracker, themeManager, browserFactory, externalCommandReg
48
49
  drive.sharedModelFactory.registerDocumentFactory('jgis', jGISSharedModelFactory);
49
50
  }
50
51
  widgetFactory.widgetCreated.connect((sender, widget) => {
52
+ widget.title.icon = logoIcon;
51
53
  widget.context.pathChanged.connect(() => {
52
54
  tracker.save(widget);
53
55
  });
@@ -57,7 +59,7 @@ const activate = (app, tracker, themeManager, browserFactory, externalCommandReg
57
59
  app.shell.activateById('jupytergis::rightControlPanel');
58
60
  });
59
61
  app.commands.addCommand(CommandIDs.createNew, {
60
- label: args => 'New JGIS File',
62
+ label: args => 'GIS File',
61
63
  caption: 'Create a new JGIS Editor',
62
64
  icon: args => logoIcon,
63
65
  execute: async (args) => {
@@ -72,7 +74,7 @@ const activate = (app, tracker, themeManager, browserFactory, externalCommandReg
72
74
  type: 'file',
73
75
  ext: '.jGIS'
74
76
  });
75
- model = await app.serviceManager.contents.save(model.path, Object.assign(Object.assign({}, model), { format: 'text', size: undefined, content: '{\n\t"layers": {},\n\t"sources": {},\n\t"options": {"latitude": 0, "longitude": 0, "zoom": 0, "bearing": 0, "pitch": 0, "projection": "EPSG:3857"},\n\t"layerTree": [],\n\t"terrain": {"source": "", "exaggeration": 0}\n}' }));
77
+ model = await app.serviceManager.contents.save(model.path, Object.assign(Object.assign({}, model), { format: 'text', size: undefined, content: '{\n\t"layers": {},\n\t"sources": {},\n\t"options": {"latitude": 0, "longitude": 0, "zoom": 0, "bearing": 0, "pitch": 0, "projection": "EPSG:3857"},\n\t"layerTree": []\n}' }));
76
78
  // Open the newly created file with the 'Editor'
77
79
  return app.commands.execute('docmanager:open', {
78
80
  path: model.path,
@@ -151,16 +153,6 @@ const activate = (app, tracker, themeManager, browserFactory, externalCommandReg
151
153
  command: CommandIDs.moveLayerToNewGroup,
152
154
  category: 'JupyterGIS'
153
155
  });
154
- // Source actions
155
- // Terrain
156
- palette.addItem({
157
- command: CommandIDs.newTerrain,
158
- category: 'JupyterGIS'
159
- });
160
- palette.addItem({
161
- command: CommandIDs.removeTerrain,
162
- category: 'JupyterGIS'
163
- });
164
156
  }
165
157
  };
166
158
  const jGISPlugin = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/jupytergis-core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "JupyterGIS core extension",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@jupyter/docprovider": "^2.0.0",
56
- "@jupytergis/base": "^0.1.4",
57
- "@jupytergis/schema": "^0.1.4",
56
+ "@jupytergis/base": "^0.1.6",
57
+ "@jupytergis/schema": "^0.1.6",
58
58
  "@jupyterlab/application": "^4.0.0",
59
59
  "@jupyterlab/apputils": "^4.0.0",
60
60
  "@jupyterlab/docregistry": "^4.0.0",