NOTE: hack! this is temporary.

Hide stop button after print is started, until gcode sending is completed (to prevent sending gcode after stopping).
This commit is contained in:
Wouter R 2013-10-14 17:46:55 +02:00
parent 07fa1f62e8
commit 356630e7ba
1 changed files with 6 additions and 2 deletions

View File

@ -189,7 +189,7 @@ function initButtonBehavior() {
}
function stopPrint() {
console.log("f:stopPrint() >> sendPrintCommands = " + sendPrintCommands);
if (!confirm("Weet je zeker dat je de huidige print wilt stoppen?")) return;
if (!confirm("Weet je zeker dat je huidige print wilt stoppen?")) return;
if (sendPrintCommands) printer.stop();
setState(Printer.STOPPING_STATE,printer.hasControl);
}
@ -206,6 +206,8 @@ function nextDoodle(e) {
function print(e) {
console.log("f:print() >> sendPrintCommands = " + sendPrintCommands);
$(".btnPrint").css("display","none");
$("#textdump").text("");
if (_points.length > 2) {
@ -230,7 +232,9 @@ function print(e) {
console.log("f:print >> not enough points!");
}
alert("Je tekening zal nu geprint worden.");
alert("Je tekening zal nu geprint worden");
$(".btnPrint").css("display","block");
// $.post("/doodle3d.of", { data:output }, function(data) {
// btnPrint.disabled = false;