mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
Have PathItem constructor call this.base() and don't draw item when it is hidden
This commit is contained in:
parent
b47e896389
commit
34b9258e8e
1 changed files with 2 additions and 0 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue