perfect-gui 4.0.1 → 4.0.3

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.
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "perfect-gui",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Nice and simple GUI for JavaScript",
5
5
  "main": "src/index.js",
6
- "directories": {
7
- "example": "examples"
8
- },
9
6
  "scripts": {
10
7
  "test": "echo \"Error: no test specified\" && exit 1"
11
8
  },
package/src/index.js CHANGED
@@ -645,8 +645,8 @@ export default class GUI {
645
645
 
646
646
  _makeDraggable() {
647
647
  var that = this;
648
- this.header.addEventListener('mousedown', dragMouseDown);
649
- this.header.addEventListener('mouseup', dragMouseUp);
648
+ this.header.addEventListener('pointerdown', dragMouseDown);
649
+ this.header.addEventListener('pointerup', dragMouseUp);
650
650
 
651
651
  function dragMouseDown(ev) {
652
652
  ev.preventDefault();
@@ -657,7 +657,7 @@ export default class GUI {
657
657
  that.position.prevX = ev.clientX;
658
658
  that.position.prevY = ev.clientY;
659
659
 
660
- document.addEventListener('mousemove', dragElement);
660
+ document.addEventListener('pointermove', dragElement);
661
661
  }
662
662
 
663
663
  function dragElement(ev) {
@@ -674,7 +674,7 @@ export default class GUI {
674
674
  }
675
675
 
676
676
  function dragMouseUp(ev) {
677
- document.removeEventListener('mousemove', dragElement);
677
+ document.removeEventListener('pointermove', dragElement);
678
678
  }
679
679
  }
680
680
 
package/src/styles.js CHANGED
@@ -46,6 +46,7 @@ return /* css */`
46
46
  line-height: 20px;
47
47
  padding-left: 8px;
48
48
  box-sizing: border-box;
49
+ touch-action: none;
49
50
  }
50
51
 
51
52
  .p-gui__header-close {