problem with ToggleIconButton setValue

by joopmicroop

JavaScript

// The setValue seems to be bugged with ToggleIconButton
// if value == false & tapped false => true
// if value == true  & tapped false => true
// if value == false & tapped true  => true
// if value == true  & tapped true  => true
enyo.kind({
  name:'app',
  components:[
      {name:'TIB', kind:'onyx.ToggleIconButton', src:'https://github.com/ryanjduffy/enyo-extras/diff_blob/0177c4e605fc72115a6906a7105049610b9d7a31/lib/onyx/images/progress-button-cancel.png?raw=true', onChange:'TIB_changed'},
    {tag:'br'},{content:'setValue()'},
    {kind:'onyx.Button', content:'true', ontap:'TIB_tapped_setValue'},
    {kind:'onyx.Button', content:'false', ontap:'TIB_tapped_setValue'},
    {tag:'br'},{content:'setActive()'},
    {kind:'onyx.Button', content:'true', ontap:'TIB_tapped_setActive'},
    {kind:'onyx.Button', content:'false', ontap:'TIB_tapped_setActive'},
    {tag:'br'},{content:'value ='},
    {kind:'onyx.Button', content:'true', ontap:'TIB_tapped_value'},
    {kind:'onyx.Button', content:'false', ontap:'TIB_tapped_value'},
    {kind:'onyx.Button', content:'render', ontap:'render'},
    {tag:'br'},{content:'active ='},
    {kind:'onyx.Button', content:'true', ontap:'TIB_tapped_active'},
    {kind:'onyx.Button', content:'false', ontap:'TIB_tapped_active'},
    {kind:'onyx.Button', content:'render', ontap:'render'},
  ],
  TIB_tapped_setValue:function(s,e){ this.$.TIB.setValue(!!s.content); },
  TIB_tapped_setActive:function(s,e){ this.$.TIB.setActive(!!s.content); },
  TIB_tapped_value:function(s,e){ this.$.TIB.value = !!s.content; },
  TIB_tapped_active:function(s,e){ this.$.TIB.active = !!s.content; },
  TIB_render:function(s,e){ this.$.TIB.render(); },
  TIB_changed:function(s,e){ console.log(s); }
});

(new app()).renderInto(document.body);