Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Embedding Simile Timeline

    Hi,

    I'm trying to embed a simile timeline in a tab and I'm using a canvas with a div inside as container, like this:


    var timelineContainer = "<div id='divTimelineContainer' style='height: 390px;' class='timeline-default'></div>";

    var canvas = isc.Canvas.create({
    contents : timelineContainer
    });

    var timeline = isc.VLayout.create({
    margin : 10,
    showEdges : true,
    members : [ canvas ]
    });


    The VLayout is being set as the tab pane like this:

    tabSetContents.addTab({
    title : "Timeline",
    icon : "report.png",
    iconSize : 16,
    canClose : true,
    pane : timeline
    });
    tabSetContents.selectTab(tabSetContents.tabs.length - 1);
    timeline.initTimeline();

    Problem is, when initializing the timeline (timeline.initTimeline();), the container seems to not have been drawn yet, and document.getElementById("divTimelineContainer") returns null.
    How should the timeline be embedded?

    Thanks.
    Last edited by mands; 5th Mar 2012, 08:39.

    #2
    Use HTMLFlow:
    http://www.smartclient.com/docs/8.2/a/system/reference/SmartClient_Explorer.html#htmlFlow

    or HTMLPane:
    http://www.smartclient.com/docs/8.2/a/system/reference/SmartClient_Explorer.html#htmlPane

    Search the docs for HTMLPane or HTMLFlow for more details.

    http://www.smartclient.com/docs/8.2/a/b/c/go.html#


    FYI:
    instead of canvas use something like this:
    Code:
    isc.HTMLPane.create({
        height:390,
        contents"<div id='divTimelineContainer' style='height: 390px;' class='timeline-default'></div>"
    })

    Comment

    Working...
    X