{"action":"opened","issue":{"url":"https://api.github.com/repos/quarterto/Elessar/issues/94","labels_url":"https://api.github.com/repos/quarterto/Elessar/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/quarterto/Elessar/issues/94/comments","events_url":"https://api.github.com/repos/quarterto/Elessar/issues/94/events","html_url":"https://github.com/quarterto/Elessar/issues/94","id":92603156,"number":94,"title":"Conjoining conscutive ranges results in strange shifting of data","user":{"login":"web-engineer","id":230107,"avatar_url":"https://avatars.githubusercontent.com/u/230107?v=3","gravatar_id":"","url":"https://api.github.com/users/web-engineer","html_url":"https://github.com/web-engineer","followers_url":"https://api.github.com/users/web-engineer/followers","following_url":"https://api.github.com/users/web-engineer/following{/other_user}","gists_url":"https://api.github.com/users/web-engineer/gists{/gist_id}","starred_url":"https://api.github.com/users/web-engineer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-engineer/subscriptions","organizations_url":"https://api.github.com/users/web-engineer/orgs","repos_url":"https://api.github.com/users/web-engineer/repos","events_url":"https://api.github.com/users/web-engineer/events{/privacy}","received_events_url":"https://api.github.com/users/web-engineer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-02T10:18:06Z","updated_at":"2015-07-02T10:18:06Z","closed_at":null,"body":"I wrote a very simple handler to conjoin blocks after a timeout when they are consecutive (ie. to achieve the  affect of waiting a 1/2 second, assume the user wants one contiguous block now two)\r\n\r\nI'm using an integer based range representing minuites of an hour - if I have 3 or four single minuites with a minute gap at the end and two ranges eariler in the sequence then attempting to change the array of values using rangebar.val(myarray) results in some of the later ranges shifting.\r\n\r\nCalling val() as a getter returns an array different to the one that was set.\r\n\r\nCalling val with the array after a momentary timeout corrects the problem - this olny gets fixes if I've attempted to set the value twice?\r\n\r\nAcid test -\r\n\r\nWith a document open with jQuery and Elessar included in the head run the following in console -\r\n```\r\nvar rangeBar = RangeBar({\r\nvalues: [[0,14],[14,26],[40,41],[42,43],[44,45],[46,47],[48,49],[50,51]],\r\nreadonly: false, min: 0, max:51, snap: 1, minSize: 1,\r\nvalueFormat: function (n) { return Math.round(n); },\r\nvalueParse: function (n) { return Math.round(n); }});\r\n\t\t\t\t\t\t\r\n$('body').html(rangeBar.$el);\r\n\r\nrangeBar.val([[0,26],[40,41],[42,43],[44,45],[46,47],[48,49],[50,51]]);\r\n\r\nconsole.info(JSON.stringify(rangeBar.val()));\r\n```\r\noutput\r\n```\r\n[[0,26],[39,40],[41,42],[43,44],[45,46],[47,48],[50,51]]\r\n```\r\nWhich is not what we set it to! - range 45 to 46 was not in our previous call!\r\n\r\nThe fix is to set the value again after a small timeout (not immediate) and it corrects the display - but this feels super kludgy... any ideas appreciated? Great component otherwise.\r\n\r\nThe above was ran within my site which has some other stying to make it work - however - it still behaves the same on your own demo page with the adition of the bar and rangeclass properties - i.e. -\r\n\r\nhttp://blog.153.io/Elessar/\r\n\r\nOpen console and run -\r\n```\r\nvar rangeBar = RangeBar({\r\nvalues: [[0,14],[14,26],[40,41],[42,43],[44,45],[46,47],[48,49],[50,51]],\r\nreadonly: false, min: 0, max:51, snap: 1, minSize: 1, barClass: 'progress', rangeClass: 'bar',\r\nvalueFormat: function (n) { return Math.round(n); },\r\nvalueParse: function (n) { return Math.round(n); }});\r\n\r\n$('body').html(rangeBar.$el);\r\n\r\nrangeBar.val([[0,26],[40,41],[42,43],[44,45],[46,47],[48,49],[50,51]]);\r\n\r\nJSON.stringify(rangeBar.val());\r\n```\r\nyeilds\r\n```\r\n[[0,26],[39,40],[41,42],[43,44],[45,46],[47,48],[50,51]]\r\n```\r\nStill - we now have 39 to 40 in our range?\r\n\r\nAm I missing something? really kludgy fix is to run the same set value after a timeout of 1ms - that does fix things but has been my only way to make this work.\r\n\r\n"}}