fix: add 3s debounce to opening() across all 8 dealer JS files
This commit is contained in:
@@ -227,7 +227,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
if(game_id == 1){
|
if(game_id == 1){
|
||||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
||||||
|
|||||||
@@ -79,7 +79,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
if(game_id == 1){
|
if(game_id == 1){
|
||||||
var opening = $('#opening').val();
|
var opening = $('#opening').val();
|
||||||
|
|||||||
@@ -193,7 +193,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
if(game_id == 1){
|
if(game_id == 1){
|
||||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
||||||
|
|||||||
@@ -194,7 +194,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
if(game_id == 1){
|
if(game_id == 1){
|
||||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
||||||
|
|||||||
@@ -71,7 +71,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
let result = $('#dice_result').val();
|
let result = $('#dice_result').val();
|
||||||
websocket.emit('openingDice',{table_id : table_id, number_tab_id : number_tab_id, result : result});
|
websocket.emit('openingDice',{table_id : table_id, number_tab_id : number_tab_id, result : result});
|
||||||
|
|||||||
@@ -179,7 +179,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
if(game_id == 1){
|
if(game_id == 1){
|
||||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
||||||
|
|||||||
@@ -240,7 +240,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
$('.control-box .btn-box2 span').removeClass('on');
|
$('.control-box .btn-box2 span').removeClass('on');
|
||||||
if(game_id == 1){
|
if(game_id == 1){
|
||||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
||||||
|
|||||||
@@ -69,7 +69,11 @@ var resetBoot = function(){
|
|||||||
layer.close(index);
|
layer.close(index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var isOpening = false;
|
||||||
var opening = function(){
|
var opening = function(){
|
||||||
|
if(isOpening) return;
|
||||||
|
isOpening = true;
|
||||||
|
setTimeout(function(){ isOpening = false; }, 3000);
|
||||||
let result = $('#roulette_result').val();
|
let result = $('#roulette_result').val();
|
||||||
websocket.emit('openingRoulette',{table_id : table_id, number_tab_id : number_tab_id, result : result});
|
websocket.emit('openingRoulette',{table_id : table_id, number_tab_id : number_tab_id, result : result});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user