allow #newNotesOnTop=false to negate previous setting, closes #3796

This commit is contained in:
zadam
2023-04-03 21:08:32 +02:00
parent a0e9ac73c9
commit d100b0dc07
4 changed files with 31 additions and 3 deletions

View File

@@ -595,6 +595,20 @@ class FNote {
*/
hasLabel(name) { return this.hasAttribute(LABEL, name); }
/**
* @param {string} name - label name
* @returns {boolean} true if label exists (including inherited) and does not have "false" value.
*/
isLabelTruthy(name) {
const label = this.getLabel(name);
if (!label) {
return false;
}
return label && label.value !== 'false';
}
/**
* @param {string} name - relation name
* @returns {boolean} true if relation exists (excluding inherited)