Skip to content

Commit

Permalink
added layer visible property
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Rowell authored and Eric Rowell committed Jul 26, 2017
1 parent ccfb21a commit d66c0d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions build/concrete.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@
scene.clear();

this.layers.forEach(function(layer) {
scene.context.drawImage(layer.scene.canvas, 0, 0, layer.width, layer.height);
if (layer.visible) {
scene.context.drawImage(layer.scene.canvas, 0, 0, layer.width, layer.height);
}
});
}
};
Expand All @@ -182,7 +184,7 @@
this.y = 0;
this.width = 0;
this.height = 0;

this.visible = true;
this.id = idCounter++;
this.hit = new Concrete.Hit();
this.scene = new Concrete.Scene();
Expand Down
2 changes: 1 addition & 1 deletion build/concrete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/concrete.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@
scene.clear();

this.layers.forEach(function(layer) {
scene.context.drawImage(layer.scene.canvas, 0, 0, layer.width, layer.height);
if (layer.visible) {
scene.context.drawImage(layer.scene.canvas, 0, 0, layer.width, layer.height);
}
});
}
};
Expand All @@ -154,7 +156,7 @@
this.y = 0;
this.width = 0;
this.height = 0;

this.visible = true;
this.id = idCounter++;
this.hit = new Concrete.Hit();
this.scene = new Concrete.Scene();
Expand Down

0 comments on commit d66c0d9

Please sign in to comment.