diff --git a/CHANGELOG.md b/CHANGELOG.md index 337f7a5feb..4e63ecfeac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # GeoJS Change Log +## Version 1.6.5 + +### Bug Fixes + +- Fix spelling of collinear ([#1173](../../pull/1173)) + ## Version 1.6.4 ### Bug Fixes @@ -379,7 +385,7 @@ - Added an `object.geoIsOn` function to check if an event is bound ([#768](../../pull/768)) - Use the average perimeter for the center of a polygon or line ([#761](../../pull/761)) - Allow display to/from gcs conversion functions to handle arrays of points ([#766](../../pull/766)) -- When drawing a line annotation, don't create intermediate colinear points ([#759](../../pull/759)) +- When drawing a line annotation, don't create intermediate collinear points ([#759](../../pull/759)) - Improve exiting and reloading maps ([#750](../../pull/750)) - Various minor improvements ([#767](../../pull/767), [#760](../../pull/760)) diff --git a/examples/common/index.pug b/examples/common/index.pug index 094f1f893b..ee84117979 100644 --- a/examples/common/index.pug +++ b/examples/common/index.pug @@ -2,6 +2,7 @@ doctype html html(lang="en") head meta(charset="UTF-8") + meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no") link(rel="shortcut icon", href="data:image/x-icon;,", type="image/x-icon") title= title diff --git a/src/annotation.js b/src/annotation.js index 8c172244c4..d25dba37f4 100644 --- a/src/annotation.js +++ b/src/annotation.js @@ -1128,7 +1128,7 @@ function continuousVerticesProcessAction(m_this, evt, name) { return; } var cpp = layer.options('continuousPointProximity'); - var cpc = layer.options('continuousPointColinearity'); + var cpc = layer.options('continuousPointCollinearity'); var ccp = layer.options('continuousCloseProximity'); if (cpp || cpp === 0) { var vertices = m_this.options('vertices'); @@ -1140,7 +1140,7 @@ function continuousVerticesProcessAction(m_this, evt, name) { } var dist = layer.displayDistance(vertices[vertices.length - 2], null, evt.mouse.map, 'display'); if (dist && dist > cpp) { - // combine nearly colinear points + // combine nearly collinear points if (vertices.length >= (m_this._lastClickVertexCount || 1) + 3) { var d01 = layer.displayDistance(vertices[vertices.length - 3], null, vertices[vertices.length - 2], null), d12 = dist, diff --git a/src/annotationLayer.js b/src/annotationLayer.js index 49298ae4bb..bcb135aa15 100644 --- a/src/annotationLayer.js +++ b/src/annotationLayer.js @@ -21,9 +21,9 @@ var textFeature = require('./textFeature'); * @property {number} [continuousPointProximity=5] The minimum distance in * display coordinates (pixels) between two adjacent points when dragging * to create an annotation. `false` disables continuous drawing mode. - * @property {number} [continuousPointColinearity=1.0deg] The minimum angle + * @property {number} [continuousPointCollinearity=1.0deg] The minimum angle * between a series of three points when dragging to not interpret them as - * colinear. Only applies if `continuousPointProximity` is not `false`. + * collinear. Only applies if `continuousPointProximity` is not `false`. * @property {number} [continuousCloseProximity=10] The minimum distance in * display coordinates (pixels) to close a polygon or end drawing a line when * dragging to create an annotation. `false` never closes at the end of a @@ -135,8 +135,8 @@ var annotationLayer = function (arg) { // continuous drawing modes. continuousPointProximity: 5, // in radians, minimum angle between continuous points to interpret them as - // being coliner - continuousPointColinearity: 1.0 * Math.PI / 180, + // being collinear + continuousPointCollinearity: 1.0 * Math.PI / 180, continuousCloseProximity: 10, // in pixels, 0 is exact finalPointProximity: 10, // in pixels, 0 is exact showLabels: true, diff --git a/src/lineFeature.js b/src/lineFeature.js index 53d60f1d5d..fd90fea833 100644 --- a/src/lineFeature.js +++ b/src/lineFeature.js @@ -396,9 +396,9 @@ var lineFeature = function (arg) { * * @param {array} data A new data array. * @param {number} [tolerance] The maximum variation allowed in map.gcs - * units. A value of zero will only remove perfectly colinear points. If - * not specified, this is set to a half display pixel at the map's current - * zoom level. + * units. A value of zero will only remove perfectly collinear points. + * If not specified, this is set to a half display pixel at the map's + * current zoom level. * @param {function} [posFunc=this.style.get('position')] The function to * get the position of each vertex. * @param {function} [lineFunc=this.style.get('line')] The function to get diff --git a/src/polygonFeature.js b/src/polygonFeature.js index df9c375466..5ec51875ab 100644 --- a/src/polygonFeature.js +++ b/src/polygonFeature.js @@ -565,9 +565,9 @@ var polygonFeature = function (arg) { * * @param {array} data A new data array. * @param {number} [tolerance] The maximum variation allowed in map.gcs - * units. A value of zero will only remove perfectly colinear points. If - * not specified, this is set to a half display pixel at the map's current - * zoom level. + * units. A value of zero will only remove perfectly collinear points. + * If not specified, this is set to a half display pixel at the map's + * current zoom level. * @param {function} [posFunc=this.style.get('position')] The function to * get the position of each vertex. * @param {function} [polyFunc=this.style.get('polygon')] The function to diff --git a/src/util/common.js b/src/util/common.js index b630481b09..331dc8bd90 100644 --- a/src/util/common.js +++ b/src/util/common.js @@ -758,7 +758,7 @@ var util = { /** * Determine if two line segments cross. They are not considered crossing if * they share a vertex. They are crossing if either of one segment's - * vertices are colinear with the other segment. + * vertices are collinear with the other segment. * * @param {geo.geoPosition} seg1pt1 One endpoint of the first segment. * @param {geo.geoPosition} seg1pt2 The other endpoint of the first segment. @@ -788,7 +788,7 @@ var util = { } /* If the lines cross, the signed area of the triangles formed between one * segment and the other's vertices will have different signs. By using - * > 0, colinear points are crossing. */ + * > 0, collinear points are crossing. */ if (util.triangleTwiceSignedArea2d(seg1pt1, seg1pt2, seg2pt1) * util.triangleTwiceSignedArea2d(seg1pt1, seg1pt2, seg2pt2) > 0 || util.triangleTwiceSignedArea2d(seg2pt1, seg2pt2, seg1pt1) * @@ -834,7 +834,7 @@ var util = { * @param {geo.geoPosition[]} pts A list of points forming the line or * polygon. * @param {number} tolerance The maximum variation allowed. A value of zero - * will only remove perfectly colinear points. + * will only remove perfectly collinear points. * @param {boolean} [closed] If true, this is a polygon rather than an open * line. In this case, it is possible to get back a single point. * @param {Array.?} [noCrossLines] A falsy value to allow diff --git a/tests/cases/annotation.js b/tests/cases/annotation.js index 5eb7cc3777..cd0e47841c 100644 --- a/tests/cases/annotation.js +++ b/tests/cases/annotation.js @@ -1342,7 +1342,7 @@ describe('geo.annotation', function () { expect(ann.options('vertices').length).toBe(3); expect(ann.processAction(evt)).not.toBe(true); expect(ann.options('vertices').length).toBe(3); - // add a point that will be colinear with the next one + // add a point that will be collinear with the next one var halfway = { x: (vertices[1].x + vertices[2].x) / 2, y: (vertices[1].y + vertices[2].y) / 2 @@ -1363,8 +1363,8 @@ describe('geo.annotation', function () { mapgcs: map.displayToGcs(vertices[2], null) } }; - // a new colinear point will replace the previous point, so we still have - // the same point count + // a new collinear point will replace the previous point, so we still + // have the same point count expect(ann.processAction(evt)).toBe(true); expect(ann.options('vertices').length).toBe(4); // test up near the end of the line diff --git a/tests/gl-cases/svgStickyLayer.js b/tests/gl-cases/svgStickyLayer.js index b994180485..8a522ede67 100644 --- a/tests/gl-cases/svgStickyLayer.js +++ b/tests/gl-cases/svgStickyLayer.js @@ -53,7 +53,7 @@ describe('svgStickyLayer', function () { myMap.pan({x: 100, y: 100}); myMap.zoom(myMap.zoom() + 0.5); - // the image should be three points that are NOT colinear and are NOT all + // the image should be three points that are NOT collinear and are NOT all // the same size. Specifically, the black and blue circles should be lower // than the red circle, and the black circle should be larger than the red // and blue circles diff --git a/tutorials/common/index.pug b/tutorials/common/index.pug index 9d23c58c45..9d3e696a4b 100644 --- a/tutorials/common/index.pug +++ b/tutorials/common/index.pug @@ -64,6 +64,7 @@ doctype html html(lang="en") head meta(charset="UTF-8") + meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no") link(rel="shortcut icon", href="data:image/x-icon;,", type="image/x-icon") title GeoJS Tutorial - #{title}