geojs 1.12.7 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geojs",
3
- "version": "1.12.7",
3
+ "version": "1.12.8",
4
4
  "description": "JavaScript Geo Visualization and Analysis Library",
5
5
  "homepage": "https://github.com/OpenGeoscience/geojs",
6
6
  "license": "Apache-2.0",
@@ -536,7 +536,7 @@ var annotationLayer = function (arg) {
536
536
  */
537
537
  this.removeAnnotation = function (annotation, update, pos) {
538
538
  if (annotation.id && m_annotationIds[annotation.id()] !== undefined) {
539
- pos = $.inArray(annotation, m_annotations);
539
+ pos = m_annotations.indexOf(annotation);
540
540
  if (annotation === m_this.currentAnnotation) {
541
541
  m_this.currentAnnotation = null;
542
542
  }
@@ -815,7 +815,7 @@ var annotationLayer = function (arg) {
815
815
  var type = (data.properties || {}).annotationType || feature.featureType,
816
816
  options = Object.assign({}, data.properties || {}),
817
817
  position, datagcs, i, existing;
818
- if ($.inArray(type, annotationList) < 0) {
818
+ if (!annotationList.includes(type)) {
819
819
  return;
820
820
  }
821
821
  options.style = options.style || {};
package/src/fetchQueue.js CHANGED
@@ -144,7 +144,7 @@ var fetchQueue = function (options) {
144
144
  */
145
145
  this.add = function (defer, callback, atEnd) {
146
146
  if (defer.__fetchQueue) {
147
- var pos = $.inArray(defer, m_this._queue);
147
+ var pos = m_this._queue.indexOf(defer);
148
148
  if (pos >= 0) {
149
149
  // m_this._queue.splice(pos, 1);
150
150
  m_this._addToQueue(defer, atEnd, pos);
@@ -215,7 +215,7 @@ var fetchQueue = function (options) {
215
215
  * @returns {number} -1 if not in the queue, or the position in the queue.
216
216
  */
217
217
  this.get = function (defer) {
218
- return $.inArray(defer, m_this._queue);
218
+ return m_this._queue.indexOf(defer);
219
219
  };
220
220
 
221
221
  /**
@@ -225,7 +225,7 @@ var fetchQueue = function (options) {
225
225
  * @returns {boolean} `true` if the object was removed.
226
226
  */
227
227
  this.remove = function (defer) {
228
- var pos = $.inArray(defer, m_this._queue);
228
+ var pos = m_this._queue.indexOf(defer);
229
229
  if (pos >= 0) {
230
230
  m_this._queue.splice(pos, 1);
231
231
  return true;
@@ -1598,8 +1598,7 @@ var mapInteractor = function (args) {
1598
1598
  clearState();
1599
1599
 
1600
1600
  // if momentum is enabled, start the action here
1601
- if (m_options.momentum.enabled &&
1602
- $.inArray(oldAction, m_options.momentum.actions) >= 0) {
1601
+ if (m_options.momentum.enabled && m_options.momentum.actions.includes(oldAction)) {
1603
1602
  var t = (new Date()).valueOf();
1604
1603
  var dt = t - m_mouse.time + m_mouse.deltaTime;
1605
1604
  if (t - m_mouse.time < m_options.momentum.stopTime) {
@@ -466,8 +466,8 @@ var quadFeature = function (arg) {
466
466
  prev_onload = image.onload;
467
467
  image.onload = function () {
468
468
  if (previewColor !== undefined) {
469
- if ($.inArray(quad, clrQuads) >= 0) {
470
- clrQuads.splice($.inArray(quad, clrQuads), 1);
469
+ if (clrQuads.includes(quad)) {
470
+ clrQuads.splice(clrQuads.indexOf(quad), 1);
471
471
  }
472
472
  delete quadinfo.clrquad;
473
473
  }
@@ -544,8 +544,8 @@ var quadFeature = function (arg) {
544
544
  prev_onload = video.onloadeddata;
545
545
  video.onloadeddata = function () {
546
546
  if (previewColor !== undefined) {
547
- if ($.inArray(quad, clrQuads) >= 0) {
548
- clrQuads.splice($.inArray(quad, clrQuads), 1);
547
+ if (clrQuads.includes(quad)) {
548
+ clrQuads.splice(clrQuads.indexOf(quad), 1);
549
549
  }
550
550
  delete quadinfo.clrquad;
551
551
  }
package/src/registry.js CHANGED
@@ -1,4 +1,3 @@
1
- var $ = require('jquery');
2
1
  var geo_action = require('./action');
3
2
  var util = require('./util/common');
4
3
 
@@ -460,7 +459,7 @@ registry.featuresForAnnotations = function (annotationList) {
460
459
  features.push(feature);
461
460
  } else {
462
461
  annotationList[ann].forEach(function (state) {
463
- if ($.inArray(state, annotations[ann].features[feature]) >= 0) {
462
+ if (annotations[ann].features[feature].includes(state)) {
464
463
  features.push(feature);
465
464
  }
466
465
  });
@@ -464,7 +464,7 @@ var util = {
464
464
  do {
465
465
  found = util.hasAction(actions, action, name, owner);
466
466
  if (found) {
467
- actions.splice($.inArray(found, actions), 1);
467
+ actions.splice(actions.indexOf(found), 1);
468
468
  removed += 1;
469
469
  }
470
470
  } while (found);
@@ -1010,7 +1010,7 @@ var util = {
1010
1010
  continue;
1011
1011
  }
1012
1012
  const copy = source[key];
1013
- if (copy && typeof copy === 'object' && copy && (copy.constructor === undefined || copy.constructor === Object || Array.isArray(copy))) {
1013
+ if (copy && typeof copy === 'object' && (copy.constructor === Object || Array.isArray(copy))) {
1014
1014
  let src = target[key];
1015
1015
  if (!Array.isArray(copy)) {
1016
1016
  if (typeof src !== 'object' || Array.isArray(src)) {