Adds a given CSS class to the Component.
The CSS class to add.
Gets the Selection containing the
Will return undefined if the Component has not been anchored.
background selection for the Component
Gets whether the box is being shown.
Shows or hides the selection box.
Whether or not to show the box.
Computes and sets the size, position, and alignment of the Component from the specified values. If no parameters are supplied and the Component is a root node, they are inferred from the size of the Component's element.
Gets a Selection containing a
Will return undefined if the Component has not been anchored.
content selection for the Component
Gets the detection radius of the drag box in pixels.
Sets the detection radius of the drag box in pixels.
Gets the internal Interactions.Drag of the DragBoxLayer.
Enables or disables the interaction and drag box.
Gets the enabled state.
Gets the Selection containing the
Will return undefined if the Component has not been anchored.
Checks if the Component has a given CSS class.
The CSS class to check for.
Gets the height of the Component in pixels.
Gets whether or not the drag box is movable.
Sets whether or not the drag box is movable.
Removes a callback that would be called on anchoring the Component to the DOM. The callback is identified by reference equality.
Removes a callback to be called when the Component is detach()-ed. The callback is identified by reference equality.
Removes a callback to be called during dragging.
Removes a callback to be called when dragging ends.
Removes a callback to be called when dragging starts.
Adds a callback to be called on anchoring the Component to the DOM. If the Component is already anchored, the callback is called immediately.
Adds a callback to be called when the Component is detach()-ed.
Sets a callback to be called during dragging.
Sets a callback to be called when dragging ends.
Sets the callback to be called when dragging starts.
Sets a callback that gets called when the component resizes. The size change is not guaranteed to be reflected by the DOM at the time the callback is fired.
Gets the origin of the Component relative to its parent.
Gets the origin of the Component relative to the root
Gets the parent ComponentContainer for this Component.
Sets the parent ComponentContainer for this Component. An error will be thrown if the parent does not contain this Component. Adding a Component to a ComponentContainer should be done using the appropriate method on the ComponentContainer.
Causes the Component to re-layout and render.
This function should be called when a CSS change has occured that could influence the layout of the Component, such as changing the font size.
Removes a given CSS class from the Component.
The CSS class to remove.
Queues the Component for rendering.
Renders the Component to a given
A selector-string for the
Given available space in pixels, returns the minimum width and height this Component will need.
Gets whether or not the drag box is resizable.
Sets whether or not the drag box is resizable.
Gets the width of the Component in pixels.
Gets the x alignment of the Component.
Sets the x alignment of the Component.
The x alignment of the Component ("left"/"center"/"right").
Gets the data values backing the left and right edges of the box.
Returns an undefined array if the edges are not backed by a scale.
Sets the data values backing the left and right edges of the box.
Gets the x scale for this SelectionBoxLayer.
Sets the x scale for this SelectionBoxLayer.
Gets the y alignment of the Component.
Sets the y alignment of the Component.
The y alignment of the Component ("top"/"center"/"bottom").
Gets the data values backing the top and bottom edges of the box.
Returns an undefined array if the edges are not backed by a scale.
Sets the data values backing the top and bottom edges of the box.
Gets the y scale for this SelectionBoxLayer.
Sets the y scale for this SelectionBoxLayer.
Generated using TypeDoc
Constructs a DragBoxLayer.
A DragBoxLayer is a SelectionBoxLayer with a built-in Drag Interaction. A drag gesture will set the Bounds of the box. If resizing is enabled using resizable(true), the edges of box can be repositioned.