mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-16 07:17:21 +00:00
Remove implementation of $:/globals/
Performance with this implementation is inherently poor because of the need to perform a wiki lookup for each child widget created.
This commit is contained in:
@@ -155,20 +155,6 @@ Widget.prototype.getVariableInfo = function(name,options) {
|
||||
}
|
||||
// If the variable doesn't exist in the parent widget then look for a macro module
|
||||
var text = this.evaluateMacroModule(name,actualParams);
|
||||
if(text === undefined) {
|
||||
// Check for a shadow variable tiddler
|
||||
var tiddler = this.wiki.getTiddler("$:/global/" + name);
|
||||
if(tiddler) {
|
||||
return processVariable({
|
||||
value: tiddler.getFieldString("text"),
|
||||
params: $tw.utils.parseParameterDefinition(tiddler.getFieldString("_parameters"),{requireParenthesis: true}),
|
||||
isMacroDefinition: tiddler.getFieldString("_is_macro") === "yes",
|
||||
isWidgetDefinition: tiddler.getFieldString("_is_widget") === "yes",
|
||||
isProcedureDefinition: tiddler.getFieldString("_is_procedure") === "yes",
|
||||
isFunctionDefinition: tiddler.getFieldString("_is_function") === "yes"
|
||||
});
|
||||
}
|
||||
}
|
||||
if(text === undefined) {
|
||||
text = options.defaultValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user