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 f3a346c1c3 Bring back visible overflow and fix svg sizing issues.
f3a346c1c3 is described below
commit f3a346c1c317c13bd53667c2f77f55683267cf08
Author: Yishay Weiss <[email protected]>
AuthorDate: Mon May 23 08:55:21 2022 +0300
Bring back visible overflow and fix svg sizing issues.
---
.../royale/mx/controls/sliderClasses/Slider.as | 52 +++++++++++-----------
1 file changed, 26 insertions(+), 26 deletions(-)
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 f1b0131215..a420b09d80 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
@@ -595,6 +595,12 @@ package mx.controls.sliderClasses
updateDisplayList(w, h);
}
+ override public function get measuredWidth():Number
+ {
+ measure();
+ return measuredMinWidth;
+ }
+
override public function get measuredHeight():Number
{
measure();
@@ -1531,9 +1537,6 @@ package mx.controls.sliderClasses
*/
override protected function createChildren():void
{
- COMPILE::JS{
- element.style.overflow='hidden'; //because of over-sized
nested SVG rendering
- }
super.createChildren();
if (!innerSlider)
@@ -1977,20 +1980,21 @@ package mx.controls.sliderClasses
currentThumb.getExplicitOrMeasuredHeight());
}
- var g:Graphics = trackHitArea.graphics;
-
- var tLength:Number = 0
- if (_tickInterval > 0 || (_tickValues && _tickValues.length > 0))
- tLength = getStyle("tickLength");
- g.clear();
- g.beginFill(0,0);
- var fullThumbHeight:Number =
firstThumb.getExplicitOrMeasuredHeight();
- var halfThumbHeight:Number = (!fullThumbHeight) ? 0 :
(fullThumbHeight / 2);
- g.drawRect(track.x,
- track.y - halfThumbHeight - tLength,
- track.width,
- track.height + fullThumbHeight + tLength);
- g.endFill();
+ // Porting notes: we've left out this rect as it was causing some
sizing issues
+ // var g:Graphics = trackHitArea.graphics;
+
+ // var tLength:Number = 0
+ // if (_tickInterval > 0 || (_tickValues && _tickValues.length >
0))
+ // tLength = getStyle("tickLength");
+ // g.clear();
+ // g.beginFill(0,0);
+ // var fullThumbHeight:Number =
firstThumb.getExplicitOrMeasuredHeight();
+ // var halfThumbHeight:Number = (!fullThumbHeight) ? 0 :
(fullThumbHeight / 2);
+ // g.drawRect(track.x,
+ // track.y - halfThumbHeight - tLength,
+ // track.width,
+ // track.height + fullThumbHeight + tLength);
+ // g.endFill();
if (_direction != SliderDirection.HORIZONTAL)
innerSlider.y = unscaledHeight;
@@ -2254,15 +2258,12 @@ package mx.controls.sliderClasses
var positionIndex:int = 0;
var val:Number = usePositions ? _tickValues[positionIndex++] :
minimum;
+ var isHorizontal:Boolean = (direction ==
SliderDirection.HORIZONTAL);
+ ticks.y = Math.round(track.y + tOffset - tLength);
+ ticks.height = isHorizontal ? height - ticks.y : width -
ticks.y;
+ ticks.width = isHorizontal ? width : height;
g.clear();
- COMPILE::JS
- {
- // clear sets width and height according to containing
element, but these values can be skewed because of rotation
- var svg:Element =
ticks.element.getElementsByTagName('svg')[0] as Element;
- svg.removeAttribute("width");
- svg.removeAttribute("height");
- }
-
+
if (_tickInterval > 0 || usePositions)
{
g.lineStyle(tickWidth,tColor,100);
@@ -2285,7 +2286,6 @@ package mx.controls.sliderClasses
g.endStroke();
}
- ticks.y = Math.round(track.y + tOffset - tLength);
}
}
}