Have PathItem constructor call this.base() and don't draw item when it is hidden

This commit is contained in:
Jonathan Puckey 2011-02-11 18:30:48 +01:00
parent b47e896389
commit 34b9258e8e

View file

@ -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++) {