geojs 1.6.2 → 1.6.3
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/.github/workflows/main.yml +1 -1
- package/.nvmrc +1 -0
- package/geo.js +12 -7
- package/geo.lean.js +11 -6
- package/geo.lean.min.js +2 -2
- package/geo.min.js +5 -5
- package/package.json +3 -3
- package/src/annotationLayer.js +7 -3
- package/src/vtkjs/pointFeature.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geojs",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "JavaScript Geo Visualization and Analysis Library",
|
|
5
5
|
"homepage": "https://github.com/OpenGeoscience/geojs",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"optionalDependencies": {
|
|
28
28
|
"d3": "^3.5.17",
|
|
29
29
|
"hammerjs": "^2.0.8",
|
|
30
|
-
"vtk.js": "
|
|
30
|
+
"vtk.js": "*"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/core": "^7.16.5",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"website": "cd website && npx hexo server",
|
|
157
157
|
"setup-website": "cd website && npm install",
|
|
158
158
|
"build-website": "npm run ci-build && npm run ci-build-website",
|
|
159
|
-
"ci-build-website": "cp -a dist/built/. website/source/built && bash -c '(npm run build-website-examples & npm run build-website-tutorials & wait -n && wait -n)' && cd dist &&
|
|
159
|
+
"ci-build-website": "cp -a dist/built/. website/source/built && bash -c '(npm run build-website-examples & npm run build-website-tutorials & wait -n && wait -n)' && cd dist && cp -ar data ../website/source/. && rm -rf ../website/source/data/tiles && rm -rf ../website/source/data/tiles.tgz && rm -rf ../website/source/data/base-images && rm -rf ../website/source/data/base-images.tgz && cp -ar apidocs/. ../website/source/apidocs && cd ../website && npm install && rm -f db.json && npx hexo generate",
|
|
160
160
|
"prepublishOnly": "webpack --config webpack.config.js && webpack --config webpack-lean.config.js && cp dist/built/*.js .",
|
|
161
161
|
"semantic-release": "semantic-release"
|
|
162
162
|
},
|
package/src/annotationLayer.js
CHANGED
|
@@ -399,11 +399,13 @@ var annotationLayer = function (arg) {
|
|
|
399
399
|
* @param {geo.annotation} annotation The annotation to add.
|
|
400
400
|
* @param {string|geo.transform|null} [gcs] `undefined` to use the interface
|
|
401
401
|
* gcs, `null` to use the map gcs, or any other transform.
|
|
402
|
+
* @param {boolean} update If `false`, don't update the layer after adding
|
|
403
|
+
* the annotation.
|
|
402
404
|
* @returns {this} The current layer.
|
|
403
405
|
* @fires geo.event.annotation.add_before
|
|
404
406
|
* @fires geo.event.annotation.add
|
|
405
407
|
*/
|
|
406
|
-
this.addAnnotation = function (annotation, gcs) {
|
|
408
|
+
this.addAnnotation = function (annotation, gcs, update) {
|
|
407
409
|
var pos = $.inArray(annotation, m_annotations);
|
|
408
410
|
if (pos < 0) {
|
|
409
411
|
m_this.geoTrigger(geo_event.annotation.add_before, {
|
|
@@ -418,8 +420,10 @@ var annotationLayer = function (arg) {
|
|
|
418
420
|
annotation._coordinates(transform.transformCoordinates(
|
|
419
421
|
gcs, map.gcs(), annotation._coordinates()));
|
|
420
422
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
+
if (update !== false) {
|
|
424
|
+
m_this.modified();
|
|
425
|
+
m_this.draw();
|
|
426
|
+
}
|
|
423
427
|
m_this.geoTrigger(geo_event.annotation.add, {
|
|
424
428
|
annotation: annotation
|
|
425
429
|
});
|