@jupytergis/base 0.2.0 → 0.2.1

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.
@@ -1,6 +1,6 @@
1
1
  import { JupyterGISModel } from '@jupytergis/schema';
2
2
  import { UUID } from '@lumino/coreutils';
3
- import { Collection, Map as OlMap, View } from 'ol';
3
+ import { Collection, Map as OlMap, View, getUid } from 'ol';
4
4
  import { ScaleLine } from 'ol/control';
5
5
  import { GeoJSON, MVT } from 'ol/format';
6
6
  import { DragAndDrop, Select } from 'ol/interaction';
@@ -552,6 +552,9 @@ export class MainView extends React.Component {
552
552
  featureProjection: this._Map.getView().getProjection()
553
553
  });
554
554
  const featureCollection = new Collection(featureArray);
555
+ featureCollection.forEach(feature => {
556
+ feature.setId(getUid(feature));
557
+ });
555
558
  newSource = new VectorSource({
556
559
  features: featureCollection
557
560
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/base",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A JupyterLab extension for 3D modelling.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@jupyter/ydoc": "^2.0.0 || ^3.0.0",
42
- "@jupytergis/schema": "^0.2.0",
42
+ "@jupytergis/schema": "^0.2.1",
43
43
  "@jupyterlab/application": "^4.3.0",
44
44
  "@jupyterlab/apputils": "^4.3.0",
45
45
  "@jupyterlab/completer": "^4.3.0",