title: Visjs Dynamically Update a Timeline Item
body: <p>I'm using <a href="http://visjs.org/docs/timeline/" rel="nofollow noreferrer">visjs Timeline</a>, and I'm trying to have an item expanding from current time for a duration of 2 days.</p>
  
  <pre><code>var items = new vis.DataSet([{
    id = 0,
    start = moment(new Date()),
    end = moment(new Date()).add(2, 'days')
  }, /* And maybe more items */]);
  </code></pre>
  
  <p>When creating a new timeline:</p>
  
  <pre><code>var container = document.getElementById('container');
  var timeline = new vis.Timeline(container, items, null);
  </code></pre>
  
  <p>Now I want to update one of my items (say, the first one) so that it always starts from the current time. I thought that <code>currentTimeTick</code> would be a good place to update:</p>
  
  <pre><code>timeline.on('currentTimeTick', function() {
    var itemData = timeline.itemSet.items[0].data;
    itemData.start = moment();   // Set the start to current time
    timeline.itemSet.items[0].setData(itemData);
  }
  </code></pre>
  
  <p>When I debug in Chrome, I see that the start time in the items set is changed, but I'm not sure why the UI isn't updated to reflect that change (I expect the start of the item to match my current time).</p>
  
  <p>I went through the source code, and it seems to me that <code>setData</code> should cause a <code>redraw</code> on the timeline, but I don't think it's happening. When I drag the timeline, it causes a redraw and the item is sized accordingly. Do I need to do something to force a <code>redraw</code> here?</p>