Class for a drag surface for the currently dragged block. This is a separate SVG that contains only the currently moving block, or nothing.
Containing element.
Clear the group and hide the surface; move the blocks off onto the provided element. If the block is being deleted it doesn't need to go back to the original surface, since it would be removed immediately during dispose.
Optionalopt_newSurface: ElementSurface the dragging blocks should be moved to, or null if the blocks should be removed from this surface without being moved to a different surface.
Create the drag surface and inject it into the container.
Get the current blocks on the drag surface, if any (primarily for BlockSvg.getRelativeToSurfaceXY).
Drag surface block DOM element, or null if no blocks exist.
Provide a reference to the drag group (primarily for BlockSvg.getRelativeToSurfaceXY).
Drag surface group element.
Reports the surface translation in scaled workspace coordinates. Use this when finishing a drag to return blocks to the correct position.
Current translation of the surface.
Gets the translation of the child block surface This surface is in charge of keeping track of how much the workspace has moved.
The amount the workspace has been moved.
Set the SVG blocks on the drag surface's group and show the surface. Only one block group should be on the drag surface at a time.
Block or group of blocks to place on the drag surface.
Translate and scale the entire drag surface group to the given position, to keep in sync with the workspace.
X translation in pixel coordinates.
Y translation in pixel coordinates.
Scale of the group.
Translates the entire surface by a relative offset.
Horizontal offset in pixel units.
Vertical offset in pixel units.
Translate the entire drag surface during a drag. We translate the drag surface instead of the blocks inside the surface so that the browser avoids repainting the SVG. Because of this, the drag coordinates must be adjusted by scale.
X translation for the entire surface.
Y translation for the entire surface.
Fake class which should be extended to avoid inheriting static properties