mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
fixed flickering when a node was added to the stage, updated, and redraw due to throttling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user