mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-04-21 14:21:30 +00:00
Add fillignore attribute to transclude widget to fix visible transclusion (#7451)
* slotignore attribute for transclude widget to fix visible transclusion Fixes #7449 * Remove unneeded depth attribute No longer needed * Replace "slotignore" by "fillignore"
This commit is contained in:
@@ -48,7 +48,7 @@ SlotWidget.prototype.execute = function() {
|
||||
var pointer = this.parentWidget,
|
||||
depth = this.slotDepth;
|
||||
while(pointer) {
|
||||
if(pointer instanceof TranscludeWidget) {
|
||||
if(pointer instanceof TranscludeWidget && pointer.hasVisibleSlots()) {
|
||||
depth--;
|
||||
if(depth <= 0) {
|
||||
break;
|
||||
|
||||
@@ -384,6 +384,13 @@ TranscludeWidget.prototype.getTransclusionSlotFill = function(name,defaultParseT
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Return whether this transclusion should be visible to the slot widget
|
||||
*/
|
||||
TranscludeWidget.prototype.hasVisibleSlots = function() {
|
||||
return this.getAttribute("$fillignore","no") === "no";
|
||||
}
|
||||
|
||||
/*
|
||||
Compose a string comprising the title, field and/or index to identify this transclusion for recursion detection
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user