* toggleRule * Toggles a single validation rule, * then reruns the validation so that the user sees something happen in the UI * @param {string} ruleID - The rule to toggle (e.g. 'crossing_ways')
(ruleID)
| 473 | * @param {string} ruleID - The rule to toggle (e.g. 'crossing_ways') |
| 474 | */ |
| 475 | toggleRule(ruleID) { |
| 476 | if (this._disabledRuleIDs.has(ruleID)) { |
| 477 | this._disabledRuleIDs.delete(ruleID); |
| 478 | } else { |
| 479 | this._disabledRuleIDs.add(ruleID); |
| 480 | } |
| 481 | |
| 482 | const storage = this.context.systems.storage; |
| 483 | storage.setItem('validate-disabledRules', [...this._disabledRuleIDs].join(',')); |
| 484 | this.validateAsync(); |
| 485 | } |
| 486 | |
| 487 | |
| 488 | /** |
no test coverage detected