dattn / dnd-grid

A vuejs grid with draggable and resizable boxes
307 stars 48 forks source link

Added drag events to container #30

Closed stanogurnik closed 6 years ago

stanogurnik commented 6 years ago

Adding drag events to container:

Specially drag:end event is useful when saving state of layout to server

stanogurnik commented 6 years ago

@dattn can you please look at this ?

dattn commented 6 years ago

There is already an "update:layout" event. Which could be used for layout saving ?

stanogurnik commented 6 years ago

Yes and no. Update layout is called every time some item is moved on grid, so simple drag of object generates x events (if item moves from x:1 -> x:5 it generates 5 events during this user action), but you want to save state when relevant - so when user stops dragging.

dattn commented 6 years ago

Ah, you are right.

dattn commented 6 years ago

Could you add the same/related events for resizing ?

stanogurnik commented 6 years ago

Sure :) will do during weekend, thanx

stanogurnik commented 6 years ago

@dattn can you please look at this ?

dattn commented 6 years ago

Sorry, i'm really busy at the moment. But your pull request looks good, I will release a new version today.