@dreamworld/dw-ripple 2.4.0-development.5 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dw-ripple.js +4 -26
  2. package/package.json +1 -1
package/dw-ripple.js CHANGED
@@ -49,8 +49,6 @@ export class DwRipple extends Ripple {
49
49
  this.__onTouchStart = this.__onTouchStart.bind(this);
50
50
  this.__onMouseUp = this.__onMouseUp.bind(this);
51
51
  this.__onTouchEnd = this.__onTouchEnd.bind(this);
52
- this.__onPointerMove = this.__onPointerMove.bind(this);
53
- this.__onTouchMove = this.__onTouchMove.bind(this);
54
52
 
55
53
  if (!this.disableHover) {
56
54
  parent.addEventListener("mouseenter", this._rippleHander.startHover);
@@ -61,34 +59,16 @@ export class DwRipple extends Ripple {
61
59
 
62
60
  parent.addEventListener("mousedown", this.__onMouseDown);
63
61
  parent.addEventListener("touchstart", this.__onTouchStart);
64
- window.addEventListener("pointermove", this.__onPointerMove);
65
- window.addEventListener("touchmove", this.__onTouchMove);
66
62
  }
67
63
 
68
64
  __onMouseDown(e) {
69
- this.delayMouseDown = setTimeout(() => {
70
- window.addEventListener("mouseup", this.__onMouseUp);
71
- this._rippleHander.startPress(e);
72
- }, 50);
65
+ window.addEventListener("mouseup", this.__onMouseUp);
66
+ this._rippleHander.startPress(e);
73
67
  }
74
68
 
75
69
  __onTouchStart(e) {
76
- this.delayTouchStart = setTimeout(() => {
77
- window.addEventListener("touchend", this.__onTouchEnd);
78
- this._rippleHander.startPress(e);
79
- }, 50);
80
- }
81
-
82
- __onPointerMove() {
83
- if (this.delayMouseDown) {
84
- clearTimeout(this.delayMouseDown);
85
- }
86
- }
87
-
88
- __onTouchMove() {
89
- if (this.delayTouchStart) {
90
- clearTimeout(this.delayTouchStart);
91
- }
70
+ window.addEventListener("touchend", this.__onTouchEnd);
71
+ this._rippleHander.startPress(e);
92
72
  }
93
73
 
94
74
  __onMouseUp() {
@@ -125,8 +105,6 @@ export class DwRipple extends Ripple {
125
105
 
126
106
  window.removeEventListener("touchend", this.__onTouchEnd);
127
107
  window.removeEventListener("mouseup", this.__onMouseUp);
128
- window.removeEventListener("pointermove", this.__onPointerMove);
129
- window.removeEventListener("touchmove", this.__onTouchMove);
130
108
 
131
109
  super.disconnectedCallback();
132
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamworld/dw-ripple",
3
- "version": "2.4.0-development.5",
3
+ "version": "2.4.0",
4
4
  "description": "Ripple element created as child-class of [`mwc-ripple`] (https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)",
5
5
  "main": "dw-ripple.js",
6
6
  "scripts": {