geojs 1.10.4 → 1.10.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/CHANGELOG.md +25 -0
- package/geo.js +33 -16
- package/geo.lean.js +33 -16
- package/geo.lean.min.js +2 -2
- package/geo.min.js +2 -2
- package/package.json +1 -1
- package/src/annotation/annotation.js +7 -2
- package/src/annotation/polygonAnnotation.js +1 -1
- package/src/annotation/rectangleAnnotation.js +0 -1
- package/src/object.js +9 -0
- package/src/polygonFeature.js +7 -2
- package/src/webgl/quadFeature.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# GeoJS Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.10.5
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
- Allow using the rdp functions on non-feature polygons ([#1234](../../pull/1234))
|
|
8
|
+
- Allow annotations to be created regardless of metakeys ([#1235](../../pull/1235))
|
|
9
|
+
|
|
10
|
+
## Version 1.10.5
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Guard texture update calls ([#1233](../../pull/1233))
|
|
15
|
+
|
|
16
|
+
## Version 1.10.5
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- Guard converting an empty polygon ([#1232](../../pull/1232))
|
|
21
|
+
|
|
22
|
+
## Version 1.10.4
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
- Guard accessing a quad feature ([#1231](../../pull/1231))
|
|
27
|
+
|
|
3
28
|
## Version 1.10.3
|
|
4
29
|
|
|
5
30
|
### Performance improvements
|
package/geo.js
CHANGED
|
@@ -209,7 +209,11 @@ var annotation = function annotation(type, args) {
|
|
|
209
209
|
*/
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
this._exit = function () {
|
|
212
|
+
this._exit = function () {
|
|
213
|
+
if (m_this.layer()) {
|
|
214
|
+
m_this.layer().geoOff(geo_event.mousemove, m_this._cursorHandleMousemove);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
213
217
|
/**
|
|
214
218
|
* Get a unique annotation id.
|
|
215
219
|
*
|
|
@@ -921,6 +925,10 @@ var annotation = function annotation(type, args) {
|
|
|
921
925
|
this.coordinates = function (gcs) {
|
|
922
926
|
var coord = m_this._coordinates() || [];
|
|
923
927
|
|
|
928
|
+
if (!coord.length && (!coord.outer || !coord.outer.length)) {
|
|
929
|
+
coord = [];
|
|
930
|
+
}
|
|
931
|
+
|
|
924
932
|
if (m_this.layer()) {
|
|
925
933
|
var map = m_this.layer().map();
|
|
926
934
|
gcs = gcs === null ? map.gcs() : gcs === undefined ? map.ingcs() : gcs;
|
|
@@ -1532,11 +1540,7 @@ function continuousVerticesActions(m_this, s_actions, state, name, originalArgs)
|
|
|
1532
1540
|
action: geo_action['annotation_' + name],
|
|
1533
1541
|
name: name + ' create',
|
|
1534
1542
|
owner: annotationActionOwner,
|
|
1535
|
-
input: 'left'
|
|
1536
|
-
modifiers: {
|
|
1537
|
-
shift: false,
|
|
1538
|
-
ctrl: false
|
|
1539
|
-
}
|
|
1543
|
+
input: 'left'
|
|
1540
1544
|
}, {
|
|
1541
1545
|
action: geo_action['annotation_' + name],
|
|
1542
1546
|
name: name + ' create',
|
|
@@ -2892,7 +2896,7 @@ var polygonAnnotation = function polygonAnnotation(args) {
|
|
|
2892
2896
|
return result;
|
|
2893
2897
|
}
|
|
2894
2898
|
|
|
2895
|
-
if (coord.length < 3) {
|
|
2899
|
+
if (coord.length < 3 || !coord.map) {
|
|
2896
2900
|
return [];
|
|
2897
2901
|
}
|
|
2898
2902
|
|
|
@@ -3260,10 +3264,6 @@ var rectangleAnnotation = function rectangleAnnotation(args, annotationName) {
|
|
|
3260
3264
|
name: 'rectangle create',
|
|
3261
3265
|
owner: annotationActionOwner,
|
|
3262
3266
|
input: 'left',
|
|
3263
|
-
modifiers: {
|
|
3264
|
-
shift: false,
|
|
3265
|
-
ctrl: false
|
|
3266
|
-
},
|
|
3267
3267
|
selectionRectangle: true,
|
|
3268
3268
|
selectionConstraint: this._selectionConstraint
|
|
3269
3269
|
}];
|
|
@@ -23323,6 +23323,16 @@ var object = function object() {
|
|
|
23323
23323
|
|
|
23324
23324
|
return m_this;
|
|
23325
23325
|
};
|
|
23326
|
+
/**
|
|
23327
|
+
* Report the current event handlers.
|
|
23328
|
+
*
|
|
23329
|
+
* @returns {object} An object with all of the event handlers.
|
|
23330
|
+
*/
|
|
23331
|
+
|
|
23332
|
+
|
|
23333
|
+
this._eventHandlers = function () {
|
|
23334
|
+
return m_eventHandlers;
|
|
23335
|
+
};
|
|
23326
23336
|
/**
|
|
23327
23337
|
* Free all resources and destroy the object.
|
|
23328
23338
|
*/
|
|
@@ -25681,11 +25691,13 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25681
25691
|
* get the position of each vertex.
|
|
25682
25692
|
* @param {function} [polyFunc=this.style.get('polygon')] The function to
|
|
25683
25693
|
* get each polygon.
|
|
25684
|
-
* @
|
|
25694
|
+
* @param {boolean} [returnData=false] If truthy, return the new data array
|
|
25695
|
+
* rather than modifying the feature.
|
|
25696
|
+
* @returns {this|array}
|
|
25685
25697
|
*/
|
|
25686
25698
|
|
|
25687
25699
|
|
|
25688
|
-
this.rdpSimplifyData = function (data, tolerance, posFunc, polyFunc) {
|
|
25700
|
+
this.rdpSimplifyData = function (data, tolerance, posFunc, polyFunc, returnData) {
|
|
25689
25701
|
var map = m_this.layer().map(),
|
|
25690
25702
|
mapgcs = map.gcs(),
|
|
25691
25703
|
featuregcs = m_this.gcs(),
|
|
@@ -25749,8 +25761,13 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25749
25761
|
|
|
25750
25762
|
return elem;
|
|
25751
25763
|
});
|
|
25764
|
+
|
|
25765
|
+
if (returnData) {
|
|
25766
|
+
return data;
|
|
25767
|
+
}
|
|
25752
25768
|
/* Set the reduced polgons as the data and use simple accessors. */
|
|
25753
25769
|
|
|
25770
|
+
|
|
25754
25771
|
m_this.style('position', util.identityFunction);
|
|
25755
25772
|
m_this.style('polygon', util.identityFunction);
|
|
25756
25773
|
m_this.data(data);
|
|
@@ -27869,7 +27886,7 @@ module.exports = sceneObject;
|
|
|
27869
27886
|
* @constant
|
|
27870
27887
|
* @type {string}
|
|
27871
27888
|
*/
|
|
27872
|
-
module.exports = "
|
|
27889
|
+
module.exports = "e8aceeb82b2e0af20e6c4483678c951f410bedbf";
|
|
27873
27890
|
|
|
27874
27891
|
/***/ }),
|
|
27875
27892
|
|
|
@@ -41029,7 +41046,7 @@ module.exports = vectorFeature;
|
|
|
41029
41046
|
* @constant
|
|
41030
41047
|
* @type {string}
|
|
41031
41048
|
*/
|
|
41032
|
-
module.exports = "1.10.
|
|
41049
|
+
module.exports = "1.10.7";
|
|
41033
41050
|
|
|
41034
41051
|
/***/ }),
|
|
41035
41052
|
|
|
@@ -45700,7 +45717,7 @@ var webgl_quadFeature = function webgl_quadFeature(arg) {
|
|
|
45700
45717
|
}
|
|
45701
45718
|
|
|
45702
45719
|
m_quads.imgQuads.forEach(function (quad) {
|
|
45703
|
-
if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel) {
|
|
45720
|
+
if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel && quad.texture.textureHandle()) {
|
|
45704
45721
|
/* This could just be
|
|
45705
45722
|
* quad.texture.setNearestPixel(nearestPixel);
|
|
45706
45723
|
* but that needlessly redecodes the image. Instead, just change the
|
package/geo.lean.js
CHANGED
|
@@ -209,7 +209,11 @@ var annotation = function annotation(type, args) {
|
|
|
209
209
|
*/
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
this._exit = function () {
|
|
212
|
+
this._exit = function () {
|
|
213
|
+
if (m_this.layer()) {
|
|
214
|
+
m_this.layer().geoOff(geo_event.mousemove, m_this._cursorHandleMousemove);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
213
217
|
/**
|
|
214
218
|
* Get a unique annotation id.
|
|
215
219
|
*
|
|
@@ -921,6 +925,10 @@ var annotation = function annotation(type, args) {
|
|
|
921
925
|
this.coordinates = function (gcs) {
|
|
922
926
|
var coord = m_this._coordinates() || [];
|
|
923
927
|
|
|
928
|
+
if (!coord.length && (!coord.outer || !coord.outer.length)) {
|
|
929
|
+
coord = [];
|
|
930
|
+
}
|
|
931
|
+
|
|
924
932
|
if (m_this.layer()) {
|
|
925
933
|
var map = m_this.layer().map();
|
|
926
934
|
gcs = gcs === null ? map.gcs() : gcs === undefined ? map.ingcs() : gcs;
|
|
@@ -1532,11 +1540,7 @@ function continuousVerticesActions(m_this, s_actions, state, name, originalArgs)
|
|
|
1532
1540
|
action: geo_action['annotation_' + name],
|
|
1533
1541
|
name: name + ' create',
|
|
1534
1542
|
owner: annotationActionOwner,
|
|
1535
|
-
input: 'left'
|
|
1536
|
-
modifiers: {
|
|
1537
|
-
shift: false,
|
|
1538
|
-
ctrl: false
|
|
1539
|
-
}
|
|
1543
|
+
input: 'left'
|
|
1540
1544
|
}, {
|
|
1541
1545
|
action: geo_action['annotation_' + name],
|
|
1542
1546
|
name: name + ' create',
|
|
@@ -2892,7 +2896,7 @@ var polygonAnnotation = function polygonAnnotation(args) {
|
|
|
2892
2896
|
return result;
|
|
2893
2897
|
}
|
|
2894
2898
|
|
|
2895
|
-
if (coord.length < 3) {
|
|
2899
|
+
if (coord.length < 3 || !coord.map) {
|
|
2896
2900
|
return [];
|
|
2897
2901
|
}
|
|
2898
2902
|
|
|
@@ -3260,10 +3264,6 @@ var rectangleAnnotation = function rectangleAnnotation(args, annotationName) {
|
|
|
3260
3264
|
name: 'rectangle create',
|
|
3261
3265
|
owner: annotationActionOwner,
|
|
3262
3266
|
input: 'left',
|
|
3263
|
-
modifiers: {
|
|
3264
|
-
shift: false,
|
|
3265
|
-
ctrl: false
|
|
3266
|
-
},
|
|
3267
3267
|
selectionRectangle: true,
|
|
3268
3268
|
selectionConstraint: this._selectionConstraint
|
|
3269
3269
|
}];
|
|
@@ -23323,6 +23323,16 @@ var object = function object() {
|
|
|
23323
23323
|
|
|
23324
23324
|
return m_this;
|
|
23325
23325
|
};
|
|
23326
|
+
/**
|
|
23327
|
+
* Report the current event handlers.
|
|
23328
|
+
*
|
|
23329
|
+
* @returns {object} An object with all of the event handlers.
|
|
23330
|
+
*/
|
|
23331
|
+
|
|
23332
|
+
|
|
23333
|
+
this._eventHandlers = function () {
|
|
23334
|
+
return m_eventHandlers;
|
|
23335
|
+
};
|
|
23326
23336
|
/**
|
|
23327
23337
|
* Free all resources and destroy the object.
|
|
23328
23338
|
*/
|
|
@@ -25681,11 +25691,13 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25681
25691
|
* get the position of each vertex.
|
|
25682
25692
|
* @param {function} [polyFunc=this.style.get('polygon')] The function to
|
|
25683
25693
|
* get each polygon.
|
|
25684
|
-
* @
|
|
25694
|
+
* @param {boolean} [returnData=false] If truthy, return the new data array
|
|
25695
|
+
* rather than modifying the feature.
|
|
25696
|
+
* @returns {this|array}
|
|
25685
25697
|
*/
|
|
25686
25698
|
|
|
25687
25699
|
|
|
25688
|
-
this.rdpSimplifyData = function (data, tolerance, posFunc, polyFunc) {
|
|
25700
|
+
this.rdpSimplifyData = function (data, tolerance, posFunc, polyFunc, returnData) {
|
|
25689
25701
|
var map = m_this.layer().map(),
|
|
25690
25702
|
mapgcs = map.gcs(),
|
|
25691
25703
|
featuregcs = m_this.gcs(),
|
|
@@ -25749,8 +25761,13 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25749
25761
|
|
|
25750
25762
|
return elem;
|
|
25751
25763
|
});
|
|
25764
|
+
|
|
25765
|
+
if (returnData) {
|
|
25766
|
+
return data;
|
|
25767
|
+
}
|
|
25752
25768
|
/* Set the reduced polgons as the data and use simple accessors. */
|
|
25753
25769
|
|
|
25770
|
+
|
|
25754
25771
|
m_this.style('position', util.identityFunction);
|
|
25755
25772
|
m_this.style('polygon', util.identityFunction);
|
|
25756
25773
|
m_this.data(data);
|
|
@@ -27869,7 +27886,7 @@ module.exports = sceneObject;
|
|
|
27869
27886
|
* @constant
|
|
27870
27887
|
* @type {string}
|
|
27871
27888
|
*/
|
|
27872
|
-
module.exports = "
|
|
27889
|
+
module.exports = "e8aceeb82b2e0af20e6c4483678c951f410bedbf";
|
|
27873
27890
|
|
|
27874
27891
|
/***/ }),
|
|
27875
27892
|
|
|
@@ -41029,7 +41046,7 @@ module.exports = vectorFeature;
|
|
|
41029
41046
|
* @constant
|
|
41030
41047
|
* @type {string}
|
|
41031
41048
|
*/
|
|
41032
|
-
module.exports = "1.10.
|
|
41049
|
+
module.exports = "1.10.7";
|
|
41033
41050
|
|
|
41034
41051
|
/***/ }),
|
|
41035
41052
|
|
|
@@ -45700,7 +45717,7 @@ var webgl_quadFeature = function webgl_quadFeature(arg) {
|
|
|
45700
45717
|
}
|
|
45701
45718
|
|
|
45702
45719
|
m_quads.imgQuads.forEach(function (quad) {
|
|
45703
|
-
if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel) {
|
|
45720
|
+
if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel && quad.texture.textureHandle()) {
|
|
45704
45721
|
/* This could just be
|
|
45705
45722
|
* quad.texture.setNearestPixel(nearestPixel);
|
|
45706
45723
|
* but that needlessly redecodes the image. Instead, just change the
|