From a11ef2eed7049835c8bdfa50a2b893632c46eaa0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 11:11:58 -0700 Subject: Squashed commit of Preparing for the montage undo-manager: Architecture changes Reworked the add and remove elements into 1 function which can take 1 or more elements. Removed the _element from the selection array Many other changes related to those 2 changes Undo/Redo shortcuts are now using montage undo/redo manager. Signed-off-by: Valerio Virgillito --- js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js') diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index ecf0f9cd..2a3fc068 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js @@ -520,9 +520,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre this.inComputedStyleMode = false; // No computed styles mode for multiple items ///// if multiple items are selected, then show common rules - var elements = items.map(function(item) { - return item._element; - }); + var elements = Array.prototype.slice.call(this.application.ninja.selectedElements, 0); ///// show toolbar, but hide computed style button this.sections.styles.toolbar.style.display = ''; @@ -538,7 +536,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); this.sections.styles.showComputedEl.classList.remove('nj-css-panel-hide');// .style.display = ''; this.sections.styles.toolbar.style.display = ''; - this.showStylesForElement(items[0]._element, null); + this.showStylesForElement(items[0], null); } else { this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); this._inMultiSelectMode = false; -- cgit v1.2.3