mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
batchDraw
will not do immediate draw()
This commit is contained in:
parent
3743b27899
commit
9f5e8938b7
@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## [Not released][Not released]
|
## [Not released][Not released]
|
||||||
|
|
||||||
|
## [0.12.4][2016-04-19]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- `batchDraw` will not do immediate `draw()`
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- fix incorrect shadow offset on rotation
|
- fix incorrect shadow offset on rotation
|
||||||
|
|
||||||
|
7
konva.js
7
konva.js
@ -3,7 +3,7 @@
|
|||||||
* Konva JavaScript Framework v0.12.3
|
* Konva JavaScript Framework v0.12.3
|
||||||
* http://konvajs.github.io/
|
* http://konvajs.github.io/
|
||||||
* Licensed under the MIT or GPL Version 2 licenses.
|
* Licensed under the MIT or GPL Version 2 licenses.
|
||||||
* Date: Fri Apr 15 2016
|
* Date: Tue Apr 19 2016
|
||||||
*
|
*
|
||||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||||
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
||||||
@ -2017,6 +2017,7 @@
|
|||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
}),
|
}),
|
||||||
|
// TODO: get this info from transform??
|
||||||
scale = shape.getAbsoluteScale(),
|
scale = shape.getAbsoluteScale(),
|
||||||
scaleX = scale.x,
|
scaleX = scale.x,
|
||||||
scaleY = scale.y;
|
scaleY = scale.y;
|
||||||
@ -10321,7 +10322,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* batch draw
|
* batch draw. this function will not do imidiate draw
|
||||||
|
* but it will schedule drawing to next tick (requestAnimFrame)
|
||||||
* @method
|
* @method
|
||||||
* @return {Konva.Layer} this
|
* @return {Konva.Layer} this
|
||||||
* @memberof Konva.Base.prototype
|
* @memberof Konva.Base.prototype
|
||||||
@ -10340,7 +10342,6 @@
|
|||||||
this.lastBatchDrawTime = now();
|
this.lastBatchDrawTime = now();
|
||||||
|
|
||||||
if (!this.batchAnim.isRunning()) {
|
if (!this.batchAnim.isRunning()) {
|
||||||
this.draw();
|
|
||||||
this.batchAnim.start();
|
this.batchAnim.start();
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
6
konva.min.js
vendored
6
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -268,7 +268,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* batch draw
|
* batch draw. this function will not do immediate draw
|
||||||
|
* but it will schedule drawing to next tick (requestAnimFrame)
|
||||||
* @method
|
* @method
|
||||||
* @return {Konva.Layer} this
|
* @return {Konva.Layer} this
|
||||||
* @memberof Konva.Base.prototype
|
* @memberof Konva.Base.prototype
|
||||||
@ -287,7 +288,6 @@
|
|||||||
this.lastBatchDrawTime = now();
|
this.lastBatchDrawTime = now();
|
||||||
|
|
||||||
if (!this.batchAnim.isRunning()) {
|
if (!this.batchAnim.isRunning()) {
|
||||||
this.draw();
|
|
||||||
this.batchAnim.start();
|
this.batchAnim.start();
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user