Skip to content

Commit

Permalink
explicitly call setComponentIndex for ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Mar 27, 2024
1 parent 3569bf4 commit ba59865
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions haxe/ui/components/Slider.hx
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ private class MinorTicks extends DataBehaviour {
var tick = new Component();
tick.addClass("minor-tick");
tick.scriptAccess = false;
slider.addComponentAt(tick, index + 1);
slider.addComponent(tick);
slider.setComponentIndex(tick, index + 1);
}
var removeN = Std.int(ticks.length - n);
for (_ in 0...removeN) {
Expand All @@ -343,7 +344,8 @@ private class MajorTicks extends DataBehaviour {
var tick = new Component();
tick.addClass("major-tick");
tick.scriptAccess = false;
slider.addComponentAt(tick, index + 1);
slider.addComponent(tick);
slider.setComponentIndex(tick, index + 1);
}
var removeN = Std.int(ticks.length - n);
for (_ in 0...removeN) {
Expand Down

0 comments on commit ba59865

Please sign in to comment.