geojs 1.6.4 → 1.6.5
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 +7 -1
- package/geo.js +17 -17
- package/geo.lean.js +17 -17
- package/geo.lean.min.js +2 -2
- package/geo.min.js +2 -2
- package/package.json +1 -1
- package/src/annotation.js +2 -2
- package/src/annotationLayer.js +4 -4
- package/src/lineFeature.js +3 -3
- package/src/polygonFeature.js +3 -3
- package/src/util/common.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# GeoJS Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.6.5
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- Fix spelling of collinear ([#1173](../../pull/1173))
|
|
8
|
+
|
|
3
9
|
## Version 1.6.4
|
|
4
10
|
|
|
5
11
|
### Bug Fixes
|
|
@@ -379,7 +385,7 @@
|
|
|
379
385
|
- Added an `object.geoIsOn` function to check if an event is bound ([#768](../../pull/768))
|
|
380
386
|
- Use the average perimeter for the center of a polygon or line ([#761](../../pull/761))
|
|
381
387
|
- Allow display to/from gcs conversion functions to handle arrays of points ([#766](../../pull/766))
|
|
382
|
-
- When drawing a line annotation, don't create intermediate
|
|
388
|
+
- When drawing a line annotation, don't create intermediate collinear points ([#759](../../pull/759))
|
|
383
389
|
- Improve exiting and reloading maps ([#750](../../pull/750))
|
|
384
390
|
- Various minor improvements ([#767](../../pull/767), [#760](../../pull/760))
|
|
385
391
|
|
package/geo.js
CHANGED
|
@@ -1365,7 +1365,7 @@ function continuousVerticesProcessAction(m_this, evt, name) {
|
|
|
1365
1365
|
}
|
|
1366
1366
|
|
|
1367
1367
|
var cpp = layer.options('continuousPointProximity');
|
|
1368
|
-
var cpc = layer.options('
|
|
1368
|
+
var cpc = layer.options('continuousPointCollinearity');
|
|
1369
1369
|
var ccp = layer.options('continuousCloseProximity');
|
|
1370
1370
|
|
|
1371
1371
|
if (cpp || cpp === 0) {
|
|
@@ -1381,7 +1381,7 @@ function continuousVerticesProcessAction(m_this, evt, name) {
|
|
|
1381
1381
|
var dist = layer.displayDistance(vertices[vertices.length - 2], null, evt.mouse.map, 'display');
|
|
1382
1382
|
|
|
1383
1383
|
if (dist && dist > cpp) {
|
|
1384
|
-
// combine nearly
|
|
1384
|
+
// combine nearly collinear points
|
|
1385
1385
|
if (vertices.length >= (m_this._lastClickVertexCount || 1) + 3) {
|
|
1386
1386
|
var d01 = layer.displayDistance(vertices[vertices.length - 3], null, vertices[vertices.length - 2], null),
|
|
1387
1387
|
d12 = dist,
|
|
@@ -2899,9 +2899,9 @@ var textFeature = __webpack_require__(9757);
|
|
|
2899
2899
|
* @property {number} [continuousPointProximity=5] The minimum distance in
|
|
2900
2900
|
* display coordinates (pixels) between two adjacent points when dragging
|
|
2901
2901
|
* to create an annotation. `false` disables continuous drawing mode.
|
|
2902
|
-
* @property {number} [
|
|
2902
|
+
* @property {number} [continuousPointCollinearity=1.0deg] The minimum angle
|
|
2903
2903
|
* between a series of three points when dragging to not interpret them as
|
|
2904
|
-
*
|
|
2904
|
+
* collinear. Only applies if `continuousPointProximity` is not `false`.
|
|
2905
2905
|
* @property {number} [continuousCloseProximity=10] The minimum distance in
|
|
2906
2906
|
* display coordinates (pixels) to close a polygon or end drawing a line when
|
|
2907
2907
|
* dragging to create an annotation. `false` never closes at the end of a
|
|
@@ -3053,8 +3053,8 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
3053
3053
|
// continuous drawing modes.
|
|
3054
3054
|
continuousPointProximity: 5,
|
|
3055
3055
|
// in radians, minimum angle between continuous points to interpret them as
|
|
3056
|
-
// being
|
|
3057
|
-
|
|
3056
|
+
// being collinear
|
|
3057
|
+
continuousPointCollinearity: 1.0 * Math.PI / 180,
|
|
3058
3058
|
continuousCloseProximity: 10,
|
|
3059
3059
|
// in pixels, 0 is exact
|
|
3060
3060
|
finalPointProximity: 10,
|
|
@@ -14626,9 +14626,9 @@ var lineFeature = function lineFeature(arg) {
|
|
|
14626
14626
|
*
|
|
14627
14627
|
* @param {array} data A new data array.
|
|
14628
14628
|
* @param {number} [tolerance] The maximum variation allowed in map.gcs
|
|
14629
|
-
* units. A value of zero will only remove perfectly
|
|
14630
|
-
* not specified, this is set to a half display pixel at the map's
|
|
14631
|
-
* zoom level.
|
|
14629
|
+
* units. A value of zero will only remove perfectly collinear points.
|
|
14630
|
+
* If not specified, this is set to a half display pixel at the map's
|
|
14631
|
+
* current zoom level.
|
|
14632
14632
|
* @param {function} [posFunc=this.style.get('position')] The function to
|
|
14633
14633
|
* get the position of each vertex.
|
|
14634
14634
|
* @param {function} [lineFunc=this.style.get('line')] The function to get
|
|
@@ -23916,9 +23916,9 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
23916
23916
|
*
|
|
23917
23917
|
* @param {array} data A new data array.
|
|
23918
23918
|
* @param {number} [tolerance] The maximum variation allowed in map.gcs
|
|
23919
|
-
* units. A value of zero will only remove perfectly
|
|
23920
|
-
* not specified, this is set to a half display pixel at the map's
|
|
23921
|
-
* zoom level.
|
|
23919
|
+
* units. A value of zero will only remove perfectly collinear points.
|
|
23920
|
+
* If not specified, this is set to a half display pixel at the map's
|
|
23921
|
+
* current zoom level.
|
|
23922
23922
|
* @param {function} [posFunc=this.style.get('position')] The function to
|
|
23923
23923
|
* get the position of each vertex.
|
|
23924
23924
|
* @param {function} [polyFunc=this.style.get('polygon')] The function to
|
|
@@ -26017,7 +26017,7 @@ module.exports = sceneObject;
|
|
|
26017
26017
|
* @constant
|
|
26018
26018
|
* @type {string}
|
|
26019
26019
|
*/
|
|
26020
|
-
module.exports = "
|
|
26020
|
+
module.exports = "07bea0c1a0c68aece32ca33afaeed257361803e3";
|
|
26021
26021
|
|
|
26022
26022
|
/***/ }),
|
|
26023
26023
|
|
|
@@ -36750,7 +36750,7 @@ var util = {
|
|
|
36750
36750
|
/**
|
|
36751
36751
|
* Determine if two line segments cross. They are not considered crossing if
|
|
36752
36752
|
* they share a vertex. They are crossing if either of one segment's
|
|
36753
|
-
* vertices are
|
|
36753
|
+
* vertices are collinear with the other segment.
|
|
36754
36754
|
*
|
|
36755
36755
|
* @param {geo.geoPosition} seg1pt1 One endpoint of the first segment.
|
|
36756
36756
|
* @param {geo.geoPosition} seg1pt2 The other endpoint of the first segment.
|
|
@@ -36772,7 +36772,7 @@ var util = {
|
|
|
36772
36772
|
}
|
|
36773
36773
|
/* If the lines cross, the signed area of the triangles formed between one
|
|
36774
36774
|
* segment and the other's vertices will have different signs. By using
|
|
36775
|
-
* > 0,
|
|
36775
|
+
* > 0, collinear points are crossing. */
|
|
36776
36776
|
|
|
36777
36777
|
|
|
36778
36778
|
if (util.triangleTwiceSignedArea2d(seg1pt1, seg1pt2, seg2pt1) * util.triangleTwiceSignedArea2d(seg1pt1, seg1pt2, seg2pt2) > 0 || util.triangleTwiceSignedArea2d(seg2pt1, seg2pt2, seg1pt1) * util.triangleTwiceSignedArea2d(seg2pt1, seg2pt2, seg1pt2) > 0) {
|
|
@@ -36819,7 +36819,7 @@ var util = {
|
|
|
36819
36819
|
* @param {geo.geoPosition[]} pts A list of points forming the line or
|
|
36820
36820
|
* polygon.
|
|
36821
36821
|
* @param {number} tolerance The maximum variation allowed. A value of zero
|
|
36822
|
-
* will only remove perfectly
|
|
36822
|
+
* will only remove perfectly collinear points.
|
|
36823
36823
|
* @param {boolean} [closed] If true, this is a polygon rather than an open
|
|
36824
36824
|
* line. In this case, it is possible to get back a single point.
|
|
36825
36825
|
* @param {Array.<geo.geoPosition[]>?} [noCrossLines] A falsy value to allow
|
|
@@ -38481,7 +38481,7 @@ module.exports = vectorFeature;
|
|
|
38481
38481
|
* @constant
|
|
38482
38482
|
* @type {string}
|
|
38483
38483
|
*/
|
|
38484
|
-
module.exports = "1.6.
|
|
38484
|
+
module.exports = "1.6.5";
|
|
38485
38485
|
|
|
38486
38486
|
/***/ }),
|
|
38487
38487
|
|
package/geo.lean.js
CHANGED
|
@@ -1365,7 +1365,7 @@ function continuousVerticesProcessAction(m_this, evt, name) {
|
|
|
1365
1365
|
}
|
|
1366
1366
|
|
|
1367
1367
|
var cpp = layer.options('continuousPointProximity');
|
|
1368
|
-
var cpc = layer.options('
|
|
1368
|
+
var cpc = layer.options('continuousPointCollinearity');
|
|
1369
1369
|
var ccp = layer.options('continuousCloseProximity');
|
|
1370
1370
|
|
|
1371
1371
|
if (cpp || cpp === 0) {
|
|
@@ -1381,7 +1381,7 @@ function continuousVerticesProcessAction(m_this, evt, name) {
|
|
|
1381
1381
|
var dist = layer.displayDistance(vertices[vertices.length - 2], null, evt.mouse.map, 'display');
|
|
1382
1382
|
|
|
1383
1383
|
if (dist && dist > cpp) {
|
|
1384
|
-
// combine nearly
|
|
1384
|
+
// combine nearly collinear points
|
|
1385
1385
|
if (vertices.length >= (m_this._lastClickVertexCount || 1) + 3) {
|
|
1386
1386
|
var d01 = layer.displayDistance(vertices[vertices.length - 3], null, vertices[vertices.length - 2], null),
|
|
1387
1387
|
d12 = dist,
|
|
@@ -2899,9 +2899,9 @@ var textFeature = __webpack_require__(9757);
|
|
|
2899
2899
|
* @property {number} [continuousPointProximity=5] The minimum distance in
|
|
2900
2900
|
* display coordinates (pixels) between two adjacent points when dragging
|
|
2901
2901
|
* to create an annotation. `false` disables continuous drawing mode.
|
|
2902
|
-
* @property {number} [
|
|
2902
|
+
* @property {number} [continuousPointCollinearity=1.0deg] The minimum angle
|
|
2903
2903
|
* between a series of three points when dragging to not interpret them as
|
|
2904
|
-
*
|
|
2904
|
+
* collinear. Only applies if `continuousPointProximity` is not `false`.
|
|
2905
2905
|
* @property {number} [continuousCloseProximity=10] The minimum distance in
|
|
2906
2906
|
* display coordinates (pixels) to close a polygon or end drawing a line when
|
|
2907
2907
|
* dragging to create an annotation. `false` never closes at the end of a
|
|
@@ -3053,8 +3053,8 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
3053
3053
|
// continuous drawing modes.
|
|
3054
3054
|
continuousPointProximity: 5,
|
|
3055
3055
|
// in radians, minimum angle between continuous points to interpret them as
|
|
3056
|
-
// being
|
|
3057
|
-
|
|
3056
|
+
// being collinear
|
|
3057
|
+
continuousPointCollinearity: 1.0 * Math.PI / 180,
|
|
3058
3058
|
continuousCloseProximity: 10,
|
|
3059
3059
|
// in pixels, 0 is exact
|
|
3060
3060
|
finalPointProximity: 10,
|
|
@@ -14626,9 +14626,9 @@ var lineFeature = function lineFeature(arg) {
|
|
|
14626
14626
|
*
|
|
14627
14627
|
* @param {array} data A new data array.
|
|
14628
14628
|
* @param {number} [tolerance] The maximum variation allowed in map.gcs
|
|
14629
|
-
* units. A value of zero will only remove perfectly
|
|
14630
|
-
* not specified, this is set to a half display pixel at the map's
|
|
14631
|
-
* zoom level.
|
|
14629
|
+
* units. A value of zero will only remove perfectly collinear points.
|
|
14630
|
+
* If not specified, this is set to a half display pixel at the map's
|
|
14631
|
+
* current zoom level.
|
|
14632
14632
|
* @param {function} [posFunc=this.style.get('position')] The function to
|
|
14633
14633
|
* get the position of each vertex.
|
|
14634
14634
|
* @param {function} [lineFunc=this.style.get('line')] The function to get
|
|
@@ -23916,9 +23916,9 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
23916
23916
|
*
|
|
23917
23917
|
* @param {array} data A new data array.
|
|
23918
23918
|
* @param {number} [tolerance] The maximum variation allowed in map.gcs
|
|
23919
|
-
* units. A value of zero will only remove perfectly
|
|
23920
|
-
* not specified, this is set to a half display pixel at the map's
|
|
23921
|
-
* zoom level.
|
|
23919
|
+
* units. A value of zero will only remove perfectly collinear points.
|
|
23920
|
+
* If not specified, this is set to a half display pixel at the map's
|
|
23921
|
+
* current zoom level.
|
|
23922
23922
|
* @param {function} [posFunc=this.style.get('position')] The function to
|
|
23923
23923
|
* get the position of each vertex.
|
|
23924
23924
|
* @param {function} [polyFunc=this.style.get('polygon')] The function to
|
|
@@ -26017,7 +26017,7 @@ module.exports = sceneObject;
|
|
|
26017
26017
|
* @constant
|
|
26018
26018
|
* @type {string}
|
|
26019
26019
|
*/
|
|
26020
|
-
module.exports = "
|
|
26020
|
+
module.exports = "07bea0c1a0c68aece32ca33afaeed257361803e3";
|
|
26021
26021
|
|
|
26022
26022
|
/***/ }),
|
|
26023
26023
|
|
|
@@ -36750,7 +36750,7 @@ var util = {
|
|
|
36750
36750
|
/**
|
|
36751
36751
|
* Determine if two line segments cross. They are not considered crossing if
|
|
36752
36752
|
* they share a vertex. They are crossing if either of one segment's
|
|
36753
|
-
* vertices are
|
|
36753
|
+
* vertices are collinear with the other segment.
|
|
36754
36754
|
*
|
|
36755
36755
|
* @param {geo.geoPosition} seg1pt1 One endpoint of the first segment.
|
|
36756
36756
|
* @param {geo.geoPosition} seg1pt2 The other endpoint of the first segment.
|
|
@@ -36772,7 +36772,7 @@ var util = {
|
|
|
36772
36772
|
}
|
|
36773
36773
|
/* If the lines cross, the signed area of the triangles formed between one
|
|
36774
36774
|
* segment and the other's vertices will have different signs. By using
|
|
36775
|
-
* > 0,
|
|
36775
|
+
* > 0, collinear points are crossing. */
|
|
36776
36776
|
|
|
36777
36777
|
|
|
36778
36778
|
if (util.triangleTwiceSignedArea2d(seg1pt1, seg1pt2, seg2pt1) * util.triangleTwiceSignedArea2d(seg1pt1, seg1pt2, seg2pt2) > 0 || util.triangleTwiceSignedArea2d(seg2pt1, seg2pt2, seg1pt1) * util.triangleTwiceSignedArea2d(seg2pt1, seg2pt2, seg1pt2) > 0) {
|
|
@@ -36819,7 +36819,7 @@ var util = {
|
|
|
36819
36819
|
* @param {geo.geoPosition[]} pts A list of points forming the line or
|
|
36820
36820
|
* polygon.
|
|
36821
36821
|
* @param {number} tolerance The maximum variation allowed. A value of zero
|
|
36822
|
-
* will only remove perfectly
|
|
36822
|
+
* will only remove perfectly collinear points.
|
|
36823
36823
|
* @param {boolean} [closed] If true, this is a polygon rather than an open
|
|
36824
36824
|
* line. In this case, it is possible to get back a single point.
|
|
36825
36825
|
* @param {Array.<geo.geoPosition[]>?} [noCrossLines] A falsy value to allow
|
|
@@ -38481,7 +38481,7 @@ module.exports = vectorFeature;
|
|
|
38481
38481
|
* @constant
|
|
38482
38482
|
* @type {string}
|
|
38483
38483
|
*/
|
|
38484
|
-
module.exports = "1.6.
|
|
38484
|
+
module.exports = "1.6.5";
|
|
38485
38485
|
|
|
38486
38486
|
/***/ }),
|
|
38487
38487
|
|