Merge pull request #3 from JunkJumper/Td3

LE TAQUIN FONCTIONNE !!!!
This commit is contained in:
JunkJumper 2020-02-19 16:15:27 +01:00 committed by GitHub
commit 6d849d6bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,11 +16,14 @@ function selection(event) {
var maCase = event.currentTarget; var maCase = event.currentTarget;
var vide = document.body.querySelector(".case.vide"); var vide = document.body.querySelector(".case.vide");
if ((maCase.offsetTop == vide.offsetTop && Math.abs(maCase.offsetLeft - vide.offsetLeft == 102)) || if ((maCase.offsetTop == vide.offsetTop && Math.abs(maCase.offsetLeft - vide.offsetLeft) == 102) ||
(maCase.offsetLeft == vide.offsetLeft && Math.abs(maCase.offsetTop - vide.offsetTop == 102))) { (maCase.offsetLeft == vide.offsetLeft && Math.abs(maCase.offsetTop - vide.offsetTop) == 102)) {
console.log("1"); console.log("ok");
maCase.className = "case vide"; maCase.className = "case vide";
var buff = maCase.innerHTML;
maCase.innerHTML = "";
vide.className = "case"; vide.className = "case";
vide.innerHTML = buff;
} }
console.log(event.currentTarget.className + " : " + event.currentTarget.innerText); console.log(event.currentTarget.className + " : " + event.currentTarget.innerText);