From 034af3b126c9db5d1fcd678faf20d82e4d5051f4 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 6 Nov 2012 14:11:32 +0000 Subject: [PATCH] Added new "aboveright" position for reveal macro --- core/modules/macros/reveal.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/modules/macros/reveal.js b/core/modules/macros/reveal.js index df1d0be45..253ecbec6 100644 --- a/core/modules/macros/reveal.js +++ b/core/modules/macros/reveal.js @@ -12,7 +12,7 @@ The parameters are: ** //popup// - a popup - the state tiddler should contain the page coordinates of the button that triggered the popup ** //match// - reveals if the state tiddler matches the match text ** //nomatch// - reveals if the state tiddler does not match the match text -* ''position'' - popup position: //left//, //above//, //right//, //below// or //belowleft// +* ''position'' - popup position: //left//, //above//, //aboveright//, //right//, //below// or //belowleft// * ''text'' - match text * ''qualifyTiddlerTitles'' - if present, causes the title of the state tiddler to be qualified with the current tiddler stack * ''default'' - default hide/reveal state: `open` if visible, otherwise hidden @@ -143,6 +143,10 @@ exports.postRenderInDom = function() { this.child.domNode.style.left = this.popup.left + "px"; this.child.domNode.style.top = (this.popup.top - this.child.domNode.offsetHeight) + "px"; break; + case "aboveright": + this.child.domNode.style.left = (this.popup.left + this.popup.width) + "px"; + this.child.domNode.style.top = (this.popup.top + this.popup.height - this.child.domNode.offsetHeight) + "px"; + break; case "right": this.child.domNode.style.left = (this.popup.left + this.popup.width) + "px"; this.child.domNode.style.top = this.popup.top + "px";