RoomlePlannerUiCallback.Internal.ExternalObjectUiCallback
planner-core/src/roomle-planner-ui-callback.internal.ExternalObjectUiCallback
Implemented by
Table of contents
Methods
Methods
onChangedExternalObjectGroupPlan
▸ onChangedExternalObjectGroupPlan(group): void
“onChangedExternalObjectGroupPlan” is invoked when a group of root modules is moved or rotated to a new position or when the plan itself is changed. The group with the ID "group.id" is moved to the new position and orientation defined in "group".
Parameters
Returns
void
onDeleteExternalObjectGroup
▸ onDeleteExternalObjectGroup(groupIdToDelete): void
"onDeleteExternalObjectGroup" is invoked when a group of root modules and all the root modules it contains are deleted. The group with the ID "groupIdToDelete" is removed from the plan and is completely deleted.
Parameters
groupIdToDelete
string
The ID of the group of root modules.
Returns
void
onDeleteExternalObjectRootModule
▸ onDeleteExternalObjectRootModule(remainingGroup, rootModuleIdToDelete, splitOffGroups?): void
"onDeleteExternalObjectRootModule" is invoked when a root module is deleted from a group of root modules. The root module with the ID "rootModuleIdToDelete" is removed from the group with the ID "group.id" and is completely deleted. "group" contains the information about the group and the remaining root modules. If removing the root module results in a group of root modules being split into two or more groups, "splitGroups" contains the information about the new groups and root modules. This callback is not be called when the solely remaining root module of a group is deleted. In this case, "onDeleteExternalObjectGroup" is called.
Parameters
rootModuleIdToDelete
string
The ID of the root module.
Returns
void
onDeleteExternalObjectSubModule
▸ onDeleteExternalObjectSubModule(rootModuleId, subModuleIdToDelete): void
"onDeleteExternalObjectSubModule" is invoked when a sub module is deleted from a root module. The sub module with the ID "subModuleIdToDelete" is removed from the root module with the ID "rootModuleId" and is completely deleted.
Parameters
rootModuleId
string
The ID of the root module.
subModuleIdToDelete
string
The ID of the sub module.
Returns
void
onDuplicateExternalObjectGroup
▸ onDuplicateExternalObjectGroup(sourceGroupId, newGroupPosition): void
"onDuplicateExternalObjectGroup" is invoked when a group of root modules is duplicated. This event request generating a completely new group with the an new root modules with exactly the same structure as the group wih the ID "sourceGroupId". The new group is placed at the position and orientation defined in "newGroupPosition".
Parameters
sourceGroupId
string
The ID of the source group of root modules.
Returns
void
onExternalObjectAttributeChanged
▸ onExternalObjectAttributeChanged(groupId, moduleIds, attributeId, value): void
"oneExternalObjectAttributeChanged" is invoked when an attribute of a root module or sub module has changed. The attribute with the ID "attributeId" of the sub module with the ID "subModuleId" of the root module with the ID "rootModuleId" has the new value "value". If "subModuleId" is "null", an attribute of the root module has changed.
Parameters
groupId
string
-
attributeId
string
The ID of the attribute.
value
string
The new value of the attribute.
Returns
void
onExternalObjectEnvironmentChanged
▸ onExternalObjectEnvironmentChanged(affectedGroupIds): void
"onExternalObjectEnvironmentChanged" is invoked when the plan (walls, doors, windows, etc.) has changed. "affectedGroupIds" contains the IDs of all groups of root modules that are affected by the change.
Parameters
affectedGroupIds
string[]
The IDs of the groups of root modules that are affected by the change.
Returns
void
onExternalObjectGroupArrangementChanged
▸ onExternalObjectGroupArrangementChanged(changedGroup): void
"onExternalObjectGroupArrangementChanged" is invoked when the arrangement (position and rotation) of the root modules of a group has changed . "changedGroup" contains the information about the root modules of the group.
Parameters
Returns
void
onExternalObjectGroupChanged
▸ onExternalObjectGroupChanged(stringifiedGroupData): void
"onExternalObjectGroupChanged" is invoked when the modules of a group itself have changed. This can be the case in relation with undo/redo operations. "stringifiedGroupData" contains the complete information about the group and the root modules.
Parameters
stringifiedGroupData
string
The group data as string.
Returns
void
onExternalObjectGroupLoaded
▸ onExternalObjectGroupLoaded(stringifiedGroupData): void
onExternalObjectGroupLoaded is invoked when an external object is loaded from a plan.
Parameters
stringifiedGroupData
string
The group data as string.
Returns
void
onExternalObjectModuleSelected
▸ onExternalObjectModuleSelected(groupId, rootModuleId, subModuleId): void
"onExternalObjectModuleSelected" is invoked when the selection has been changed by and user interaction and a group, a root module or a sub module is selected.
Parameters
groupId
string
The ID of the group of root modules.
rootModuleId
string
The ID of the root modules. Is null if a group is selected.
subModuleId
string
The ID of the sub module. Is null if a group or a root module is selected.
Returns
void
onExternalObjectSelectionCancel
▸ onExternalObjectSelectionCancel(reason): void
"onExternalObjectSelectionCancel" is invoked when the selection of a group, root module or sub module is canceled.
Parameters
Returns
void
onGetConfigurationForExternalObject
▸ onGetConfigurationForExternalObject(id): Promise<ExternalObjectGroup>
"onExternalObjectGroupSelected" is invoked when the SDK needs the configuration to a certain ID the implementor of this callback should return the configuration as a JSON.
Parameters
id
string
id of the external object to which the configuration should be retrieved
Returns
Promise<ExternalObjectGroup>
onMergeExternalObjectGroup
▸ onMergeExternalObjectGroup(targetGroup, idsOfGroupsMerged, idOfTargetRootModule): void
"onMergeExternalObjectGroup" is invoked when a group of root modules is merged into another group of root modules. The group with the ID "sourceGroupId" is merged into the group with the ID "targetGroup.id". The root modules of the source group are added to the target group and the soured group does no longer exist. "targetGroup" contains information about all root modules of the target group (both present and new) and their relative position and orientation. "idsOfGroupsMerged" are the IDs of the groups whose modules must be merged into the target group and therefore the groups that must be deleted.
Parameters
idsOfGroupsMerged
string | string[]
The IDs of the groups merged into the target group.
idOfTargetRootModule
string
The ID of the root module which is the target of the merge operation.
Returns
void
onMovedExternalObjectGroup
▸ onMovedExternalObjectGroup(group): void
Deprecated
and replaced by “onChangedExternalObjectGroupPlan”.
Parameters
Returns
void
onSplitExternalObjectGroup
▸ onSplitExternalObjectGroup(splitGroup, newGroupedRootModules): void
"onSplitExternalObjectGroup" is invoked when one or more root modules are split from a group of root modules. The split root modules form a new group, which must be assigned a new ID. "originalGroup" contains the information about the original group and the remaining root modules. "newGroupedRootModules" contains the location and orientation of the new groups and root modules that have been split off.
Parameters
Returns
void
Last updated