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 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 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.
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.
@ -49,10 +44,8 @@ public class TouchEvent extends Event {
isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN,
sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN,
relatedObject: InteractiveObject = null, ctrlKey: Boolean = false,
altKey: Boolean = false, shiftKey: Boolean = false, commandKey: Boolean = false,
controlKey: Boolean = false, timestamp: Number = NaN, touchIntent: String = "unknown",
samples: ByteArray = null, isTouchPointCanceled: Boolean = false) {
super(type, bubbles, cancelable, samples);
altKey: Boolean = false, shiftKey: Boolean = false) {
super(type, bubbles, cancelable);
this.touchPointID = touchPointID;
this.isPrimaryTouchPoint = isPrimaryTouchPoint;
this.localX = localX;
@ -64,11 +57,6 @@ public class TouchEvent extends Event {
this.ctrlKey = ctrlKey;
this.altKey = altKey;
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 {
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.altKey, this.shiftKey, this.commandKey, this.controlKey, this.timestamp, this.touchIntent,
this.isTouchPointCanceled);
this.altKey, this.shiftKey);
}
// 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 {
return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID",
"isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey",
"altKey", "shiftKey", "commandKey", "controlKey", "timestamp", "touchIntent", "isTouchPointCanceled",
"isRelatedObjectInaccessible", "stageX", "stageY");
"altKey", "shiftKey", "isRelatedObjectInaccessible", "stageX", "stageY");
}
// Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified.
@ -111,4 +97,4 @@ public class TouchEvent extends Event {
return this._stageY;
}
}
}
}