Open mdpearce opened 6 years ago
@mdpearce +1 Can confirm this after running into an issue... Printing pin index when clicking on rangeBar to the left of pins :- I/System.out: LeftPinIndex: 2 RightPinIndex: 2 I/System.out: LeftPinIndex: 2 RightPinIndex: 1 I/System.out: LeftPinIndex: 2 RightPinIndex: 0
Just thought I'd share my workaround for this issue. It's not a hard problem to solve but an easy solution for anyone until the commit is merged
Before I do a request using the rangebar values as parameters I just get a min and max for the pinIndexes rather than using left and right.
int minPinIndex = leftPinIndex; int maxPinIndex = rightPinIndex; if (leftPinIndex > rightPinIndex) { minPinIndex = rightPinIndex; maxPinIndex = leftPinIndex; }
Currently on the range bar, if the pins are both set to the same value and the user clicks on the bar to the left of the pins, the right pin would move to the click position instead of the left. This means that the right pin is actually to the left of the left pin.
I have created https://github.com/oli107/material-range-bar/pull/125 to address the issue.