MCPcopy Create free account
hub / github.com/cryptii/cryptii / settingValueDidChange

Method settingValueDidChange

src/Encoder/Base32.js:228–243  ·  view source on GitHub ↗

* Triggered when a setting field has changed. * @protected * @param {Field} setting Sender setting field * @param {mixed} value New field value

(setting, value)

Source from the content-addressed store, hash-verified

226 * @param {mixed} value New field value
227 */
228 settingValueDidChange (setting, value) {
229 switch (setting.getName()) {
230 case 'variant': {
231 // Make alphabet and padding settings available with the custom variant
232 this.getSetting('alphabet').setVisible(value === 'custom')
233 this.getSetting('padding').setVisible(value === 'custom')
234 break
235 }
236
237 case 'alphabet': {
238 // Alphabet characters are not allowed to be used as padding
239 this.getSetting('padding').setBlacklistChars(value)
240 break
241 }
242 }
243 }
244
245 /**
246 * Returns the current variant options.

Callers

nothing calls this directly

Calls 4

getSettingMethod · 0.80
setBlacklistCharsMethod · 0.80
getNameMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected