From 6448c70984e1d55e81be77f863ee91d22a3ca150 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 11 Jun 2012 13:05:57 +0100 Subject: [PATCH] Refactor zoomer macro to take into account CSS classes --- core/modules/macros/zoomer.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/modules/macros/zoomer.js b/core/modules/macros/zoomer.js index 7fc9c9a5c..7dd4ba9bd 100644 --- a/core/modules/macros/zoomer.js +++ b/core/modules/macros/zoomer.js @@ -100,15 +100,19 @@ exports.handleEvent = function(event) { exports.executeMacro = function() { this.inZoomer = false; - return $tw.Tree.Element("div",{ + var attributes = { style: { "position": "absolute", "right": "0", "top": "0", "min-width": "16px", - "height": "100%" + "height": "100%" // Makes the height the same as the body, since the body is position:relative } - },[]); + }; + if(this.classes) { + attributes["class"] = this.classes.slice(0); + } + return $tw.Tree.Element("div",attributes,[]); }; })();