summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index 868dc43..87ee8b7 100644
--- a/objects.js
+++ b/objects.js
@@ -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]);