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

View file

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