From c5841cfde6e2bed9609c0595f140a3dadb3a1109 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Mon, 28 Oct 2024 08:54:04 +0100 Subject: [PATCH] dont create a new Point each time --- haxe/ui/backend/ComponentBase.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haxe/ui/backend/ComponentBase.hx b/haxe/ui/backend/ComponentBase.hx index 7ace4df31..abc3b4a33 100644 --- a/haxe/ui/backend/ComponentBase.hx +++ b/haxe/ui/backend/ComponentBase.hx @@ -1710,8 +1710,9 @@ class ComponentBase extends ComponentSurface implements IClonable private function unmapEvent(type:String, listener:UIEvent->Void) { } + @:noCompletion private var _cachedComponentOffset:Point = new Point(0, 0); private function getComponentOffset():Point { - return new Point(0, 0); + return _cachedComponentOffset; } private var isNativeScroller(get, set):Bool;