mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-15 01:09:53 -04: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({
|
var CharacterStyle = this.CharacterStyle = PathStyle.extend({
|
||||||
initialize: function(style) {
|
initialize: function(style) {
|
||||||
this.fontSize = style.fontSize || 10;
|
Base.initialize(this, style, {
|
||||||
this.font = style.font || 'sans-serif';
|
fontSize: 10,
|
||||||
|
font: 'sans-serif'
|
||||||
|
});
|
||||||
this.base(style);
|
this.base(style);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
|
|
||||||
var ParagraphStyle = this.ParagraphStyle = Base.extend({
|
var ParagraphStyle = this.ParagraphStyle = Base.extend({
|
||||||
initialize: function(style) {
|
initialize: function(style) {
|
||||||
this.justification = (style && style.justification) || 'left';
|
Base.initialize(this, style, {
|
||||||
},
|
justification: 'left'
|
||||||
|
});
|
||||||
clone: function() {
|
|
||||||
return new PathStyle(this);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
statics: {
|
statics: {
|
||||||
|
|
Loading…
Reference in a new issue