mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 20:29:10 +00:00
Refactor zoomer macro to take into account CSS classes
This commit is contained in:
parent
7a5c67fadb
commit
6448c70984
@ -100,15 +100,19 @@ exports.handleEvent = function(event) {
|
|||||||
|
|
||||||
exports.executeMacro = function() {
|
exports.executeMacro = function() {
|
||||||
this.inZoomer = false;
|
this.inZoomer = false;
|
||||||
return $tw.Tree.Element("div",{
|
var attributes = {
|
||||||
style: {
|
style: {
|
||||||
"position": "absolute",
|
"position": "absolute",
|
||||||
"right": "0",
|
"right": "0",
|
||||||
"top": "0",
|
"top": "0",
|
||||||
"min-width": "16px",
|
"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,[]);
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user