draw2d icon indicating copy to clipboard operation
draw2d copied to clipboard

Snap to grid on multiple objects

Open ArthurDavis opened this issue 5 years ago • 4 comments

When selecting multiple objects and moving them, these objects no longer snap to grid. Is it possible to extend this policy to a group selection?

ArthurDavis avatar Jun 21 '19 13:06 ArthurDavis

is this ticket still relevant?...if yes I can start to implement a policy to support this feature

freegroup avatar Feb 27 '20 08:02 freegroup

is this ticket still relevant?...if yes I can start to implement a policy to support this feature

yes !! This is powerful draw2d.

ucandoit1010 avatar Mar 03 '20 00:03 ucandoit1010

Hi @freegroup did you implement the policy?

Samanoova avatar Jan 12 '21 09:01 Samanoova

Hey, I hit this. When user selects multiple instances and drags, then draw2D crashes. I have a snapToGrid policy.

Crash message:

RangeError: Maximum call stack size exceeded
    at Class.getStartPosition (draw2d.js:9013:46)
    at prototype.<computed> [as getStartPosition] (eval at ./node_modules/script-loader/addScript.js.module.exports (draw2d.js:3671:9), <anonymous>:79:26)
    at Class.halfRoute (draw2d.js:22872:23)
    at Class.route (draw2d.js:22845:12)
    at prototype.<computed> [as route] (eval at ./node_modules/script-loader/addScript.js.module.exports (draw2d.js:3671:9), <anonymous>:79:26)
    at Class.calculatePath (draw2d.js:43336:17)
    at Class.calculatePath (draw2d.js:8802:10)
    at prototype.<computed> [as calculatePath] (eval at ./node_modules/script-loader/addScript.js.module.exports (draw2d.js:3671:9), <anonymous>:79:26)
    at Class.repaint (draw2d.js:43351:12)
    at prototype.<computed> [as repaint] (eval at ./node_modules/script-loader/addScript.js.module.exports (draw2d.js:3671:9), <anonymous>:79:26)

28raining avatar Jan 09 '23 01:01 28raining