Merge pull request #470 from Kienz/visiblePropFix

Bugfix fabric.PathGroup if object is not visible
This commit is contained in:
Juriy Zaytsev 2013-03-09 15:04:58 -08:00
commit c366e1d184
2 changed files with 5 additions and 1 deletions

View file

@ -628,7 +628,7 @@
*/
render: function(ctx, noTransform) {
// do not render if width or height are zeros
// do not render if width/height are zeros or object is not visible
if (this.width === 0 || this.height === 0 || !this.visible) return;
ctx.save();

View file

@ -65,6 +65,10 @@
* @param {CanvasRenderingContext2D} ctx Context to render this instance on
*/
render: function(ctx) {
// do not render if object is not visible
if (!this.visible) return;
ctx.save();
var m = this.transformMatrix;