mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Improved default logic for the reveal widget
This commit is contained in:
parent
e88db07085
commit
54d858a371
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user