Use Base.initialize() in both ParagraphStyle and CharacterStyle's #initialize().

This commit is contained in:
Jürg Lehni 2011-05-17 13:13:24 +01:00
parent 6427bca46e
commit 2c03cb1ccb
2 changed files with 7 additions and 7 deletions

View file

@ -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);
},

View file

@ -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: {