jdittrich / quickMockup

HTML based interface mockups
https://jdittrich.github.io/quickMockup/
MIT License
518 stars 96 forks source link

Experiment with draw2D #46

Open jdittrich opened 4 years ago

jdittrich commented 4 years ago

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

mid size things to try out

Big things to try out in draw2D

Bigger things to think about in general

AlaaSarhan commented 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.

jdittrich commented 4 years ago

Some open questions around raft:

AlaaSarhan commented 4 years ago

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.

AlaaSarhan commented 4 years ago

first iteration of adding elements by drag&drop https://github.com/AlaaSarhan/quickMockup/pull/1

AlaaSarhan commented 4 years ago

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