diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-03-08 11:43:08 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-03-08 11:43:08 +0100 |
| commit | 287e952592af81479a6f6e7962320891b5252ce6 (patch) | |
| tree | 70f11862f565987b29530c4aa89b5043af7042f7 /objects.js | |
| parent | 53f4378325f30728cceeae8d149d69a74ca5556e (diff) | |
| download | snap-yow-287e952592af81479a6f6e7962320891b5252ce6.tar.gz snap-yow-287e952592af81479a6f6e7962320891b5252ce6.zip | |
be less accurate with polygon creation
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3346,7 +3346,9 @@ SpriteMorph.prototype.drawLine = function (start, dest) { } else { var latlngs = window.polylines[this.myPolylineIndex].getLatLngs(); for (var j = 0; j < latlngs.length; j++) { - if (latlngs[j].distanceTo(destLatLng) < 0.1) { + // If a distance between two points is <= 1 meter, + // call them "the same" + if (latlngs[j].distanceTo(destLatLng) <= 1) { var polyLL = window.polylines[this.myPolylineIndex] .spliceLatLngs(j, latlngs.length) .concat([destLatLng]); |
