Fix TouchEvent.as (#11685)

* Update TouchEvent.as

* Oops
This commit is contained in:
Fancy2209 2023-06-23 08:14:23 +00:00 committed by GitHub
parent 58780b3a4e
commit 9ab4c163c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 19 deletions

View File

@ -36,11 +36,6 @@ public class TouchEvent extends Event {
public var ctrlKey: Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false). public var ctrlKey: Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false).
public var altKey: Boolean; // Indicates whether the Alt key is active (true) or inactive (false). public var altKey: Boolean; // Indicates whether the Alt key is active (true) or inactive (false).
public var shiftKey: Boolean; // Indicates whether the Shift key is active (true) or inactive (false). public var shiftKey: Boolean; // Indicates whether the Shift key is active (true) or inactive (false).
public var commandKey: Boolean; // Indicates whether the command key is activated (Mac only).
public var controlKey: Boolean; // Indicates whether the Control key is activated on Mac and whether the Ctrl key is activated on Windows or Linux.
public var timestamp: Number; // Reports the time of the event in relative milliseconds.
public var touchIntent: String; // Reports whether the touch was generated by the primary or the eraser end of a stylus.
public var isTouchPointCanceled: Boolean; // Reports that this touch input sequence was canceled by the operating system.
public var isRelatedObjectInaccessible: Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes. public var isRelatedObjectInaccessible: Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes.
private var _stageX: Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates. private var _stageX: Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates.
private var _stageY: Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates. private var _stageY: Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates.
@ -49,10 +44,8 @@ public class TouchEvent extends Event {
isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN, isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN,
sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN, sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN,
relatedObject: InteractiveObject = null, ctrlKey: Boolean = false, relatedObject: InteractiveObject = null, ctrlKey: Boolean = false,
altKey: Boolean = false, shiftKey: Boolean = false, commandKey: Boolean = false, altKey: Boolean = false, shiftKey: Boolean = false) {
controlKey: Boolean = false, timestamp: Number = NaN, touchIntent: String = "unknown", super(type, bubbles, cancelable);
samples: ByteArray = null, isTouchPointCanceled: Boolean = false) {
super(type, bubbles, cancelable, samples);
this.touchPointID = touchPointID; this.touchPointID = touchPointID;
this.isPrimaryTouchPoint = isPrimaryTouchPoint; this.isPrimaryTouchPoint = isPrimaryTouchPoint;
this.localX = localX; this.localX = localX;
@ -64,11 +57,6 @@ public class TouchEvent extends Event {
this.ctrlKey = ctrlKey; this.ctrlKey = ctrlKey;
this.altKey = altKey; this.altKey = altKey;
this.shiftKey = shiftKey; this.shiftKey = shiftKey;
this.commandKey = commandKey;
this.controlKey = controlKey;
this.timestamp = timestamp;
this.touchIntent = touchIntent;
this.isTouchPointCanceled = isTouchPointCanceled;
} }
@ -76,8 +64,7 @@ public class TouchEvent extends Event {
override public function clone(): Event { override public function clone(): Event {
return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint,
this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey,
this.altKey, this.shiftKey, this.commandKey, this.controlKey, this.timestamp, this.touchIntent, this.altKey, this.shiftKey);
this.isTouchPointCanceled);
} }
// Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event. // Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event.
@ -96,8 +83,7 @@ public class TouchEvent extends Event {
override public function toString(): String { override public function toString(): String {
return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID",
"isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey",
"altKey", "shiftKey", "commandKey", "controlKey", "timestamp", "touchIntent", "isTouchPointCanceled", "altKey", "shiftKey", "isRelatedObjectInaccessible", "stageX", "stageY");
"isRelatedObjectInaccessible", "stageX", "stageY");
} }
// Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified. // Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified.