This context provides methods to handle events in the quiz object scope.
Methods
-
<inner> addSource(component)
-
Adds a component as a draggable element.
Preconditions:
- The stated component may provide a onDragOver method.
Callback time point:
The component is dragged over a target component.
Received parameters:
- targetComponent: The target copmponent
- The stated component may provide a onDragOut method.
Callback time point:
The component is dragged out of a target component.
Received parameters:
- targetComponent: The target copmponent
- The stated component may provide a onDrop method.
Callback time point:
The component is dropped.
Received parameters:
- targetComponent: If the component is dropped on to a target component, otherwise null
Parameters:
Name Type Description component
Component A component.
- The stated component may provide a onDragOver method.
-
<inner> addTarget(component)
-
Adds a component as a drop target element to the current page context.
Preconditions:
- The stated component may provide a onDragOver method.
Callback time point:
A source component is dragged over the component.
Received parameters:
- sourceComponent: The source component
- The stated component may provide a onDragOut method.
Callback time point:
A source component is dragged out of the component.
Received parameters:
- sourceComponent: The source component
- The stated component may provide a onDrop method.
Callback time point:
A source component is dropped on to the component.
Received parameters:
- sourceComponent: The source component
Parameters:
Name Type Description component
Component A component.
- The stated component may provide a onDragOver method.
-
<inner> removeSource(component)
-
Removes a component as a draggable element.
Parameters:
Name Type Description component
Component A component.
-
<inner> removeTarget(component)
-
Removes a component as a drag target element.
Parameters:
Name Type Description component
Component A component.