Closed edemaine closed 2 years ago
I mentioned here that things outside of my selected rectangle, often get deleted. Would fixing this issue (#87) help with that?
Yes, and work is in progress to fix this: see #183. (This is currently the highest-priority issue.)
Rectangular select uses
checkIntersection
but we could usegetIntersectionList
instead. Not sure whether it's faster though...Sadly, neither is supported on Firefox. https://github.com/thelonious/kld-intersections/ doesn't look easy to drop-in... have to duplicate entire DOM, and doesn't support transforms?
Chrome doesn't actually implement these correctly: you can select a rectangle, ellipse, or segment by selecting any rectangle that intersects their bounding box. ☹️ (Pen strokes work only because of the silly way we're currently rendering them.)
So maybe we should use
getIntersectionList
, if it's available, as a filter. Then check for actual intersection among those objects manually? An advantage of a manual check is that we can add an error threshold, especially useful for selecting objects without clicking on them exactly (formerly related: drag detection #109).getIntersectionList
only if availableWhen doing this, it would also make sense to do it in a way that supports polygon selection (#115), and line selection (#46).