{"action":"created","issue":{"url":"https://api.github.com/repos/almende/vis/issues/541","labels_url":"https://api.github.com/repos/almende/vis/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/almende/vis/issues/541/comments","events_url":"https://api.github.com/repos/almende/vis/issues/541/events","html_url":"https://github.com/almende/vis/issues/541","id":53550693,"number":541,"title":"setwindow doesn't always, well, set ;)","user":{"login":"jmls","id":929523,"avatar_url":"https://avatars.githubusercontent.com/u/929523?v=3","gravatar_id":"","url":"https://api.github.com/users/jmls","html_url":"https://github.com/jmls","followers_url":"https://api.github.com/users/jmls/followers","following_url":"https://api.github.com/users/jmls/following{/other_user}","gists_url":"https://api.github.com/users/jmls/gists{/gist_id}","starred_url":"https://api.github.com/users/jmls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmls/subscriptions","organizations_url":"https://api.github.com/users/jmls/orgs","repos_url":"https://api.github.com/users/jmls/repos","events_url":"https://api.github.com/users/jmls/events{/privacy}","received_events_url":"https://api.github.com/users/jmls/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/almende/vis/labels/issue","name":"issue","color":"d4c5f9"},{"url":"https://api.github.com/repos/almende/vis/labels/Timeline","name":"Timeline","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-06T19:10:24Z","updated_at":"2015-02-10T10:47:17Z","closed_at":null,"body":"I have a button the applies \"max zoom\" (meant to be to 1 minute).  this is function call that is uses:\r\n\r\n```javascript\r\n$scope.zoomMax = function() {\r\n  \t\tsetTimeLine(moment().subtract(30,\"seconds\"),\r\n  \t\t\t\t\tmoment().add(30,\"seconds\"));\r\n  \t}\r\n\r\n  \tfunction setTimeLine(startTime,endTime) {\r\n  \t\t$scope.timeline.setWindow({\r\n            start: startTime.format(),\r\n            end:   endTime.format()\r\n        });\r\n\r\n        console.log(\"start\",startTime.format(),\"window start\",$scope.timeline.getWindow().start.valueOf())\r\n        console.log(\"end\",endTime.format(),\"window end\",$scope.timeline.getWindow().end.valueOf())\r\n\r\n        $scope.timeline.redraw()\r\n  \t}\r\n```\r\n\r\nas you can see from the dev console , there are some problems\r\n```html\r\n#1\r\ntimelineController.js:152 start 2015-01-06T19:03:37+00:00 window start 1420569246886\r\ntimelineController.js:153 end 2015-01-06T19:04:37+00:00 window end 1420572846886\r\n\r\n#2\r\ntimelineController.js:152 start 2015-01-06T19:03:51+00:00 window start 1420570620913\r\ntimelineController.js:153 end 2015-01-06T19:04:51+00:00 window end 1420571499361\r\n````\r\n\r\nso in this case I had to push the button twice ... @ 19:03 window start and end did not match the formatted strings. @ 19:04 they did\r\n\r\nthis is not consistent. sometimes I have to press the button 3 or 4 times before the error ocurrs"},"comment":{"url":"https://api.github.com/repos/almende/vis/issues/comments/73679726","html_url":"https://github.com/almende/vis/issues/541#issuecomment-73679726","issue_url":"https://api.github.com/repos/almende/vis/issues/541","id":73679726,"user":{"login":"josdejong","id":568626,"avatar_url":"https://avatars.githubusercontent.com/u/568626?v=3","gravatar_id":"","url":"https://api.github.com/users/josdejong","html_url":"https://github.com/josdejong","followers_url":"https://api.github.com/users/josdejong/followers","following_url":"https://api.github.com/users/josdejong/following{/other_user}","gists_url":"https://api.github.com/users/josdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/josdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josdejong/subscriptions","organizations_url":"https://api.github.com/users/josdejong/orgs","repos_url":"https://api.github.com/users/josdejong/repos","events_url":"https://api.github.com/users/josdejong/events{/privacy}","received_events_url":"https://api.github.com/users/josdejong/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T10:47:17Z","updated_at":"2015-02-10T10:47:17Z","body":"hm, I think I misunderstood the issue. \r\n\r\nIsn't the problem here that `setWindow` starts an animation to move to the new start and end? The *final* start and end are not immediately applied as the Timeline moves to the final start/end via animation. "}}