From 54d858a37136ea18e059c164c380bc640104d585 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 27 Mar 2013 13:48:39 +0000 Subject: [PATCH] Improved default logic for the reveal widget --- core/modules/widgets/reveal.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/modules/widgets/reveal.js b/core/modules/widgets/reveal.js index 136ed297b..ce62063f4 100644 --- a/core/modules/widgets/reveal.js +++ b/core/modules/widgets/reveal.js @@ -61,13 +61,12 @@ RevealWidget.prototype.generate = function() { Read the state tiddler */ RevealWidget.prototype.readState = function() { - // Start with the default value for being open or closed - if(this["default"]) { - this.isOpen = this["default"] === "open"; - } // Read the information from the state tiddler if(this.stateTitle) { - var state = this.renderer.renderTree.wiki.getTextReference(this.stateTitle); + var state = this.renderer.renderTree.wiki.getTextReference(this.stateTitle,this["default"],this.renderer.getContextTiddlerTitle()); +if(this["default"]) { + console.log(this.stateTitle,this["default"],state) +} switch(this.type) { case "popup": this.readPopupState(state);