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 '不更新对象的边界/控件的位置。如果你需要更新那些,调用' setcoord() '。
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Object | Property name or object (if object, iterate over the object properties)属性名称或对象(如果是对象,则遍历对象属性) |
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`
将指定属性从“真”切换为“假”或从“假”切换为“真”
Parameters:
Name | Type | Description |
---|---|---|
property |
String | Property to toggle属性切换 |
Returns:
thisArg
- Type
- fabric.Object