abstract class
Sidebar
extends Drawable
Sidebar where band headers are displayed.
- Properties
- background, clippedWidth, data, opened, timeline, width
- Methods
- constructor, addMutationListener, beforeDraw, close, createAnimatableProperty, disconnectedCallback, drawContent, drawOverlay, drawUnderlay, open, removeMutationListener, reportMutation, toggle
- Extended by
- DefaultSidebar
Properties
- backgroundgetset
Background style of the entire sidebar.
- Type:
-
FillStyle
- Default value:
- 'white'
- clippedWidthget
While a sidebar animation is underway (transitioning from open to closed, or vice versa), this represents the current width instead of the target width.
- Type:
-
number
- datagetset
Arbitrary data. For example an identifier of a backend system.
- Type:
-
any
- openedget
Returns whether the sidebar is currently opened.
- Type:
-
boolean
- Default value:
- true
- timelineget
Timeline instance that this instance is bound to.
- Type:
-
Timeline
- widthgetset
Pixel width of this sidebar.
- Type:
-
number
- Default value:
- 200
Methods
- constructor(timeline)
- Parameters:
-
-
Timeline
timelineTimeline instance that this instance is bound to.
-
- addMutationListener(mutationListener)
Adds a listener that is notified whenever one of the properties changes.
This method is used by the Timeline instance to detect when to redraw the Canvas.
- Parameters:
-
-
() => void
mutationListener
-
- Return type:
void
- beforeDraw(g)
Gets called before any of the draw methods.
- Parameters:
-
-
Graphics
g
-
- Return type:
void
- close()
Close the sidebar.
- Return type:
void
- createAnimatableProperty(value)
Creates an animatable property.
Animatable properties apply easing over time between numeric value changes.
- Parameters:
-
-
number
value –
-
- Return type:
AnimatableProperty
- disconnectedCallback()
Called when this drawable is removed from its Timeline
- Return type:
void
- drawContent(g)
Draw regular content.
- Parameters:
-
-
Graphics
g
-
- Return type:
void
- drawOverlay(g)
Gets called after regular content is drawn. Override this if you need a top layer.
- Parameters:
-
-
Graphics
g
-
- Return type:
void
- drawUnderlay(g)
Gets called before regular content is drawn. Override this if you need a bottom layer.
- Parameters:
-
-
Graphics
g
-
- Return type:
void
- open()
Open the sidebar.
- Return type:
void
- removeMutationListener(mutationListener)
Remove a previously added mutation listener.
- Parameters:
-
-
() => void
mutationListener
-
- Return type:
void
- reportMutation()
Mark this Drawable as dirty. This method is intended for use in subclasses and should be called in the implementation of set accessors.
- Return type:
void
- toggle()
Close the sidebar if it is currently opened, else open it.
- Return type:
void