mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Use Base.initialize() in both ParagraphStyle and CharacterStyle's #initialize().
This commit is contained in:
parent
6427bca46e
commit
2c03cb1ccb
2 changed files with 7 additions and 7 deletions
|
@ -16,8 +16,10 @@
|
|||
|
||||
var CharacterStyle = this.CharacterStyle = PathStyle.extend({
|
||||
initialize: function(style) {
|
||||
this.fontSize = style.fontSize || 10;
|
||||
this.font = style.font || 'sans-serif';
|
||||
Base.initialize(this, style, {
|
||||
fontSize: 10,
|
||||
font: 'sans-serif'
|
||||
});
|
||||
this.base(style);
|
||||
},
|
||||
|
||||
|
|
|
@ -16,11 +16,9 @@
|
|||
|
||||
var ParagraphStyle = this.ParagraphStyle = Base.extend({
|
||||
initialize: function(style) {
|
||||
this.justification = (style && style.justification) || 'left';
|
||||
},
|
||||
|
||||
clone: function() {
|
||||
return new PathStyle(this);
|
||||
Base.initialize(this, style, {
|
||||
justification: 'left'
|
||||
});
|
||||
},
|
||||
|
||||
statics: {
|
||||
|
|
Loading…
Reference in a new issue