|
@@ -150,13 +150,13 @@ class Boulier {
|
|
let changeColor = Math.round(this._ball / this.color[i].length);
|
|
let changeColor = Math.round(this._ball / this.color[i].length);
|
|
for(let j = 0; j < this.boulier[i].length; j++) {
|
|
for(let j = 0; j < this.boulier[i].length; j++) {
|
|
const elt = this.boulier[i][j];
|
|
const elt = this.boulier[i][j];
|
|
- html += '<div class="cell"><div class="line" data-line="' + i + '" data-col="' + j + '" ondragover="allowDrop(event)" ondrop="ballDrop(event, this)""></div>';
|
|
|
|
|
|
+ html += '<div class="cell"><div class="line" data-line="' + i + '" data-col="' + j + '" ondragover="allowDrop(event)" ondrop="ballDrop(event, this)"></div>';
|
|
if (elt) {
|
|
if (elt) {
|
|
let ballColor = this.color[i][Math.trunc(cptBall/changeColor)];
|
|
let ballColor = this.color[i][Math.trunc(cptBall/changeColor)];
|
|
if (ballColor == null) {
|
|
if (ballColor == null) {
|
|
ballColor = this.color[i][this.color[i].length - 1];
|
|
ballColor = this.color[i][this.color[i].length - 1];
|
|
}
|
|
}
|
|
- html += '<div class="ball ' + ballColor + '" data-line="' + i + '" data-col="' + j + '" draggable="true" ondragstart="ballDrag(event)" onclick="ballClick(this)"></div>';
|
|
|
|
|
|
+ html += '<div class="ball ' + ballColor + '" data-line="' + i + '" data-col="' + j + '" draggable="true" ondragstart="ballDrag(event)" ondragover="allowDrop(event)" ondrop="ballDrop(event, this)" onclick="ballClick(this)"></div>';
|
|
cptBall++;
|
|
cptBall++;
|
|
}
|
|
}
|
|
html += '</div>';
|
|
html += '</div>';
|