Closed jadhavsuraj2207 closed 5 years ago
You can get a bounding rect (getBoundingClientRect) for node view (editor.view.nodes.get(node)
) and editor.view.container
and check the intersection
Example: https://github.com/retejs/area-plugin/blob/master/src/restrictor.js#L23
Hi, I want to restrict dragging of editor wrapper out of visible area. Rete create div which is in my wrapper div and has transform and scale property. when 'translate' event fire we get {transform,x,y}.
As in above image, how we can restrict the translate beyond the box. Is there any way to restrict the translating beyond the visible area. Thanks !!