jdittrich / quickMockup

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

v2: represent element as soon as drag enters canvas #64

Open jdittrich opened 4 years ago

jdittrich commented 4 years ago

Story: As a user I want to know how the element I will add is like so I can drop it at the right place

Current State: We drag a HTML rectangle of consistent size for each element, how it actually is like is only seen later.

jdittrich commented 4 years ago

related: #63 ("v2 code quality: Event initialization is messy, needs lots of files to be touched")

jdittrich commented 4 years ago

Note: …I try with canvas.onDragEnter but so far, I did not get the event handler called when I drag the "usual" jquery element from the outside (aka sidebar). Maybe I need to use the normal draggable of jQueryUI on the canvas and then create an element.

jdittrich commented 4 years ago

…another way would be just using plain "mouseenter" and checking if the current drag is of the right kind aka dragging an QuickMocukup UI-Element.