fiona0914 / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

Millisecond/Second Bands don't even come close to staying in sync #454

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make two bands, Millisecond and Second
2. Sync the second with the millisecond
3. Try dragging

What is the expected output? What do you see instead?

Bands don't even come close to staying in sync.

What version of the product are you using? On what browser and what
operating system?

http://static.simile.mit.edu/timeline/api-2.3.0/timeline-api.js?bundle=true
Tested w/ FF 7.0.1, Chrome Latest (14), IE8

Please provide any additional information below.

Repo HTML:
<html><head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <script src="http://static.simile.mit.edu/timeline/api-2.3.0/timeline-api.js?bundle=true" type="text/javascript"></script>
    <script type="text/javascript">
    var tl;
    function onLoad()   {
        var bandInfos = [
            Timeline.createBandInfo({
                width:          "50%", 
                intervalUnit:   Timeline.DateTime.MILLISECOND, 
                intervalPixels: 50,
            }),
            Timeline.createBandInfo({
                width:          "50%", 
                intervalUnit:   Timeline.DateTime.SECOND, 
                intervalPixels: 750,
            })
        ];
        bandInfos[1].syncWith = 0;
        bandInfos[1].highlight = true;
        tl = Timeline.create(document.getElementById("TIMELINE"), bandInfos);
    }

    var resizeTimerID = null;
    function onResize()     {
        if (resizeTimerID == null) {
            resizeTimerID = window.setTimeout(function() {
                resizeTimerID = null;
                tl.layout();
            }, 500);
        }
    }
    </script>
</head>
<body onload="onLoad();" onresize="onResize();"><div id="TIMELINE" 
style="height: 150PX; border: 1px solid #aaa"></div></body></html>

Original issue reported on code.google.com by t...@ritter.vg on 11 Oct 2011 at 11:30