Class: dragElementHandler

BIM.UserModeHandler.Edit. dragElementHandler


new dragElementHandler()

Handles the interactive dragging of elements.

Author:
  • drajmarsh

Methods


handleDragEnd(host, handler, cursor, event) <static>

Updates the model after dragging selected element(s) has finished.

This method removes any interactive dimensions or snap point indicators from the scene overlay and checks if an element was dragged in to or out of a container element such as a space. If the dragged element was itself a space, it also initiates a check for any spatial overlap on the level. It then updates the user interface as required.

Parameters:
Name Type Description
host PD.SelectionManager

The selection manager.

handler BIM.UserModeHandler

The user interaction handler.

cursor PD.Cursor

The cursor that just finished moving.

event object

The DOM event that triggered the end of the move.

Returns:

Returns true if the move was finalised.

Type
boolean

handleDragMove(host, handler, newPos, cursor, event) <static>

Moves selected element(s) in the model as the 3D cursor is dragged.

Parameters:
Name Type Description
host PD.SelectionManager

The selection manager.

handler BIM.UserModeHandler

The user interaction handler.

newPos THREE.Vector3

The proposed new position of the cursor.

cursor PD.Cursor

The cursor that moved.

event object

The DOM event that triggered this move.

Returns:

Returns true if the move was applied.

Type
boolean

handleDragStart(host, handler, cursor, event) <static>

Prepares selected element(s) for an interactive drag event.

Parameters:
Name Type Description
host PD.SelectionManager

The selection manager.

handler BIM.UserModeHandler

The user interaction handler.

cursor PD.Cursor

The cursor that is about to move.

event object

The DOM event that triggered this move.

Returns:

Returns true if the move is allowed.

Type
boolean