Add "NUM_FRACTION_DIGITS" as a static property on Object class. (#42004)

This commit is contained in:
Chiciuc Nicușor
2020-01-31 14:27:38 -08:00
committed by GitHub
parent fb9016f4c9
commit 6dcaf3bed3
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -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 {
+2
View File
@@ -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
//