This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new c062c227be Slider emulation - Work around label positioning issues
c062c227be is described below

commit c062c227be8da618b12e21bf32ff1650504b30e3
Author: Yishay Weiss <[email protected]>
AuthorDate: Mon May 23 09:27:50 2022 +0300

    Slider emulation - Work around label positioning issues
---
 .../MXRoyale/src/main/royale/mx/controls/sliderClasses/Slider.as       | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/Slider.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/Slider.as
index a420b09d80..89d39736a0 100644
--- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/Slider.as
+++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/Slider.as
@@ -2325,7 +2325,10 @@ package mx.controls.sliderClasses
                         if (i == 0)
                             labelPos = Math.min(labelPos, availSpace / 
(numLabels > Number(1) ? Number(2) : Number(1)));
                         else if (i == (numLabels - 1))
+                        {
                             labelPos = Math.max(labelPos, 
curLabel.getExplicitOrMeasuredWidth() - availSpace / 2);
+                            labelPos++; // seems to be necessary to avoid 
overflow (rounding issue?)
+                        }
 
                         curLabel.move(left - labelPos,yPos);
                     }

Reply via email to