Namespace: object

fabric.util.object

Source:

Methods

(static) clone(object, deepopt) → {Object}

Creates an empty object and copies all enumerable properties of another object to it This method is mostly for internal use, and not intended for duplicating shapes in canvas.
Parameters:
Name Type Attributes Description
object Object Object to clone
deep Boolean <optional>
Whether to clone nested objects
Source:
Returns:
Type
Object

(static) extend(destination, source, deepopt) → {Object}

Copies all enumerable properties of one js object to another this does not and cannot compete with generic utils. Does not clone or extend fabric.Object subclasses. This is mostly for internal use and has extra handling for fabricJS objects it skips the canvas and group properties in deep cloning.
Parameters:
Name Type Attributes Description
destination Object Where to copy to
source Object Where to copy from
deep Boolean <optional>
Whether to extend nested objects
Source:
Returns:
Type
Object