FloorController Class
A remote control to interact with the floors.
Constructor
FloorController
-
core
Parameters:
-
core
CoreWanaplan Core.
Item Index
Methods
Methods
buildHTML
()
Builds the HTML code for the component.
destroy
()
disable
()
duplicateForFloor
-
options
Duplicates the current floor with the duplication rules chosen by the user.
options["walls"] = true => Keep the wall. options["objects"] = true => Keep the objects. etc...
Parameters:
-
options
ObjectThe different options set by the user.
enable
()
getTargeted
-
vector
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
initialize
()
insertFloorBefore
-
floorIndex
-
beforeIndex
Inserts a floor before another.
For instance, you can move the 4th floor to the 1st floor, This will shift up every floor after the current 1st one, including the 1st.
onAddItemClick
-
event
Opens a new window allowing to add a new floor and choose properties to clone from the floor below.
Triggered on click
on the "+" HTML element.
Parameters:
-
event
EventThe object associated with the event.
onAddItemConfirm
-
event
-
options
Adds a new floor while duplicating the properties specified in the options.
Triggered on click
on the add button of the duplication window.
onContextChanged
-
context
Parameters:
-
context
StringThe new context
onContextMenuPropertyChanged
-
target
-
property
-
value
Triggered when a floor property is changed in a context menu.
Parameters:
-
target
FloorStructureThe floor object.
-
property
StringThe property to change.
-
value
NumberThe new value of the property.
onItemClick
-
event
Selects a chosen floor.
Triggered on event click
on the floor html element.
Parameters:
-
event
EventThe object associated to the event.
onItemContextMenu
-
event
Shows a context menu to change the floor parameters
Triggered on event click
on the "i" inside the floor html element.
Parameters:
-
event
EventThe object associated to the event.
onItemDelete
-
event
Deletes a floor.
Triggered on click
on the "x" inside the floor html element.
Parameters:
-
event
EventThe associated event.
removeHTML
()
Removes the HTML code for the component.
startListening
()
stopListening
()
update
()
updateHTML
()
Updates the HTML element of the remote control.
Triggered on event wnp.structure.locale.loaded
Properties
structure
wnp.Structure
Events
wnp.request.floorAdded
Fired when a floor needs to be added.
wnp.request.floorDeleted
Fired when a floor needs to be deleted.
wnp.request.floorSelected
Fired when a floor needs to be selected.
wnp.request.floorSelected
Fired when a floor needs to be selected.