Skip to content

Commit

Permalink
dont override handleClipRect behaviour if virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed May 22, 2024
1 parent bb069f9 commit af04d45
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions haxe/ui/backend/ComponentImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ class ComponentImpl extends ComponentBase {
}

private override function get_isHybridScroller():Bool {
if ((this is IScroller)) {
var scroller = cast(this, IScroller);
if (scroller.virtual) {
return false;
}
}
return Platform.instance.useHybridScrollers;
}

Expand Down Expand Up @@ -318,11 +324,18 @@ class ComponentImpl extends ComponentBase {
value.toInts();

if (Platform.instance.useHybridScrollers) {
if (value != null && parent != null) {
parent.element.scrollTop = Std.int(value.top);
parent.element.scrollLeft = Std.int(value.left);
var use = true;
if ((parent is IScroller)) {
var scroller = cast(parent, IScroller);
use = !scroller.virtual;
}
if (use) {
if (value != null && parent != null) {
parent.element.scrollTop = Std.int(value.top);
parent.element.scrollLeft = Std.int(value.left);
}
return;
}
return;
}

if (value != null && parent != null) {
Expand Down

0 comments on commit af04d45

Please sign in to comment.