summaryrefslogtreecommitdiff
path: root/webcards/client.html
diff options
context:
space:
mode:
authorKyle Gunger <corechg@gmail.com>2020-05-17 20:31:10 -0400
committerKyle Gunger <corechg@gmail.com>2020-05-17 20:31:10 -0400
commit20201f77b5cf5cbb1c70b1cc51c4108d620a3202 (patch)
tree30e2871b60ac12f5b3ac2df5a1176faf682ce3ac /webcards/client.html
parentb48f0adccb11619680a47cac5fa9c68f638bd489 (diff)
[Webcards] styles and some fixes
+ Fixed draging transformed cards + Fixed mobile styles + Theme template complete
Diffstat (limited to 'webcards/client.html')
-rw-r--r--webcards/client.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/webcards/client.html b/webcards/client.html
index 069a041..e9cf664 100644
--- a/webcards/client.html
+++ b/webcards/client.html
@@ -45,7 +45,7 @@
<body>
- <div class="table" state="closed" onmouseup="d.stopDraggingAll()">
+ <div class="table" state="closed" onmouseup="md.stopDraggingAll()">
</div>
@@ -120,7 +120,7 @@
// Live testing purposes only
- var d = new MultiDrag();
+ var md = new MultiDrag();
var c1 = new Card({
all: [
{
@@ -145,14 +145,16 @@
}
]
});
+ var d = new Deck();
+ d.appendCard(c2);
+ d.appendCard(c1);
function test() {
- c1.e.addEventListener("mousedown", d.startDragging.bind(d));
- c1.e.addEventListener("mouseup", d.stopDraggingAll.bind(d));
- c2.e.addEventListener("mousedown", d.startDragging.bind(d));
- c2.e.addEventListener("mouseup", d.stopDraggingAll.bind(d));
+ c1.e.addEventListener("mousedown", md.startDragging.bind(md));
+ c1.e.addEventListener("mouseup", md.stopDraggingAll.bind(md));
+ c2.e.addEventListener("mousedown", md.startDragging.bind(md));
+ c2.e.addEventListener("mouseup", md.stopDraggingAll.bind(md));
- game.tab.root.append(c1.e);
- game.tab.root.append(c2.e);
+ game.tab.root.append(d.e);
game.tab.openTable();
}
</script>