Changes between Initial Version and Version 2 of Ticket #9160


Ignore:
Timestamp:
Apr 18, 2009, 6:43:15 AM (13 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9160

    • Property Owner changed from dante to Nathan Toone
  • Ticket #9160 – Description

    initial v2  
    1 !RangeSlider has the code:
     1After initializing a !RangeSlider with value="0,100" or similar, attr('value') should return {{{[0,100]}}}.   However, in RTL mode it incorrectly returns {{{[100,0]}}}.
     2
     3A related bug is that {{{attr('value', [0,100])}}} doesn't work correctly in RTL mode.
     4
     5The cause of both bugs is that !RangeSlider has the following code in postCreate():
    26
    37{{{
     
    812
    913Of course, visualization details like RTL vs LTR shouldn't affect how the API operates.
     14
     15Any normalization code should happen in _setValueAttr() rather than postMixInProperties(), and then maybe you could have a _getValueAttr() method too, although I wish/hope that none of this reversal code is needed.
     16
     17BTW, since the values array always has exactly two values the above code can be written more simply as:
     18
     19{{{
     20this.value = this. _isReversed() ? [ this.value[1], this.value[0] ] :
     21 [ this.value[0], this.value[1] ]
     22}}}