diff --git a/src/item/Item.js b/src/item/Item.js index ba57744c..eba8121e 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -3697,7 +3697,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ && (this._drawSelected || this._boundsSelected)) { // Allow definition of selected color on a per item and per // layer level, with a fallback to #009dec - var color = this.getSelectedColor() + var color = this.getSelectedColor(true) || this.getLayer().getSelectedColor(true), mx = matrix.clone().concatenate(this.getGlobalMatrix(true)); ctx.strokeStyle = ctx.fillStyle = color diff --git a/src/style/Style.js b/src/style/Style.js index 14b84de0..1af1a90d 100644 --- a/src/style/Style.js +++ b/src/style/Style.js @@ -110,15 +110,15 @@ var Style = Base.extend(new function() { justification: /*#=*/ Change.GEOMETRY }; - var item = {}, + // Enforce creation of beans, as bean getters have hidden parameters, + // see _dontMerge argument below. + var item = { beans: true }, fields = { _defaults: defaults, // Override default fillColor for text items _textDefaults: new Base(defaults, { fillColor: new Color() // black }), - // Enforce creation of beans, as bean getters have hidden parameters - // See _dontMerge argument below. beans: true }; @@ -134,7 +134,7 @@ var Style = Base.extend(new function() { // - Style values are all stored in this._values // - The style object starts with an empty _values object, with fallback // on _defaults through code in the getter below. - // - Only the styles that are explicitely set on the object get defined + // - Only the styles that are explicitly set on the object get defined // in _values. // - Color values are not stored as converted colors immediately. The // raw value is stored, and conversion only happens in the getter. @@ -211,8 +211,8 @@ var Style = Base.extend(new function() { // Inject style getters and setters into the Item class, which redirect // calls to the linked style object. - item[get] = function() { - return this._style[get](); + item[get] = function(_dontMerge) { + return this._style[get](_dontMerge); }; item[set] = function(value) {