fixed flickering when a node was added to the stage, updated, and redraw due to throttling

This commit is contained in:
Eric Rowell
2012-05-20 15:30:32 -07:00
parent 2331222459
commit e26575a6c8
4 changed files with 46 additions and 3 deletions

View File

@@ -309,6 +309,13 @@ Kinetic.Stage.prototype = {
// draw layer and append canvas to container
layer.draw();
this.content.appendChild(layer.canvas);
/*
* set layer last draw time to zero
* so that throttling doesn't take into account
* the layer draws associated with adding a node
*/
layer.lastDrawTime = 0;
},
/**
* get mouse position for desktop apps