mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Fix Group clipping and ignore Item#clipMask in the documentation for now.
This commit is contained in:
parent
8979537f14
commit
41feaebb4e
2 changed files with 6 additions and 3 deletions
|
@ -103,10 +103,9 @@ var Group = this.Group = Item.extend({
|
|||
|
||||
draw: function(ctx, param) {
|
||||
for (var i = 0, l = this._children.length; i < l; i++) {
|
||||
// the group is clipped on its first child
|
||||
param.clip = this._clipped && i == 0;
|
||||
Item.draw(this._children[i], ctx, param);
|
||||
// TODO: Shouldn't clipping paths not be filled / stroked?
|
||||
if (this._clipped && i == 0)
|
||||
ctx.clip();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -273,6 +273,9 @@ var Item = this.Item = Base.extend({
|
|||
*/
|
||||
visible: true,
|
||||
|
||||
// TODO Item#clipMask is currently not used for clipping - consider
|
||||
// taking it out, as we could also simply always use the first child as the
|
||||
// clipping mask.
|
||||
/**
|
||||
* Specifies whether the item defines a clip mask. This can only be set on
|
||||
* paths, compound paths, and text frame objects, and only if the item is
|
||||
|
@ -281,6 +284,7 @@ var Item = this.Item = Base.extend({
|
|||
* @type Boolean
|
||||
* @default false
|
||||
* @bean
|
||||
* @ignore // ignoring this until we actually make use of it for drawing
|
||||
*/
|
||||
isClipMask: function() {
|
||||
return this._clipMask;
|
||||
|
|
Loading…
Reference in a new issue