geojs 1.12.6 → 1.12.8

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.
@@ -31,7 +31,7 @@ jobs:
31
31
  - run: npm run setup-website
32
32
  - run: npm run ci-xvfb
33
33
  - run: npm run ci-build-website
34
- - uses: codecov/codecov-action@v4
34
+ - uses: codecov/codecov-action@v5
35
35
  with:
36
36
  fail_ci_if_error: false
37
37
  verbose: true
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 = m_annotations.indexOf(annotation);
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) {
@@ -7200,7 +7200,7 @@ var _annotationLayer = function annotationLayer(arg) {
7200
7200
  datagcs,
7201
7201
  i,
7202
7202
  existing;
7203
- if ($.inArray(type, annotationList) < 0) {
7203
+ if (!annotationList.includes(type)) {
7204
7204
  return;
7205
7205
  }
7206
7206
  options.style = options.style || {};
@@ -13550,7 +13550,7 @@ var _fetchQueue = function fetchQueue(options) {
13550
13550
  */
13551
13551
  this.add = function (defer, callback, atEnd) {
13552
13552
  if (defer.__fetchQueue) {
13553
- var pos = $.inArray(defer, m_this._queue);
13553
+ var pos = m_this._queue.indexOf(defer);
13554
13554
  if (pos >= 0) {
13555
13555
  // m_this._queue.splice(pos, 1);
13556
13556
  m_this._addToQueue(defer, atEnd, pos);
@@ -13621,7 +13621,7 @@ var _fetchQueue = function fetchQueue(options) {
13621
13621
  * @returns {number} -1 if not in the queue, or the position in the queue.
13622
13622
  */
13623
13623
  this.get = function (defer) {
13624
- return $.inArray(defer, m_this._queue);
13624
+ return m_this._queue.indexOf(defer);
13625
13625
  };
13626
13626
 
13627
13627
  /**
@@ -13631,7 +13631,7 @@ var _fetchQueue = function fetchQueue(options) {
13631
13631
  * @returns {boolean} `true` if the object was removed.
13632
13632
  */
13633
13633
  this.remove = function (defer) {
13634
- var pos = $.inArray(defer, m_this._queue);
13634
+ var pos = m_this._queue.indexOf(defer);
13635
13635
  if (pos >= 0) {
13636
13636
  m_this._queue.splice(pos, 1);
13637
13637
  return true;
@@ -21866,7 +21866,7 @@ var _mapInteractor = function mapInteractor(args) {
21866
21866
  clearState();
21867
21867
 
21868
21868
  // if momentum is enabled, start the action here
21869
- if (m_options.momentum.enabled && $.inArray(oldAction, m_options.momentum.actions) >= 0) {
21869
+ if (m_options.momentum.enabled && m_options.momentum.actions.includes(oldAction)) {
21870
21870
  var t = new Date().valueOf();
21871
21871
  var dt = t - m_mouse.time + m_mouse.deltaTime;
21872
21872
  if (t - m_mouse.time < m_options.momentum.stopTime) {
@@ -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`.
@@ -26876,8 +26876,8 @@ var _quadFeature = function quadFeature(arg) {
26876
26876
  prev_onload = image.onload;
26877
26877
  image.onload = function () {
26878
26878
  if (previewColor !== undefined) {
26879
- if ($.inArray(quad, clrQuads) >= 0) {
26880
- clrQuads.splice($.inArray(quad, clrQuads), 1);
26879
+ if (clrQuads.includes(quad)) {
26880
+ clrQuads.splice(clrQuads.indexOf(quad), 1);
26881
26881
  }
26882
26882
  delete quadinfo.clrquad;
26883
26883
  }
@@ -26953,8 +26953,8 @@ var _quadFeature = function quadFeature(arg) {
26953
26953
  prev_onload = video.onloadeddata;
26954
26954
  video.onloadeddata = function () {
26955
26955
  if (previewColor !== undefined) {
26956
- if ($.inArray(quad, clrQuads) >= 0) {
26957
- clrQuads.splice($.inArray(quad, clrQuads), 1);
26956
+ if (clrQuads.includes(quad)) {
26957
+ clrQuads.splice(clrQuads.indexOf(quad), 1);
26958
26958
  }
26959
26959
  delete quadinfo.clrquad;
26960
26960
  }
@@ -27185,7 +27185,6 @@ module.exports = _quadFeature;
27185
27185
  /***/ 1098:
27186
27186
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
27187
27187
 
27188
- var $ = __webpack_require__(5616);
27189
27188
  var geo_action = __webpack_require__(8695);
27190
27189
  var util = __webpack_require__(1949);
27191
27190
  var widgets = {
@@ -27641,7 +27640,7 @@ registry.featuresForAnnotations = function (annotationList) {
27641
27640
  features.push(feature);
27642
27641
  } else {
27643
27642
  annotationList[ann].forEach(function (state) {
27644
- if ($.inArray(state, annotations[ann].features[feature]) >= 0) {
27643
+ if (annotations[ann].features[feature].includes(state)) {
27645
27644
  features.push(feature);
27646
27645
  }
27647
27646
  });
@@ -28060,7 +28059,7 @@ module.exports = _sceneObject;
28060
28059
  * @constant
28061
28060
  * @type {string}
28062
28061
  */
28063
- module.exports = "689846cc4aaa81643bd60b9d9afd9c8dd08bd8ff";
28062
+ module.exports = "af985cb0e0d8b7d7e3d98fff530ca23ae24cbcb8";
28064
28063
 
28065
28064
  /***/ }),
28066
28065
 
@@ -37436,7 +37435,7 @@ var util = {
37436
37435
  do {
37437
37436
  found = util.hasAction(actions, action, name, owner);
37438
37437
  if (found) {
37439
- actions.splice($.inArray(found, actions), 1);
37438
+ actions.splice(actions.indexOf(found), 1);
37440
37439
  removed += 1;
37441
37440
  }
37442
37441
  } while (found);
@@ -37984,7 +37983,7 @@ var util = {
37984
37983
  continue;
37985
37984
  }
37986
37985
  var copy = source[key];
37987
- if (copy && _typeof(copy) === 'object' && copy && (copy.constructor === undefined || copy.constructor === Object || Array.isArray(copy))) {
37986
+ if (copy && _typeof(copy) === 'object' && (copy.constructor === Object || Array.isArray(copy))) {
37988
37987
  var src = target[key];
37989
37988
  if (!Array.isArray(copy)) {
37990
37989
  if (_typeof(src) !== 'object' || Array.isArray(src)) {
@@ -39933,7 +39932,7 @@ module.exports = _vectorFeature;
39933
39932
  * @constant
39934
39933
  * @type {string}
39935
39934
  */
39936
- module.exports = "1.12.6";
39935
+ module.exports = "1.12.8";
39937
39936
 
39938
39937
  /***/ }),
39939
39938
 
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 = m_annotations.indexOf(annotation);
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) {
@@ -4199,7 +4199,7 @@ var _annotationLayer = function annotationLayer(arg) {
4199
4199
  datagcs,
4200
4200
  i,
4201
4201
  existing;
4202
- if ($.inArray(type, annotationList) < 0) {
4202
+ if (!annotationList.includes(type)) {
4203
4203
  return;
4204
4204
  }
4205
4205
  options.style = options.style || {};
@@ -10549,7 +10549,7 @@ var _fetchQueue = function fetchQueue(options) {
10549
10549
  */
10550
10550
  this.add = function (defer, callback, atEnd) {
10551
10551
  if (defer.__fetchQueue) {
10552
- var pos = $.inArray(defer, m_this._queue);
10552
+ var pos = m_this._queue.indexOf(defer);
10553
10553
  if (pos >= 0) {
10554
10554
  // m_this._queue.splice(pos, 1);
10555
10555
  m_this._addToQueue(defer, atEnd, pos);
@@ -10620,7 +10620,7 @@ var _fetchQueue = function fetchQueue(options) {
10620
10620
  * @returns {number} -1 if not in the queue, or the position in the queue.
10621
10621
  */
10622
10622
  this.get = function (defer) {
10623
- return $.inArray(defer, m_this._queue);
10623
+ return m_this._queue.indexOf(defer);
10624
10624
  };
10625
10625
 
10626
10626
  /**
@@ -10630,7 +10630,7 @@ var _fetchQueue = function fetchQueue(options) {
10630
10630
  * @returns {boolean} `true` if the object was removed.
10631
10631
  */
10632
10632
  this.remove = function (defer) {
10633
- var pos = $.inArray(defer, m_this._queue);
10633
+ var pos = m_this._queue.indexOf(defer);
10634
10634
  if (pos >= 0) {
10635
10635
  m_this._queue.splice(pos, 1);
10636
10636
  return true;
@@ -18865,7 +18865,7 @@ var _mapInteractor = function mapInteractor(args) {
18865
18865
  clearState();
18866
18866
 
18867
18867
  // if momentum is enabled, start the action here
18868
- if (m_options.momentum.enabled && $.inArray(oldAction, m_options.momentum.actions) >= 0) {
18868
+ if (m_options.momentum.enabled && m_options.momentum.actions.includes(oldAction)) {
18869
18869
  var t = new Date().valueOf();
18870
18870
  var dt = t - m_mouse.time + m_mouse.deltaTime;
18871
18871
  if (t - m_mouse.time < m_options.momentum.stopTime) {
@@ -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`.
@@ -23875,8 +23875,8 @@ var _quadFeature = function quadFeature(arg) {
23875
23875
  prev_onload = image.onload;
23876
23876
  image.onload = function () {
23877
23877
  if (previewColor !== undefined) {
23878
- if ($.inArray(quad, clrQuads) >= 0) {
23879
- clrQuads.splice($.inArray(quad, clrQuads), 1);
23878
+ if (clrQuads.includes(quad)) {
23879
+ clrQuads.splice(clrQuads.indexOf(quad), 1);
23880
23880
  }
23881
23881
  delete quadinfo.clrquad;
23882
23882
  }
@@ -23952,8 +23952,8 @@ var _quadFeature = function quadFeature(arg) {
23952
23952
  prev_onload = video.onloadeddata;
23953
23953
  video.onloadeddata = function () {
23954
23954
  if (previewColor !== undefined) {
23955
- if ($.inArray(quad, clrQuads) >= 0) {
23956
- clrQuads.splice($.inArray(quad, clrQuads), 1);
23955
+ if (clrQuads.includes(quad)) {
23956
+ clrQuads.splice(clrQuads.indexOf(quad), 1);
23957
23957
  }
23958
23958
  delete quadinfo.clrquad;
23959
23959
  }
@@ -24184,7 +24184,6 @@ module.exports = _quadFeature;
24184
24184
  /***/ 1098:
24185
24185
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
24186
24186
 
24187
- var $ = __webpack_require__(5616);
24188
24187
  var geo_action = __webpack_require__(8695);
24189
24188
  var util = __webpack_require__(1949);
24190
24189
  var widgets = {
@@ -24640,7 +24639,7 @@ registry.featuresForAnnotations = function (annotationList) {
24640
24639
  features.push(feature);
24641
24640
  } else {
24642
24641
  annotationList[ann].forEach(function (state) {
24643
- if ($.inArray(state, annotations[ann].features[feature]) >= 0) {
24642
+ if (annotations[ann].features[feature].includes(state)) {
24644
24643
  features.push(feature);
24645
24644
  }
24646
24645
  });
@@ -25059,7 +25058,7 @@ module.exports = _sceneObject;
25059
25058
  * @constant
25060
25059
  * @type {string}
25061
25060
  */
25062
- module.exports = "689846cc4aaa81643bd60b9d9afd9c8dd08bd8ff";
25061
+ module.exports = "af985cb0e0d8b7d7e3d98fff530ca23ae24cbcb8";
25063
25062
 
25064
25063
  /***/ }),
25065
25064
 
@@ -34435,7 +34434,7 @@ var util = {
34435
34434
  do {
34436
34435
  found = util.hasAction(actions, action, name, owner);
34437
34436
  if (found) {
34438
- actions.splice($.inArray(found, actions), 1);
34437
+ actions.splice(actions.indexOf(found), 1);
34439
34438
  removed += 1;
34440
34439
  }
34441
34440
  } while (found);
@@ -34983,7 +34982,7 @@ var util = {
34983
34982
  continue;
34984
34983
  }
34985
34984
  var copy = source[key];
34986
- if (copy && _typeof(copy) === 'object' && copy && (copy.constructor === undefined || copy.constructor === Object || Array.isArray(copy))) {
34985
+ if (copy && _typeof(copy) === 'object' && (copy.constructor === Object || Array.isArray(copy))) {
34987
34986
  var src = target[key];
34988
34987
  if (!Array.isArray(copy)) {
34989
34988
  if (_typeof(src) !== 'object' || Array.isArray(src)) {
@@ -36932,7 +36931,7 @@ module.exports = _vectorFeature;
36932
36931
  * @constant
36933
36932
  * @type {string}
36934
36933
  */
36935
- module.exports = "1.12.6";
36934
+ module.exports = "1.12.8";
36936
36935
 
36937
36936
  /***/ }),
36938
36937