Changes between Initial Version and Version 2 of Ticket #9160
- Timestamp:
- Apr 18, 2009, 6:43:15 AM (13 years ago)
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: 1 After 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 3 A related bug is that {{{attr('value', [0,100])}}} doesn't work correctly in RTL mode. 4 5 The cause of both bugs is that !RangeSlider has the following code in postCreate(): 2 6 3 7 {{{ … … 8 12 9 13 Of course, visualization details like RTL vs LTR shouldn't affect how the API operates. 14 15 Any 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 17 BTW, since the values array always has exactly two values the above code can be written more simply as: 18 19 {{{ 20 this.value = this. _isReversed() ? [ this.value[1], this.value[0] ] : 21 [ this.value[0], this.value[1] ] 22 }}}