Merge pull request #3 from synth-ruiner/master
ipad support - hopefully
This commit is contained in:
commit
de62894856
12
index.html
12
index.html
|
@ -260,7 +260,7 @@
|
|||
}
|
||||
|
||||
window.removeClearedRows = function() {
|
||||
var rowsToRemove = $('#game ul').filter(function() {
|
||||
var rowsToRemove = $('#game ul:not(.removing)').filter(function() {
|
||||
return $(this).checkRow();
|
||||
});
|
||||
|
||||
|
@ -268,6 +268,8 @@
|
|||
|
||||
if (rowsToRemove.length == 0) return;
|
||||
|
||||
rowsToRemove.addClass("removing");
|
||||
|
||||
rowsToRemove.each(function() {
|
||||
score += $(this).children('.mine').length;
|
||||
|
||||
|
@ -371,10 +373,6 @@
|
|||
return $(this).parent('ul').index();
|
||||
}
|
||||
|
||||
$.fn.getGameboardPos = function() {
|
||||
return gameBoard[$(this).getY()][$(this).getX()];
|
||||
}
|
||||
|
||||
$.fn.isMine = function() {
|
||||
return $(this).hasClass("mine");
|
||||
}
|
||||
|
@ -550,7 +548,7 @@
|
|||
});
|
||||
|
||||
|
||||
$(document).on("mousedown", "li", function(event) {
|
||||
$(document).on("mousedown touchstart", "li", function(event) {
|
||||
var x = $(this).getX();
|
||||
var y = $(this).getY();
|
||||
|
||||
|
@ -564,7 +562,7 @@
|
|||
clearTimeout(timeout);
|
||||
});
|
||||
|
||||
$(document).on("mouseup", "li", function(event) {
|
||||
$(document).on("mouseup touchend", "li", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
clearTimeout(timeout);
|
||||
|
|
Loading…
Reference in New Issue