You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ensure that dragged elements are in front of other elements (via canvas.installEditPolicy( new draw2d.policy.canvas.CanvasPolicy({onDragStart ). The event handler gets the figure as parameter on which you can call "toFront()" (see example)
programmatically add things to the canvas
enable zooming on mouse cursor (Alaa: … using setScrollArea … the canvas container needed to be absolute displayed too)
mid size things to try out
add elements by drag and drop, so one can drag a "window"-icon from a toolbar and drop on the canvas to add a "window"-element, like this.
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)…
One could also register a mouseup ("drop") on canvas, call the canvas document-to-canvas method and create an element there. This, however, needs to "remember" and signal to the draw-parts what was dragged (ideally NOT by a global variable…)
layout sub-elements like menu items, tabs, buttons in toolbar…
Add meaningful snaps: to top/left/right
This works with 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
add controls that allow to add e.g. a mock-tab in a mock-tabbar, a mock-menuentry in a mock-menu etc. This is pretty interesting, UX wise: Should there be standard elements like "menu" that have + and - controls to add "menu entries" when you click +? Or just horizontal and verticallayout children – you can drop stuff to add (also lots of menu entries, if you like)?
Bigger things to think about in general
Should we write the other parts of the UI (toolbars, object settings) in vue or try to do everything UI with draw2D?
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