From 2919edafd68d135ab94242c95a46b5b74670db4f Mon Sep 17 00:00:00 2001 From: Bradley Hill Date: Fri, 1 Feb 2019 09:45:05 -0600 Subject: [PATCH 1/3] Fabricjs - added IObjectOptions.clipPath & IObjectOptions.dirty --- types/fabric/fabric-impl.d.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 15087ab8d3..6a90a19481 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -2236,7 +2236,20 @@ interface IObjectOptions { */ clipTo?: Function; - /** + /** + * A fabricObject that, without stroke define a clipping area with their shape. filled in black + * the clipPath object gets used when the object has rendered, and the context is placed in the center + * of the object cacheCanvas. + * If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to 'center' + */ + clipPath?: Object; + + /** + * When set to `true`, object's cache will be rerendered next render call. + */ + dirty?: boolean; + + /** * When `true`, object horizontal movement is locked */ lockMovementX?: boolean; From a835e7eea9a8272994b2918d60c3e8b85b6b68ad Mon Sep 17 00:00:00 2001 From: Bradley Hill Date: Fri, 1 Feb 2019 13:12:03 -0600 Subject: [PATCH 2/3] Fabricjs - added IObjectOptions.clipPath & IObjectOptions.dirty (should be fabric.Object NOT Object) --- types/fabric/fabric-impl.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 6a90a19481..1f715384c4 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -2242,7 +2242,7 @@ interface IObjectOptions { * of the object cacheCanvas. * If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to 'center' */ - clipPath?: Object; + clipPath?: fabric.Object; /** * When set to `true`, object's cache will be rerendered next render call. From e2bac480474c9db5b2c352047d6bb60afe2f23f4 Mon Sep 17 00:00:00 2001 From: Bradley Hill Date: Fri, 1 Feb 2019 13:19:31 -0600 Subject: [PATCH 3/3] Fabricjs - added IObjectOptions.clipPath & IObjectOptions.dirty (scratch that Object is fabric.Object in this context, fabric. is redundant) --- types/fabric/fabric-impl.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 1f715384c4..6a90a19481 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -2242,7 +2242,7 @@ interface IObjectOptions { * of the object cacheCanvas. * If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to 'center' */ - clipPath?: fabric.Object; + clipPath?: Object; /** * When set to `true`, object's cache will be rerendered next render call.