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/.github/workflows/main.yml +1 -1
- package/geo.js +15 -16
- package/geo.lean.js +15 -16
- package/geo.lean.min.js +2 -2
- package/geo.min.js +2 -2
- package/package.json +1 -1
- package/src/annotationLayer.js +2 -2
- package/src/fetchQueue.js +3 -3
- package/src/mapInteractor.js +1 -2
- package/src/quadFeature.js +4 -4
- package/src/registry.js +1 -2
- package/src/util/common.js +2 -2
package/package.json
CHANGED
package/src/annotationLayer.js
CHANGED
|
@@ -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 =
|
|
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 (
|
|
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 =
|
|
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
|
|
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 =
|
|
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;
|
package/src/mapInteractor.js
CHANGED
|
@@ -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) {
|
package/src/quadFeature.js
CHANGED
|
@@ -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 (
|
|
470
|
-
clrQuads.splice(
|
|
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 (
|
|
548
|
-
clrQuads.splice(
|
|
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 (
|
|
462
|
+
if (annotations[ann].features[feature].includes(state)) {
|
|
464
463
|
features.push(feature);
|
|
465
464
|
}
|
|
466
465
|
});
|
package/src/util/common.js
CHANGED
|
@@ -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(
|
|
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' &&
|
|
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)) {
|