use animation best practices in dbmon

This commit is contained in:
Leo Horie 2016-12-02 20:44:03 -05:00
parent 2f7c4983f3
commit 4a4bd7a548
8 changed files with 48 additions and 2299 deletions

View file

@ -32,9 +32,10 @@ var AppComponent = ng.core.Component({selector: "my-app"})
this.update()
},
update: function() {
requestAnimationFrame(function() {self.update()})
var self = this
self.databases = ENV.generateData().toArray()
setTimeout(function() {self.update()}, ENV.timeout)
if (renderStage === 0) {
renderStage = 1