geojs 1.12.9 → 1.12.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # GeoJS Change Log
2
2
 
3
+ ## Version 1.12.10
4
+
5
+ ### Performance Improvements
6
+
7
+ - Allow skipping event triggers on removeAnnotation and removeAllAnnotations ([#13521](../../pull/13521))
8
+
3
9
  ## Version 1.12.9
4
10
 
5
11
  ### Performance Improvements
package/geo.js CHANGED
@@ -6865,7 +6865,7 @@ var _annotationLayer = function annotationLayer(arg) {
6865
6865
  * gcs, `null` to use the map gcs, or any other transform.
6866
6866
  * @param {boolean} [update] If `false`, don't update the layer after adding
6867
6867
  * the annotation.
6868
- * @param {boolean} [trigger] If `false`, do trigger add_before and add
6868
+ * @param {boolean} [trigger] If `false`, do not trigger add_before and add
6869
6869
  * events.
6870
6870
  * @returns {this} The current layer.
6871
6871
  * @fires geo.event.annotation.add_before
@@ -6943,10 +6943,11 @@ var _annotationLayer = function annotationLayer(arg) {
6943
6943
  * the annotation.
6944
6944
  * @param {int} [pos] The posiiton of the annotation in the annotation list,
6945
6945
  * if known. This speeds up the process.
6946
+ * @param {boolean} [trigger] If `false`, do not trigger remove event.
6946
6947
  * @returns {boolean} `true` if an annotation was removed.
6947
6948
  * @fires geo.event.annotation.remove
6948
6949
  */
6949
- this.removeAnnotation = function (annotation, update, pos) {
6950
+ this.removeAnnotation = function (annotation, update, pos, trigger) {
6950
6951
  if (annotation.id && m_annotationIds[annotation.id()] !== undefined) {
6951
6952
  pos = m_annotations.indexOf(annotation);
6952
6953
  if (annotation === m_this.currentAnnotation) {
@@ -6961,9 +6962,11 @@ var _annotationLayer = function annotationLayer(arg) {
6961
6962
  m_this.modified();
6962
6963
  m_this.draw();
6963
6964
  }
6964
- m_this.geoTrigger(geo_event.annotation.remove, {
6965
- annotation: annotation
6966
- });
6965
+ if (trigger !== false) {
6966
+ m_this.geoTrigger(geo_event.annotation.remove, {
6967
+ annotation: annotation
6968
+ });
6969
+ }
6967
6970
  return true;
6968
6971
  }
6969
6972
  return false;
@@ -6976,9 +6979,10 @@ var _annotationLayer = function annotationLayer(arg) {
6976
6979
  * are in the create state.
6977
6980
  * @param {boolean} [update] If `false`, don't update the layer after
6978
6981
  * removing the annotation.
6982
+ * @param {boolean} [trigger] If `false`, do not trigger remove events.
6979
6983
  * @returns {number} The number of annotations that were removed.
6980
6984
  */
6981
- this.removeAllAnnotations = function (skipCreating, update) {
6985
+ this.removeAllAnnotations = function (skipCreating, update, trigger) {
6982
6986
  var removed = 0,
6983
6987
  annotation;
6984
6988
  for (var pos = m_annotations.length - 1; pos >= 0; pos -= 1) {
@@ -6986,7 +6990,7 @@ var _annotationLayer = function annotationLayer(arg) {
6986
6990
  if (skipCreating && annotation.state() === geo_annotation.state.create) {
6987
6991
  continue;
6988
6992
  }
6989
- m_this.removeAnnotation(annotation, false, pos);
6993
+ m_this.removeAnnotation(annotation, false, pos, trigger);
6990
6994
  removed += 1;
6991
6995
  }
6992
6996
  if (removed && update !== false) {
@@ -28095,7 +28099,7 @@ module.exports = _sceneObject;
28095
28099
  * @constant
28096
28100
  * @type {string}
28097
28101
  */
28098
- module.exports = "540466ba3aa5e442250a9eb78abbf8f62e824a51";
28102
+ module.exports = "4aaa9a69bb5d4da14aa03fcdc6d92ff1d5f98a9e";
28099
28103
 
28100
28104
  /***/ }),
28101
28105
 
@@ -33769,13 +33773,13 @@ _transform.lookup = function (projection) {
33769
33773
  }
33770
33774
  code = parts[1];
33771
33775
  return $.ajax({
33772
- url: 'https://epsg.io/?q=' + code + '&format=json'
33776
+ url: 'https://epsg.io/' + encodeURIComponent(code) + '.proj4'
33773
33777
  }).done(function (data) {
33774
33778
  var result = (data.results || [])[0];
33775
- if (!result || !result.proj4) {
33779
+ if (!result) {
33776
33780
  return defer.reject(data).promise();
33777
33781
  }
33778
- proj4.defs(projection, result.proj4);
33782
+ proj4.defs(projection, result);
33779
33783
  return $.when(proj4.defs[projection]);
33780
33784
  });
33781
33785
  };
@@ -39968,7 +39972,7 @@ module.exports = _vectorFeature;
39968
39972
  * @constant
39969
39973
  * @type {string}
39970
39974
  */
39971
- module.exports = "1.12.9";
39975
+ module.exports = "1.12.11";
39972
39976
 
39973
39977
  /***/ }),
39974
39978
 
package/geo.lean.js CHANGED
@@ -3864,7 +3864,7 @@ var _annotationLayer = function annotationLayer(arg) {
3864
3864
  * gcs, `null` to use the map gcs, or any other transform.
3865
3865
  * @param {boolean} [update] If `false`, don't update the layer after adding
3866
3866
  * the annotation.
3867
- * @param {boolean} [trigger] If `false`, do trigger add_before and add
3867
+ * @param {boolean} [trigger] If `false`, do not trigger add_before and add
3868
3868
  * events.
3869
3869
  * @returns {this} The current layer.
3870
3870
  * @fires geo.event.annotation.add_before
@@ -3942,10 +3942,11 @@ var _annotationLayer = function annotationLayer(arg) {
3942
3942
  * the annotation.
3943
3943
  * @param {int} [pos] The posiiton of the annotation in the annotation list,
3944
3944
  * if known. This speeds up the process.
3945
+ * @param {boolean} [trigger] If `false`, do not trigger remove event.
3945
3946
  * @returns {boolean} `true` if an annotation was removed.
3946
3947
  * @fires geo.event.annotation.remove
3947
3948
  */
3948
- this.removeAnnotation = function (annotation, update, pos) {
3949
+ this.removeAnnotation = function (annotation, update, pos, trigger) {
3949
3950
  if (annotation.id && m_annotationIds[annotation.id()] !== undefined) {
3950
3951
  pos = m_annotations.indexOf(annotation);
3951
3952
  if (annotation === m_this.currentAnnotation) {
@@ -3960,9 +3961,11 @@ var _annotationLayer = function annotationLayer(arg) {
3960
3961
  m_this.modified();
3961
3962
  m_this.draw();
3962
3963
  }
3963
- m_this.geoTrigger(geo_event.annotation.remove, {
3964
- annotation: annotation
3965
- });
3964
+ if (trigger !== false) {
3965
+ m_this.geoTrigger(geo_event.annotation.remove, {
3966
+ annotation: annotation
3967
+ });
3968
+ }
3966
3969
  return true;
3967
3970
  }
3968
3971
  return false;
@@ -3975,9 +3978,10 @@ var _annotationLayer = function annotationLayer(arg) {
3975
3978
  * are in the create state.
3976
3979
  * @param {boolean} [update] If `false`, don't update the layer after
3977
3980
  * removing the annotation.
3981
+ * @param {boolean} [trigger] If `false`, do not trigger remove events.
3978
3982
  * @returns {number} The number of annotations that were removed.
3979
3983
  */
3980
- this.removeAllAnnotations = function (skipCreating, update) {
3984
+ this.removeAllAnnotations = function (skipCreating, update, trigger) {
3981
3985
  var removed = 0,
3982
3986
  annotation;
3983
3987
  for (var pos = m_annotations.length - 1; pos >= 0; pos -= 1) {
@@ -3985,7 +3989,7 @@ var _annotationLayer = function annotationLayer(arg) {
3985
3989
  if (skipCreating && annotation.state() === geo_annotation.state.create) {
3986
3990
  continue;
3987
3991
  }
3988
- m_this.removeAnnotation(annotation, false, pos);
3992
+ m_this.removeAnnotation(annotation, false, pos, trigger);
3989
3993
  removed += 1;
3990
3994
  }
3991
3995
  if (removed && update !== false) {
@@ -25094,7 +25098,7 @@ module.exports = _sceneObject;
25094
25098
  * @constant
25095
25099
  * @type {string}
25096
25100
  */
25097
- module.exports = "540466ba3aa5e442250a9eb78abbf8f62e824a51";
25101
+ module.exports = "4aaa9a69bb5d4da14aa03fcdc6d92ff1d5f98a9e";
25098
25102
 
25099
25103
  /***/ }),
25100
25104
 
@@ -30768,13 +30772,13 @@ _transform.lookup = function (projection) {
30768
30772
  }
30769
30773
  code = parts[1];
30770
30774
  return $.ajax({
30771
- url: 'https://epsg.io/?q=' + code + '&format=json'
30775
+ url: 'https://epsg.io/' + encodeURIComponent(code) + '.proj4'
30772
30776
  }).done(function (data) {
30773
30777
  var result = (data.results || [])[0];
30774
- if (!result || !result.proj4) {
30778
+ if (!result) {
30775
30779
  return defer.reject(data).promise();
30776
30780
  }
30777
- proj4.defs(projection, result.proj4);
30781
+ proj4.defs(projection, result);
30778
30782
  return $.when(proj4.defs[projection]);
30779
30783
  });
30780
30784
  };
@@ -36967,7 +36971,7 @@ module.exports = _vectorFeature;
36967
36971
  * @constant
36968
36972
  * @type {string}
36969
36973
  */
36970
- module.exports = "1.12.9";
36974
+ module.exports = "1.12.11";
36971
36975
 
36972
36976
  /***/ }),
36973
36977