summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-11-15 01:52:04 -0500
committerKyle Gunger <kgunger12@gmail.com>2024-11-15 01:52:04 -0500
commitd00bfda4ffafa8c2119c97217a259d3ef97d0af7 (patch)
tree85f095133be1aa97fcb184974e639d0a9fd9d357
parent80454eeb792f66816c62cdb78c39e0c802f9e7ed (diff)
Touch testing
-rw-r--r--index.html2
-rw-r--r--scripts/gui-common/widgets.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/index.html b/index.html
index c075753..52fb7ff 100644
--- a/index.html
+++ b/index.html
@@ -32,7 +32,7 @@
<a class="nav-el" href="?page=automation">Home Automation</a>
</nav>
- <content>
+ <content style="height:300vh; flex-direction: column; justify-content: space-evenly;">
</content>
<script src="scripts/gui-common/color.js"></script>
diff --git a/scripts/gui-common/widgets.js b/scripts/gui-common/widgets.js
index 3dda499..0591da6 100644
--- a/scripts/gui-common/widgets.js
+++ b/scripts/gui-common/widgets.js
@@ -85,6 +85,7 @@ class Widget extends EventTarget{
this.dispatchEvent(new CustomEvent("inactive", {detail: {widget: this, event: new TouchEvent(event.type, event)}}));
else
this.dispatchEvent(new TouchEvent(event.type, event));
+ event.preventDefault();
}
/** @param {Event} event */
@@ -388,6 +389,7 @@ class WidgetDragable extends Widget
#touch(event)
{
console.log(event.type, event.changedTouches);
+ event.preventDefault();
}
}