Group some styles in variant.sass
[vchess.git] / public / javascripts / components / game.js
index a17876d..587587f 100644 (file)
@@ -257,7 +257,11 @@ Vue.component('my-game', {
                                                                attrs: { "src": '/images/pieces/' +
                                                                        VariantRules.getPpath(m.appear[0].c+m.appear[0].p) + '.svg' },
                                                                'class': { 'choice-piece': true },
-                                                               on: { "click": e => { this.play(m); this.choices=[]; } },
+                                                               on: {
+                                                                       "click": e => { this.play(m); this.choices=[]; },
+                                                                       // NOTE: add 'touchstart' event to fix a problem on smartphones
+                                                                       "touchstart": e => { this.play(m); this.choices=[]; },
+                                                               },
                                                        })
                                                ]
                                        );
@@ -367,7 +371,7 @@ Vue.component('my-game', {
                                                        attrs: { "aria-label": 'Undo' },
                                                        "class": {
                                                                "small": smallScreen,
-                                                               "marginleft": true,
+                                                               "spaceleft": true,
                                                        },
                                                },
                                                [h('i', { 'class': { "material-icons": true } }, "fast_rewind")]),
@@ -391,7 +395,7 @@ Vue.component('my-game', {
                                                        attrs: { "aria-label": 'Undo' },
                                                        "class": {
                                                                "small": smallScreen,
-                                                               "marginleft": true,
+                                                               "spaceleft": true,
                                                        },
                                                },
                                                [h('i', { 'class': { "material-icons": true } }, "undo")]