- this.choices.map(m => {
- // A "choice" is a move
- const applyMove = (e) => {
- e.stopPropagation();
- // Force a delay between move is shown and clicked
- // (otherwise a "double-click" bug might occur)
- if (Date.now() - this.clickTime < 200) return;
- this.play(m);
- this.choices = [];
- };
- const onClick =
- this.mobileBrowser
- ? { touchend: applyMove }
- : { mouseup: applyMove };
- return h(
- "div",
- {
- class: {
- board: true,
- ["board" + sizeY]: true
- },
- style: {
- width: 100 / this.choices.length + "%",
- "padding-bottom": 100 / this.choices.length + "%"
- }
- },
- [
- h("img", {
- attrs: {
- src:
- "/images/pieces/" +
- this.vr.getPPpath(
- m.appear[0].c + m.appear[0].p,
- // Extra arg useful for some variants:
- this.orientation) +
- ".svg"
+ [ h(
+ "div",
+ {
+ "class": { "full-width": true }
+ },
+ this.choices.map(m => {
+ // A "choice" is a move
+ const applyMove = (e) => {
+ e.stopPropagation();
+ // Force a delay between move is shown and clicked
+ // (otherwise a "double-click" bug might occur)
+ if (Date.now() - this.clickTime < 200) return;
+ this.choices = [];
+ this.play(m);
+ };
+ const onClick =
+ this.mobileBrowser
+ ? { touchend: applyMove }
+ : { mouseup: applyMove };
+ return h(
+ "div",
+ {
+ "class": {
+ board: true,
+ ["board" + sizeY]: true