dnd-grid
dnd-grid copied to clipboard
Enhancement: Add posibility for the grid to be dragged around
It would be really cool if you could drag the grid itself and everything would move with it, also the pinned boxes.
This would be really useful on small screens so you can move the grid and get to the part where you want to be.
you could make it so that when doing this it just selects all boxes and drags multiple at once
You can nest multiple grids
<dnd-grid-container>
<dnd-grid-box></dnd-grid-box>
<dnd-grid-box></dnd-grid-box>
<dnd-grid-box>
<dnd-grid-container>
<dnd-grid-box></dnd-grid-box>
<dnd-grid-box>
<dnd-grid-container>
<dnd-grid-box></dnd-grid-box>
<dnd-grid-box></dnd-grid-box>
<dnd-grid-box></dnd-grid-box>
</dnd-grid-container>
</dnd-grid-box>
<dnd-grid-box></dnd-grid-box>
</dnd-grid-container>
</dnd-grid-box>
</dnd-grid-container>
Not really what I meant - I meant dragging the underlying grid itself, like the same mechanic you can when zoomed in in http://draw.io - you can drag around using the middle mouse button
That is out of scope of the dnd-grid-container, but a task for the parent component.
Something which dnd-grid-container could do maybe is allow negative coördinates and somehow centering on 0,0 - this way dragging could be implemented in dnd-grid-container or the parent
I really don't see which problems does this solve. Can you give some well explained examples ?
On small screens this would be an amazing feature, because overflowing boxes can still be at the pre-determined location only they will be offscreen until you scroll to them
As dattn already said, this is no feature for the dnd-grid-container but should be handled outside of the component. If you want to move your dnd-grid-container around then your parent component should handle the position of the dnd-grid-container. Another solution I could think of, is to nest your "moveable" dnd-grid-container into another dnd-grid-container to make it a moveable "box".