mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -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,
|
beans: true,
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
|
this.base();
|
||||||
this.closed = false;
|
this.closed = false;
|
||||||
this.segments = [];//new SegmentList(this);
|
this.segments = [];//new SegmentList(this);
|
||||||
this.bounds = new Rectangle();
|
this.bounds = new Rectangle();
|
||||||
|
@ -361,6 +362,7 @@ PathItem = Item.extend(new function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
draw: function(ctx) {
|
draw: function(ctx) {
|
||||||
|
if(!this.visible) return;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
var cp1;
|
var cp1;
|
||||||
for(var i = 0, l = this.segments.length; i < l; i++) {
|
for(var i = 0, l = this.segments.length; i < l; i++) {
|
||||||
|
|
Loading…
Reference in a new issue