sdk
sdk copied to clipboard
Handle moving blocks around using keyboard and arrows on canvas
RIght now, the blocks can only be moved using the layers in left panel. TO simplifies the process of moving blocks, we need a way to allow users to do so right from canvas.
We show a floating block actions on the selected block.
We can utilise this and add additonal actions to move the blocks around.
Showing Arrows:
- Add a separator next to last icon to highlight that these are special/different actions.
- detect the layout (vertical/horizontal) of the selected block parent block. Default to
vertical - SHow the up/down arrow -
if blocks canMoveis true. Else. hide the arrows. - Clicking on the icon should move the block similar to the drag and drop experience in sidepanel.
- maintain the selection of block after the move action.