geojs 1.12.6 → 1.12.7

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/geo.js CHANGED
@@ -6876,8 +6876,7 @@ var _annotationLayer = function annotationLayer(arg) {
6876
6876
  * @fires geo.event.annotation.add
6877
6877
  */
6878
6878
  this.addAnnotation = function (annotation, gcs, update) {
6879
- var pos = $.inArray(annotation, m_annotations);
6880
- if (pos < 0) {
6879
+ if (m_annotationIds[annotation.id()] === undefined) {
6881
6880
  while (m_this.annotationById(annotation.id())) {
6882
6881
  annotation.newId();
6883
6882
  }
@@ -6909,12 +6908,14 @@ var _annotationLayer = function annotationLayer(arg) {
6909
6908
  * @param {geo.annotation} annotation The annotation to remove.
6910
6909
  * @param {boolean} [update] If `false`, don't update the layer after removing
6911
6910
  * the annotation.
6911
+ * @param {int} [pos] The posiiton of the annotation in the annotation list,
6912
+ * if known. This speeds up the process.
6912
6913
  * @returns {boolean} `true` if an annotation was removed.
6913
6914
  * @fires geo.event.annotation.remove
6914
6915
  */
6915
- this.removeAnnotation = function (annotation, update) {
6916
- var pos = $.inArray(annotation, m_annotations);
6917
- if (pos >= 0) {
6916
+ this.removeAnnotation = function (annotation, update, pos) {
6917
+ if (annotation.id && m_annotationIds[annotation.id()] !== undefined) {
6918
+ pos = $.inArray(annotation, m_annotations);
6918
6919
  if (annotation === m_this.currentAnnotation) {
6919
6920
  m_this.currentAnnotation = null;
6920
6921
  }
@@ -6930,8 +6931,9 @@ var _annotationLayer = function annotationLayer(arg) {
6930
6931
  m_this.geoTrigger(geo_event.annotation.remove, {
6931
6932
  annotation: annotation
6932
6933
  });
6934
+ return true;
6933
6935
  }
6934
- return pos >= 0;
6936
+ return false;
6935
6937
  };
6936
6938
 
6937
6939
  /**
@@ -6945,15 +6947,13 @@ var _annotationLayer = function annotationLayer(arg) {
6945
6947
  */
6946
6948
  this.removeAllAnnotations = function (skipCreating, update) {
6947
6949
  var removed = 0,
6948
- annotation,
6949
- pos = 0;
6950
- while (pos < m_annotations.length) {
6950
+ annotation;
6951
+ for (var pos = m_annotations.length - 1; pos >= 0; pos -= 1) {
6951
6952
  annotation = m_annotations[pos];
6952
6953
  if (skipCreating && annotation.state() === geo_annotation.state.create) {
6953
- pos += 1;
6954
6954
  continue;
6955
6955
  }
6956
- m_this.removeAnnotation(annotation, false);
6956
+ m_this.removeAnnotation(annotation, false, pos);
6957
6957
  removed += 1;
6958
6958
  }
6959
6959
  if (removed && update !== false) {
@@ -22528,7 +22528,7 @@ var pointFeature = __webpack_require__(7541);
22528
22528
  * @property {number|function} [strokeOffset=-1] The position of the stroke
22529
22529
  * compared to the radius. This can only be -1, 0, or 1 (the sign of the
22530
22530
  * value is used).
22531
- * @property {boolean|function} [radiusIncludeStroke=true] If truthy or
22531
+ * @property {boolean|function} [radiusIncludesStroke=true] If truthy or
22532
22532
  * undefined, the `radius` includes the `strokeWidth` based on the
22533
22533
  * `strokeOffset`. If defined and falsy, the radius does not include the
22534
22534
  * `strokeWidth`.
@@ -28060,7 +28060,7 @@ module.exports = _sceneObject;
28060
28060
  * @constant
28061
28061
  * @type {string}
28062
28062
  */
28063
- module.exports = "689846cc4aaa81643bd60b9d9afd9c8dd08bd8ff";
28063
+ module.exports = "62002290dca8a13aae8b6efc44341c14b02b427e";
28064
28064
 
28065
28065
  /***/ }),
28066
28066
 
@@ -39933,7 +39933,7 @@ module.exports = _vectorFeature;
39933
39933
  * @constant
39934
39934
  * @type {string}
39935
39935
  */
39936
- module.exports = "1.12.6";
39936
+ module.exports = "1.12.7";
39937
39937
 
39938
39938
  /***/ }),
39939
39939
 
package/geo.lean.js CHANGED
@@ -3875,8 +3875,7 @@ var _annotationLayer = function annotationLayer(arg) {
3875
3875
  * @fires geo.event.annotation.add
3876
3876
  */
3877
3877
  this.addAnnotation = function (annotation, gcs, update) {
3878
- var pos = $.inArray(annotation, m_annotations);
3879
- if (pos < 0) {
3878
+ if (m_annotationIds[annotation.id()] === undefined) {
3880
3879
  while (m_this.annotationById(annotation.id())) {
3881
3880
  annotation.newId();
3882
3881
  }
@@ -3908,12 +3907,14 @@ var _annotationLayer = function annotationLayer(arg) {
3908
3907
  * @param {geo.annotation} annotation The annotation to remove.
3909
3908
  * @param {boolean} [update] If `false`, don't update the layer after removing
3910
3909
  * the annotation.
3910
+ * @param {int} [pos] The posiiton of the annotation in the annotation list,
3911
+ * if known. This speeds up the process.
3911
3912
  * @returns {boolean} `true` if an annotation was removed.
3912
3913
  * @fires geo.event.annotation.remove
3913
3914
  */
3914
- this.removeAnnotation = function (annotation, update) {
3915
- var pos = $.inArray(annotation, m_annotations);
3916
- if (pos >= 0) {
3915
+ this.removeAnnotation = function (annotation, update, pos) {
3916
+ if (annotation.id && m_annotationIds[annotation.id()] !== undefined) {
3917
+ pos = $.inArray(annotation, m_annotations);
3917
3918
  if (annotation === m_this.currentAnnotation) {
3918
3919
  m_this.currentAnnotation = null;
3919
3920
  }
@@ -3929,8 +3930,9 @@ var _annotationLayer = function annotationLayer(arg) {
3929
3930
  m_this.geoTrigger(geo_event.annotation.remove, {
3930
3931
  annotation: annotation
3931
3932
  });
3933
+ return true;
3932
3934
  }
3933
- return pos >= 0;
3935
+ return false;
3934
3936
  };
3935
3937
 
3936
3938
  /**
@@ -3944,15 +3946,13 @@ var _annotationLayer = function annotationLayer(arg) {
3944
3946
  */
3945
3947
  this.removeAllAnnotations = function (skipCreating, update) {
3946
3948
  var removed = 0,
3947
- annotation,
3948
- pos = 0;
3949
- while (pos < m_annotations.length) {
3949
+ annotation;
3950
+ for (var pos = m_annotations.length - 1; pos >= 0; pos -= 1) {
3950
3951
  annotation = m_annotations[pos];
3951
3952
  if (skipCreating && annotation.state() === geo_annotation.state.create) {
3952
- pos += 1;
3953
3953
  continue;
3954
3954
  }
3955
- m_this.removeAnnotation(annotation, false);
3955
+ m_this.removeAnnotation(annotation, false, pos);
3956
3956
  removed += 1;
3957
3957
  }
3958
3958
  if (removed && update !== false) {
@@ -19527,7 +19527,7 @@ var pointFeature = __webpack_require__(7541);
19527
19527
  * @property {number|function} [strokeOffset=-1] The position of the stroke
19528
19528
  * compared to the radius. This can only be -1, 0, or 1 (the sign of the
19529
19529
  * value is used).
19530
- * @property {boolean|function} [radiusIncludeStroke=true] If truthy or
19530
+ * @property {boolean|function} [radiusIncludesStroke=true] If truthy or
19531
19531
  * undefined, the `radius` includes the `strokeWidth` based on the
19532
19532
  * `strokeOffset`. If defined and falsy, the radius does not include the
19533
19533
  * `strokeWidth`.
@@ -25059,7 +25059,7 @@ module.exports = _sceneObject;
25059
25059
  * @constant
25060
25060
  * @type {string}
25061
25061
  */
25062
- module.exports = "689846cc4aaa81643bd60b9d9afd9c8dd08bd8ff";
25062
+ module.exports = "62002290dca8a13aae8b6efc44341c14b02b427e";
25063
25063
 
25064
25064
  /***/ }),
25065
25065
 
@@ -36932,7 +36932,7 @@ module.exports = _vectorFeature;
36932
36932
  * @constant
36933
36933
  * @type {string}
36934
36934
  */
36935
- module.exports = "1.12.6";
36935
+ module.exports = "1.12.7";
36936
36936
 
36937
36937
  /***/ }),
36938
36938