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 //