-
Notifications
You must be signed in to change notification settings - Fork 5
src.core.views.track view
#TrackView (module)
View controller for Tracks.
Usage:
var TrackView = require('path/to/module/track-view.js');
##TrackView::duration (read-write Property)
Duration of the current media. Replicated here for speed and to avoid conflicts. When set, update is bubbled to TrackEvent children.
@return [ Number ]
##TrackView::element (read-only Property)
DOM element controlled by this TrackView.
@return [ DOMElement ]
##TrackView::id (read-only Property)
Identifier for this TrackView.
@return [ String ]
##TrackView::parent (read-write Property)
Parent container (Media in timeline module). When this property is set, UI initialization may occur.
@return [ Object ]
##TrackView::track (read-only Property)
Track object represented by this TrackView.
@return [ Track ]
##TrackView::addTrackEventGhost (public member function)
Adds the ghost object to the DOM as a child of the DOM element controlled by this TrackView. Note that no TrackEvent functionality is meant to be attached to the ghost object. It is purely a visual assistant.
- ghost [ Object ]: Ghost obejct to add.
Usage:
t.addTrackEventGhost(ghost);
##TrackView::findOverlappingTrackEvent (public member function)
Find overlapping TrackEvents by comparing left and right pixel boundaries.
- trackEventView [ TrackEventView ]: TrackEventView object to use for comparison with other TrackEventViews on this TrackView object.
- leftValue [ Number ]: When supplied TrackEventView's element cannot provide a bounding rect, this value is used to establish a left boundary.
- widthValue [ Number ]: When supplied TrackEventView's element cannot provide a bounding rect, this value is used to establish a right boundary.
@return [ TrackEvent ]
Usage:
t.findOverlappingTrackEvent(trackEventView, leftValue, widthValue);
##TrackView::removeTrackEventGhost (public member function)
Removes a ghost object from this TrackView.
- ghost [ Object ]: Ghost obejct to remove.
Usage:
t.removeTrackEventGhost(ghost);
##TrackView::setupDroppable (private member function)
Prepares this TrackView to be droppable. Elements from the plugin tray can be dragged onto this TrackView and turned into corresponding TrackEvents. TrackEventView objects can also be dropped which changes their ownership.
@dispatch: trackeventdropped When a TrackEventView object is dropped on this TrackView.
@dispatch: plugindropped When a plugin element is dropped (from the plugin tray).
Usage:
setupDroppable();