1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-19 08:14:50 +00:00

Added new "aboveright" position for reveal macro

This commit is contained in:
Jeremy Ruston 2012-11-06 14:11:32 +00:00
parent 083ac7a4bf
commit 034af3b126

View File

@ -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 ** //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 ** //match// - reveals if the state tiddler matches the match text
** //nomatch// - reveals if the state tiddler does not match 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 * ''text'' - match text
* ''qualifyTiddlerTitles'' - if present, causes the title of the state tiddler to be qualified with the current tiddler stack * ''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 * ''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.left = this.popup.left + "px";
this.child.domNode.style.top = (this.popup.top - this.child.domNode.offsetHeight) + "px"; this.child.domNode.style.top = (this.popup.top - this.child.domNode.offsetHeight) + "px";
break; 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": case "right":
this.child.domNode.style.left = (this.popup.left + this.popup.width) + "px"; this.child.domNode.style.left = (this.popup.left + this.popup.width) + "px";
this.child.domNode.style.top = this.popup.top + "px"; this.child.domNode.style.top = this.popup.top + "px";