0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-12-22 21:23:48 +01:00

Remove event handler from stop butten when disabled

This commit is contained in:
peteruithoven 2013-10-12 17:30:39 +02:00
parent 51d44c9086
commit af325f4bd3

View File

@ -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