APIs

Show:

The timeline instance is created for each timeline in a campaign. It creates its UI, listens to timeline event selections, and holds a reference to its own timeline_id. The timeline instance also creates channel instances for all the channels it hosts and hold references to these channels via m_channels member.

Constructor

Timeline

() Object

Returns:

Object:

instantiated Timeline

Methods

_channelAdded

(
  • e
)

New channel was added to an existing timeline (most likely through the addition of a viewer (screen division) template editor)

Parameters:

  • e Event

_createTimelineUI

(
  • i_screenProps
)
!~YUIDOC_LINE~! var self = this;!~YUIDOC_LINE~!!~YUIDOC_LINE~! var screenTemplateData = !~YUIDOC_LINE~! orientation: BB.comBroker.getService(BB.SERVICES.ORIENTATION_SELECTOR_VIEW).getOrientation(),!~YUIDOC_LINE~! resolution: BB.comBroker.getService(BB.SERVICES.RESOLUTION_SELECTOR_VIEW).getResolution(),!~YUIDOC_LINE~! screenProps: i_screenProps,!~YUIDOC_LINE~! scale: '7'!~YUIDOC_LINE~!

Create the actual UI for this timeline instance. We use the ScreenTemplateFactory for SVG creation and insert the snippet onto timelineViewStack so the timeline UI can be presented when selected.

Parameters:

  • i_screenProps Object

    template properties object

Returns:

!~YUIDOC_LINE~! var self = this;!~YUIDOC_LINE~!!~YUIDOC_LINE~! var screenTemplateData = !~YUIDOC_LINE~! orientation: BB.comBroker.getService(BB.SERVICES.ORIENTATION_SELECTOR_VIEW).getOrientation(),!~YUIDOC_LINE~! resolution: BB.comBroker.getService(BB.SERVICES.RESOLUTION_SELECTOR_VIEW).getResolution(),!~YUIDOC_LINE~! screenProps: i_screenProps,!~YUIDOC_LINE~! scale: '7'!~YUIDOC_LINE~!:

none _createTimelineUI: function (i_screenProps) ;

var screenTemplate = new ScreenTemplateFactory({ i_screenTemplateData: screenTemplateData, i_type: ScreenTemplateFactory.VIEWER_SELECTABLE, i_owner: this});

var snippet = screenTemplate.create(); // var elemID = $(snippet).attr('id'); var divID1 = 'selectableScreenCollections' + .uniqueId(); var divID2 = 'selectableScreenCollections' + .uniqueId();

var snippetWrapper = '

';

$(Elements.SELECTED_TIMELINE).append(snippetWrapper);

var timelineViewStack = BB.comBroker.getService(BB.SERVICES.CAMPAIGN_VIEW).getTimelineViewStack(); $('#' + divID2).append($(snippet)); screenTemplate.selectablelDivision(); var view = new BB.View({el: '#' + divID1});

// if we are updating layout from ScreenLayoutEditorView (but actually creating a new Template layout) // we remove the previous Template Layout from DOM as well as its matching ScreenTemplateFactory instance if (self.m_stackViewID) { $('#' + self.m_stackViewID).remove(); self.m_screenTemplate.destroy(); } ;

self.m_screenTemplate = screenTemplate; self.m_stackViewID = timelineViewStack.addView(view); screenTemplate.activate(); },

_listenDatePicker

()

Listen to changes in timeline duration changes with respect to the scheduler

Returns:

none

_listenInputChange

()

Populate the timeline property

_listenInputChange

()

Update msdb when the timeline title has changed.

Returns:

none

_listenReset

()

Listen to reset of when switching to different campaign so we forget current state

_listenSchedDurationChange

()

Listen to changes in timeline duration changes with respect to the scheduler

Returns:

none

_listenSchedPriorityChange

()

Listen to changes in scheduler priority values

_listenSchedRepeatChange

()

Listen to when sched repeat on the carousel changed

_listenSchedStartTimeChange

()

Listen to changes in scheduler start time playback values

_listenViewerRemoved

()

Listen when a screen division / viewer inside a screen layout was deleted and if the channel is equal to my channel, dispose of self

_listenWeekdayChange

(
  • i_playerData
)
Number

Listen weekdays change in scheduler

Parameters:

  • i_playerData Number

Returns:

Number:

Unique clientId.

_onTimelineSelected

()

Listen to timeline selection events and populate the properties panel accordingly.

Returns:

none

_populateBoardTemplate

(
  • i_campaign_timeline_board_template_id
)

Load up the board template (screen divisions) for this timeline instance. In case sequencer is used, we push it to the sequencer, thus creating the thumbnail template inside the sequencer so this timeline can be selected. Scheduler future support.

Parameters:

  • i_campaign_timeline_board_template_id Number

Returns:

none

_populateChannels

()

Create a channel instance for every channel this timeline hosts

Returns:

none

_populateScheduler

(
  • i_timeline_id
)

Populate the Scheduler UI

Parameters:

  • i_timeline_id Number

_populateTimelineLength

()

Populate the timeline length in its properties box

_populateTimelinePlayMode

()

Populate the timeline depending if running with sequencer or scheduler

_reset

()

Reset current state

campaign_timeline_board_template_id

(
  • e
)

When a campaign_timeline_board_template is edited, modify its related UI (inside sequencer)

Parameters:

  • e Event

    template viewer ids

deleteTimeline

()

Delete this timeline thus also need to delete all of its related channels

Returns:

none

getChannelInstance

(
  • i_campaign_timeline_chanel_id
)
Object

The timeline hold references to all of the channels it creates that exist within it. The getChannelInstance returns a specific channel instance for a channel_id.

Parameters:

  • i_campaign_timeline_chanel_id Number

Returns:

Object:

Channel

getStackViewID

() Number

Return the view stack index this timeline occupies in the timelineViewStack manager.

Returns:

Number:

m_stackViewID getStackViewID: function () { var self = this; return self.m_stackViewID; },

initialize

()

Constructor

populateTimeline

()

Create the timeline and load up its template (screen divisions) UI

Returns:

none

Events

Timeline.CAMPAIGN_TIMELINE_SELECTED

final static

Custom event fired when a timeline is selected. If a timeline is not of the one selected, it ignores the event.

Event Payload:

  • caller This
  • context Self

    caller

  • timelineID Event

    of the timeline selected