Group and ungroup entitys; create a bespoke drag-drop UX
Use drag action to create a selection group.
Selection group is draggable after creation.
Click outside the selection group to remove it.
To note: Javascript is not running in this browser environment. Our apologies, but this demo has not yet been updated to support progressive enhancement.
Test purpose
- Create a set of Block entitys spread randomly across the canvas, in their own group
- Create an addition Block, in its own group, to handle box selection and movement; make the block sensitive to mouse hover (and touch) actions
- Create functions to handle mouse down, move and up actions
- If no selection, or mouse down occurs outside selection, create a new selection as user drags the cursor across the canvas
- If mouse down occurs inside the selection, move the selection and its box as user drags the cursor across the canvas
- When selected, check that those entitys are fully opaque and animated (by delta roll)
- When not selected, check that those entitys are translucent and stationary
- When user hovers mouse over selection, check that the selection box border changes and the cursor changes to a grab hand
Touch test: not required
Annotated code