Open jdittrich opened 4 years ago
@jdittrich zooming to mouse cursor must be solved now in https://github.com/AlaaSarhan/quickMockup/commit/571f9659a62e0bf32e1f561a453e0e90df722bd6
you were correct about using setScrollArea
but another thing was missing.. the canvas container needed to be absolute
displayed too.
Some open questions around raft:
In current version (commit https://github.com/AlaaSarhan/quickMockup/commit/a6e9c0cca20acddec944c8b8f00875cb7ea3b3f5), I tried to implement a first version of quickMockup approach, in which an element would belong to the container it is dropped inside.
It works basically, but it seems to suffer from performance issues sometimes as well as some odd behavior in combination with toFront
.
Gotta give it a third try, probably with Raft-like approach of calculating contained elements on relevant events only, but unlike Raft, it would add them as children and remove them eventually when event is over.
first iteration of adding elements by drag&drop https://github.com/AlaaSarhan/quickMockup/pull/1
Or we basically only have rectangles that are duplicated and then "decorated" with special types like "window", "button", "layouting rectangle" (e.g. by having an on-context button that offers "decorations" on click)…
I'm starting to like this idea a lot, at least in concept.. thinking about it technically for now, perhaps I'll attempt to implement it soon
To make the code more clean and enable functions like zooming or snapping, we could use draw2Dtouch
@AlaaSarhan is doing some work on it
Small things to try out
canvas.installEditPolicy( new draw2d.policy.canvas.CanvasPolicy({onDragStart
). The event handler gets the figure as parameter on which you can call "toFront()" (see example)mid size things to try out
canvas.installEditPolicy(new draw2d.policy.canvas.
SnapToGeometryEditPolicy())
however, the lines are directly drawn on canvas, not over the elements, so on a raft they are drawn behind the raft.Big things to try out in draw2D
Bigger things to think about in general