Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions polysnapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function PolySnapper(opts){

var vertexMarker = _marker;
var snapable_polys = that.polys.filter( function(p){ return ( typeof p.snapable !== 'undefined' && p.snapable ) } );
var snapable_points = snapable_polys.map( function(p){ return p.getPath().getArray() } ).reduce(function(a,b){ return a.concat(b) }, []);
var snapable_points = snapable_polys.map( function(p){ return p.getPaths() } ).map(function(a){ return a.getArray().map(function(b){ return b.getArray() }).reduce(function(a,b){ return a.concat(b) }, []) }, []).reduce(function(a,b){ return a.concat(b) }, []);
var last_closeby = null;

//the official Drawing Manager will not work!
Expand Down Expand Up @@ -272,4 +272,4 @@ function PolySnapper(opts){

}

}
}