From 34b9258e8e366e90f505685ce76ca49ad4868e8a Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Fri, 11 Feb 2011 18:30:48 +0100 Subject: [PATCH] Have PathItem constructor call this.base() and don't draw item when it is hidden --- src/PathItem.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PathItem.js b/src/PathItem.js index 6cbe6843..013e52fc 100644 --- a/src/PathItem.js +++ b/src/PathItem.js @@ -39,6 +39,7 @@ PathItem = Item.extend(new function() { beans: true, initialize: function() { + this.base(); this.closed = false; this.segments = [];//new SegmentList(this); this.bounds = new Rectangle(); @@ -361,6 +362,7 @@ PathItem = Item.extend(new function() { }, draw: function(ctx) { + if(!this.visible) return; ctx.beginPath(); var cp1; for(var i = 0, l = this.segments.length; i < l; i++) {