EditMeasureComponent Class
Component allowing to edit 2D Measures when clicking on them.
Constructor
EditMeasureComponent
-
core
Parameters:
-
core
wnp.CoreWanaplan Core.
Item Index
Methods
Methods
destroy
()
destroyDialog
()
Destroys the measure edition dialog if it exists
disable
()
displacePoint
-
target_measure
-
displacement
-
angleWall
-
moveLeftUp
Function that applies the chosen displacement to the chosen measure extremity
Parameters:
-
target_measure
MeasureStructuremeasure to modify
-
displacement
Numberamount of displacement to apply (positive or negative)
-
angleWall
Numberthe angle of the wall vector with the x horizontal vector
-
moveLeftUp
Booleantrue if we want to move the point that is on the left for a horizonal measure, or on top for a vertical one
enable
()
getSideToMove
-
angleWall
-
moveLeftUp
Function to find out which side of the wall we want
Parameters:
Returns:
Returns 0 or 1 the index of the wanted extremity
getTargeted
-
vector
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
The targeted element, or null if nothing is found.
initialize
()
onClick
-
event
Destroys the measure edition dialog if click outside the dialog And opens the measure edition dialog if click on a measure Triggered on event click
Parameters:
-
event
EventThe JS event.
onContextChanged
-
context
Parameters:
-
context
StringThe new context