Cannot drag shapes beyond initial window size
No matter what size I make the canvas, I am not able to move a shape beyond the initial window size. This can be seen with the "shape db" example found at https://freegroup.github.io/draw2d/index.html
This is controlled by the default RegionEditPolicy in Canvas, which is constructed with the canvas's initial size and won't allow movement beyond those bounds. To get around it, you could install a new RegionEditPolicy with different size constraints. Or, If you need your canvas to be resizable, you could call canvas.regionDragDropConstraint.setBoundingBox when the canvas is resized and pass in the new dimensions.
Hi, @gitgitwhat did you find the solution to this problem? Share it with me please if you find it
Hi, @gitgitwhat did you find the solution to this problem? Share it with me please if you find it
You can enlarge the canvas bejond the windows size. For example you should place the canvas in a div and give that div a veeeeery large size than you place an other div around that div.
<div id="some random size or window size" size="small size allow resize">
<div id ="canvas" size="very large">
</div>
</div>
It may be just a workaround, but it worked foe me.
Hi @InannaInai I did that and can scroll with the mouse wheel but if I cant to scroll while dragging and if use the wheel I will face that problem something like a lag between mouse position and event