From 2a1e00d1274b12eaf69832d5dafc0cfbf6b1ad45 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Thu, 17 Feb 2011 16:37:29 +0100 Subject: [PATCH] Group: Implement clipping support. --- src/item/Group.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/item/Group.js b/src/item/Group.js index 96ca689c..ab7b76ce 100644 --- a/src/item/Group.js +++ b/src/item/Group.js @@ -14,6 +14,8 @@ Group = Item.extend({ draw: function(ctx) { for (var i = 0, l = this.children.length; i < l; i++) { this.children[i].draw(ctx); + if(this.clipped & i == 0) + ctx.clip(); } },