[view] fix onTouchEnd in GroupView

This commit is contained in:
2019-09-29 12:26:28 +03:00
parent a253aeaed4
commit c88a2c810f
2 changed files with 10 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
package haxework.view;
import haxework.view.form.InputView;
import flash.Lib;
import flash.display.Stage;
import flash.display.DisplayObject;
import flash.display.InteractiveObject;
import flash.geom.Rectangle;
@@ -40,6 +41,12 @@ import haxework.view.theme.ITheme;
public var rect(get, null):Rectangle;
private var stage(get, null):Stage;
private function get_stage():Stage {
return Lib.current.stage;
}
public function new(content:C) {
id = Type.getClassName(Type.getClass(this)) + counter++;
size = new SizeSet();

View File

@@ -144,8 +144,8 @@ class OverflowControl {
private function onTouchEnd(event:TouchEvent):Void {
event.preventDefault();
content.stage.removeEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
content.stage.removeEventListener(TouchEvent.TOUCH_END, onTouchEnd);
stage.removeEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
stage.removeEventListener(TouchEvent.TOUCH_END, onTouchEnd);
}
private function get_scrollX():HScrollBarView {