diff --git a/client/package.json b/client/package.json index b88e22e9..f2638d7c 100755 --- a/client/package.json +++ b/client/package.json @@ -4,8 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "start": "parcel index.html --port 40080 --no-hmr", - "start-lite": "parcel index.html --port 40080 --no-hmr --no-source-maps", + "start": "parcel index.html --port 40080 --no-hmr --no-source-maps", "build": "rm -rf dist && parcel build index.html", "lint": "eslint --fix --ext .jsx src/", "test": "echo \"Error: no test specified\" && exit 1" diff --git a/client/src/scenes/cryp.list.js b/client/src/scenes/cryp.list.js index d9fb325d..b7aa761c 100644 --- a/client/src/scenes/cryp.list.js +++ b/client/src/scenes/cryp.list.js @@ -22,10 +22,9 @@ class CrypList extends Phaser.Scene { } redraw() { - this.children.list.forEach(t => { - t.disableInteractive(); - t.destroy(); - }); + for (let i = this.children.list.length - 1; i >= 0; i--) { + this.children.list[i].destroy(); + } } renderCryps(cryps) { diff --git a/client/src/scenes/cryp.page.js b/client/src/scenes/cryp.page.js index f0eed295..b18443b6 100644 --- a/client/src/scenes/cryp.page.js +++ b/client/src/scenes/cryp.page.js @@ -35,7 +35,9 @@ class CrypPage extends Phaser.Scene { } redraw() { - this.children.list.forEach(t => t.destroy()); + for (let i = this.children.list.length - 1; i >= 0; i--) { + this.children.list[i].destroy(); + } } renderCryp(cryp) { diff --git a/client/src/scenes/cryp.row.js b/client/src/scenes/cryp.row.js index b4508a24..d8e3b77b 100644 --- a/client/src/scenes/cryp.row.js +++ b/client/src/scenes/cryp.row.js @@ -8,7 +8,7 @@ const TOP_MARGIN = 50; const ROW_MARGIN = 50; const TEXT_MARGIN = 24; -const xPos = i => Math.random() * 1400; +const xPos = i => 0; const yPos = i => (i * ROW_HEIGHT + ROW_MARGIN) + TOP_MARGIN; function crypRow(list, cryp, i) {