Closed sweco-sefaed closed 3 years ago
Tested with latest origo-map/origo , does what it says on the tin : )
The only really tiny thing I noticed was that if you init the plugin with var multiselect = Multiselect({ lineBufferFactor: 0 })
or a negative number it will crash (when line-selecting).
let lineBufferFactor = Object.prototype.hasOwnProperty.call(options, 'lineBufferFactor') ? options.lineBufferFactor : 1; if (lineBufferFactor <= 0) { lineBufferFactor = 1; }
seems to fix it and can probably be written prettierly :) It's uncertain if even needed because using a minus BufferFactor seems counterintuitive. I suppose someone might try 0 though. It depends a bit on the given documentation.
All lineBufferFactor values below 1 will now force it to 1. Recommended values would be 2 or 3.
Fixes #5
Line has a buffer which it uses to compare versus intersecting points. The line buffer factor can be specified when initialized with the Origo map.