mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-10 15:53:58 +00:00
rename widget-ancestorcount to parent-ancestorcount
This commit is contained in:
parent
f50c5bc0c4
commit
6e7ccfa9fa
@ -1,9 +1,9 @@
|
||||
/*\
|
||||
title: $:/core/modules/macros/widget-ancestorcount.js
|
||||
title: $:/core/modules/macros/parent-ancestorcount.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
Macro to return the widget this.ancestors variable
|
||||
Macro to return the parent widget this.ancestors variable
|
||||
|
||||
\*/
|
||||
/*jslint node: true, browser: true */
|
||||
@ -14,7 +14,7 @@ Macro to return the widget this.ancestors variable
|
||||
Information about this macro
|
||||
*/
|
||||
|
||||
exports.name = "widget-ancestorcount";
|
||||
exports.name = "parent-ancestorcount";
|
||||
|
||||
exports.params = [];
|
||||
|
||||
@ -22,5 +22,5 @@ exports.params = [];
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function() {
|
||||
return this.getAncestorCount() + "" || "";
|
||||
return (this.parentWidget) ? this.parentWidget.getAncestorCount() + "" : "";
|
||||
};
|
@ -1,12 +1,12 @@
|
||||
created: 20240417070900019
|
||||
modified: 20240417082244189
|
||||
modified: 20240417083823331
|
||||
tags:
|
||||
title: test-new-set-get-macros
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\import test-collatz
|
||||
|
||||
ancestor count: <<widget-ancestorcount>>
|
||||
ancestor count: <<parent-ancestorcount>>
|
||||
|
||||
UNSAFE_max_widget_tree_depth: <<get_UNSAFE_max_widget_tree_depth>>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user