Methods
(static) _setOptions(optionsopt)
Sets object's properties from options
从选项设置对象的属性
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Options object选择对象 |
(static) get(property) → {*}
Basic getter
基本的getter
Parameters:
Name | Type | Description |
---|---|---|
property |
String | Property name属性名 |
Returns:
value of a property
- Type
- *
(static) set(key, value) → {fabric.Object}
Sets property to a given value. When changing position/dimension -related properties (left, top, scale, angle, etc.) `set` does not update position of object's borders/controls. If you need to update those, call `setCoords()`.
将属性设置为给定值。当改变位置/尺寸相关属性时(左、顶、比例、角度等)' set '不会更新对象的边框/控件的位置。如果你需要更新这些,调用' setcocord() '。
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Object | Property name or object (if object, iterate over the object properties)属性名或对象(如果是object,则遍历对象属性) |
value |
Object | function | Property value (if function, the value is passed into it and its return value is used as a new one)属性值(if函数,该值被传递给它,它的返回值被用作一个新的值) |
Returns:
thisArg
- Type
- fabric.Object
(static) toggle(property) → {fabric.Object}
Toggles specified property from `true` to `false` or from `false` to `true`
将指定属性从' true '切换到' false '或从' false '切换到' true '
Parameters:
Name | Type | Description |
---|---|---|
property |
String | Property to toggle属性切换 |
Returns:
thisArg
- Type
- fabric.Object