From 45ae62302b175774c1e1af82ff144ecb2fe770d7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 9 Apr 2012 22:58:10 -0700 Subject: setAttribute added to the undo/redo Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 625e3eb6..d9dca538 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -113,13 +113,14 @@ exports.Properties = Montage.create(Component, { } if(this.application.ninja.selectedElements.length) { - ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); +// ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); + ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, this.application.ninja.selectedElements[0].id, "pi"); } else { ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); } } else if(event.target.id === "elementClass") { if(this.application.ninja.selectedElements.length) { - ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); + ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); } else { ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); } -- cgit v1.2.3