mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Remove event handler from stop butten when disabled
This commit is contained in:
parent
51d44c9086
commit
af325f4bd3
@ -185,7 +185,7 @@ function initButtonBehavior() {
|
||||
})
|
||||
//*/
|
||||
|
||||
btnStop.on('touchstart mousedown',stopPrint);
|
||||
//btnStop.on('touchstart mousedown',stopPrint);
|
||||
}
|
||||
function stopPrint() {
|
||||
console.log("f:stopPrint() >> sendPrintCommands = " + sendPrintCommands);
|
||||
@ -321,8 +321,11 @@ function setState(newState,newHasControl) { //TODO add hasControl
|
||||
var stopEnabled = ((newState == Printer.PRINTING_STATE || newState == Printer.BUFFERING_STATE) && newHasControl);
|
||||
if(stopEnabled) {
|
||||
btnStop.removeClass("disabled");
|
||||
btnStop.unbind('touchstart mousedown');
|
||||
btnStop.bind('touchstart mousedown',stopPrint);
|
||||
} else {
|
||||
btnStop.addClass("disabled");
|
||||
btnStop.unbind('touchstart mousedown');
|
||||
}
|
||||
|
||||
// thermometer
|
||||
|
Loading…
Reference in New Issue
Block a user