From 6dcaf3bed330e13a9ae69f9d0bc44a33c2b1ac5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chiciuc=20Nicu=C8=99or?= Date: Sat, 1 Feb 2020 00:27:38 +0200 Subject: [PATCH] Add "NUM_FRACTION_DIGITS" as a static property on Object class. (#42004) --- types/fabric/fabric-impl.d.ts | 4 ++++ types/fabric/test/index.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index b1ac5336f8..cc3429fd25 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -3938,6 +3938,10 @@ export class Object { * @return {fabric.Object} */ static _fromObject(className: string, object: Object, callback?: Function, extraParam?: any): Object; + /** + * Defines the number of fraction digits to use when serializing object values. + */ + static NUM_FRACTION_DIGITS?: number; } interface IPathOptions extends IObjectOptions { diff --git a/types/fabric/test/index.ts b/types/fabric/test/index.ts index 41f1eab631..21890d5b3a 100644 --- a/types/fabric/test/index.ts +++ b/types/fabric/test/index.ts @@ -48,6 +48,8 @@ function sample2() { const rainbow = ["#ffcc66", "#ccff66", "#66ccff", "#ff6fcf", "#ff6666"]; const rainbowEnd = rainbow.length - 1; + fabric.Object.NUM_FRACTION_DIGITS = 2; + // // Rendering canvas #1 //