Rework away static members from pointer related classes
This commit is contained in:
@@ -195,6 +195,13 @@ const PointerEvent = function(type, originalEvent, opt_eventDict) {
|
||||
inherits(PointerEvent, Event);
|
||||
|
||||
|
||||
/**
|
||||
* Is the `buttons` property supported?
|
||||
* @type {boolean}
|
||||
*/
|
||||
const HAS_BUTTONS = false;
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {Object.<string, ?>} eventDict The event dictionary.
|
||||
@@ -223,7 +230,7 @@ PointerEvent.prototype.getButtons_ = function(eventDict) {
|
||||
//
|
||||
// This is fixed with DOM Level 4's use of buttons
|
||||
let buttons;
|
||||
if (eventDict.buttons || PointerEvent.HAS_BUTTONS) {
|
||||
if (eventDict.buttons || HAS_BUTTONS) {
|
||||
buttons = eventDict.buttons;
|
||||
} else {
|
||||
switch (eventDict.which) {
|
||||
@@ -256,13 +263,6 @@ PointerEvent.prototype.getPressure_ = function(eventDict, buttons) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Is the `buttons` property supported?
|
||||
* @type {boolean}
|
||||
*/
|
||||
PointerEvent.HAS_BUTTONS = false;
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the `buttons` property is supported.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user