* 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()`. * @param {String|Object} key Property name or object (if object, ite
(key: string | Record<string, any>, value?: any)
| 27 | * @param {Object|Function} value Property value (if function, the value is passed into it and its return value is used as a new one) |
| 28 | */ |
| 29 | set(key: string | Record<string, any>, value?: any) { |
| 30 | if (typeof key === 'object') { |
| 31 | this._setObject(key); |
| 32 | } else { |
| 33 | this._set(key, value); |
| 34 | } |
| 35 | return this; |
| 36 | } |
| 37 | |
| 38 | _set(key: string, value: any) { |
| 39 | this[key as keyof this] = value; |
no test coverage detected