Browse Source

Merge remote-tracking branch 'origin/develop' into develop

codeClimate
Alex de Mulder 8 years ago
parent
commit
42b746255e
5 changed files with 17 additions and 0 deletions
  1. +1
    -0
      HISTORY.md
  2. +6
    -0
      docs/graph2d/index.html
  3. +5
    -0
      docs/timeline/index.html
  4. +1
    -0
      lib/timeline/component/CurrentTime.js
  5. +4
    -0
      test/timeline.html

+ 1
- 0
HISTORY.md View File

@ -6,6 +6,7 @@ http://visjs.org
### Timeline
- Implemented `currentTimeTick` event (see #1683).
- Fixed #1630: method `getItemRange` missing in docs.
### Graph2d

+ 6
- 0
docs/graph2d/index.html View File

@ -1304,6 +1304,12 @@ Graph2d.off('rangechanged', onChange);
<th>Properties</th>
<th>Description</th>
</tr>
<tr>
<td>currentTimeTick</td>
<td>Fired when the current time bar redraws. The rate depends on the zoom level.</td>
</tr>
<tr>
<td>click</td>
<td>

+ 5
- 0
docs/timeline/index.html View File

@ -1348,6 +1348,11 @@ timeline.off('select', onSelect);
<th>Description</th>
</tr>
<tr>
<td>currentTimeTick</td>
<td>Fired when the current time bar redraws. The rate depends on the zoom level.</td>
</tr>
<tr>
<td>click</td>
<td>

+ 1
- 0
lib/timeline/component/CurrentTime.js View File

@ -129,6 +129,7 @@ CurrentTime.prototype.start = function() {
if (interval > 1000) interval = 1000;
me.redraw();
me.body.emitter.emit('currentTimeTick');
// start a renderTimer to adjust for the new time
me.currentTimeTimer = setTimeout(update, interval);

+ 4
- 0
test/timeline.html View File

@ -216,6 +216,10 @@
items.on('update', console.log.bind(console));
items.on('remove', console.log.bind(console));
timeline.on('currentTimeTick', function () {
console.log('currentTimeTick')
});
// timeline.setOptions({timeAxis:{scale: 'minute', step: 5}})
</script>

Loading…
Cancel
Save