WAB 2.9 jimu CheckBox.js check:

669
3
08-02-2018 08:34 AM
AndrewHayden1
Occasional Contributor

I'm trying to understand jimu CheckBox.js check function.

Specifically, I'm wondering why checked class is added and then removed?

html.addClass(this.checkNode, 'checked jimu-icon-checked');
html.removeClass(this.checkNode, 'checked jimu-icon-checkbox');

As opposed to:

html.addClass(this.checkNode, 'checked jimu-icon-checked');
html.removeClass(this.checkNode, 'jimu-icon-checkbox');

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Andrew,

  Because jimu-icon-checked is the colored background with the check and jimu-icon-checkbox is just the square with the outline (the box) without a check.

AndrewHayden1
Occasional Contributor

Isn't the checked class the check?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nope. If you check the jimu.css the checked class is never used.