Remove outline and use mousedown.
This commit is contained in:
parent
d16d8c6ce3
commit
3d290f2ccc
|
|
@ -1,3 +1,7 @@
|
||||||
|
* {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ function resizeStage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles.forEach(function (button) {
|
tiles.forEach(function (button) {
|
||||||
button.onclick = function (e) {
|
button.onmousedown = function (e) {
|
||||||
var tileId = e.target.id;
|
var tileId = e.target.id;
|
||||||
var index = grid.indexOf(parseInt(tileId));
|
var index = grid.indexOf(parseInt(tileId));
|
||||||
moveHorizontal(index);
|
moveHorizontal(index);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||||
<link rel="stylesheet" href="app.css"/>
|
<link rel="stylesheet" href="app.css"/>
|
||||||
<title>Number Slide</title>
|
<title>Number Slide</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
Reference in New Issue