mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-09 17:01:01 +00:00
Simplify _initStateProperties in fabric.Text
This commit is contained in:
parent
e7e19c2247
commit
3340173e60
1 changed files with 12 additions and 19 deletions
|
|
@ -57,27 +57,20 @@
|
|||
* Creates `stateProperties` list on an instance, and adds `fabric.Text` -specific ones to it
|
||||
* (such as "fontfamily", "fontweight", etc.)
|
||||
* @private
|
||||
* @method initStateProperties
|
||||
* @method _initStateProperties
|
||||
*/
|
||||
_initStateProperties: function() {
|
||||
var o;
|
||||
if ((o = this.constructor) &&
|
||||
(o = o.superclass) &&
|
||||
(o = o.prototype) &&
|
||||
(o = o.stateProperties) &&
|
||||
o.concat) {
|
||||
this.stateProperties = o.concat();
|
||||
this.stateProperties.push(
|
||||
'fontfamily',
|
||||
'fontweight',
|
||||
'path',
|
||||
'text',
|
||||
'textDecoration',
|
||||
'textShadow',
|
||||
'fontStyle'
|
||||
);
|
||||
fabric.util.removeFromArray(this.stateProperties, 'width');
|
||||
}
|
||||
this.stateProperties = this.stateProperties.concat();
|
||||
this.stateProperties.push(
|
||||
'fontfamily',
|
||||
'fontweight',
|
||||
'path',
|
||||
'text',
|
||||
'textDecoration',
|
||||
'textShadow',
|
||||
'fontStyle'
|
||||
);
|
||||
fabric.util.removeFromArray(this.stateProperties, 'width');
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue