juijs-graph
Advanced tools
Comparing version 0.2.7-es6 to 0.2.8-es6
@@ -189,3 +189,3 @@ import jui from '../src/main.js' | ||
const animation = jui.include("chart.animation"); | ||
const c = animation("#chart", { | ||
window.c = animation("#chart", { | ||
width: 500, | ||
@@ -192,0 +192,0 @@ height: 300, |
{ | ||
"name": "juijs-graph", | ||
"version": "0.2.7-es6", | ||
"version": "0.2.8-es6", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "description": "SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D)", |
@@ -15,2 +15,3 @@ import JUI from "juijs" | ||
let interval, | ||
animateSeq = -1, | ||
prevTime = 0, | ||
@@ -56,3 +57,4 @@ startTime = 0; | ||
const self = this; | ||
this.animateFunc = window.requestAnimationFrame(function() { | ||
animateSeq = requestAnimationFrame(function() { | ||
self.run(callback); | ||
@@ -64,5 +66,5 @@ }); | ||
this.stop = function() { | ||
if(typeof(this.animateFunc) == "function") { | ||
cancelAnimationFrame(this.animateFunc); | ||
this.animateFunc = null; | ||
if(animateSeq != -1) { | ||
cancelAnimationFrame(animateSeq); | ||
animateSeq = -1; | ||
} | ||
@@ -69,0 +71,0 @@ } |
Sorry, the diff of this file is too big to display
9540
749981