mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Integrated progressbar
This commit is contained in:
parent
53e8ccc294
commit
b978b5ada5
@ -12,7 +12,6 @@ var btnOops, btnStop, btnClear;
|
|||||||
var btnMoveUp, btnMoveDown, btnTwistLeft, btnTwistRight;
|
var btnMoveUp, btnMoveDown, btnTwistLeft, btnTwistRight;
|
||||||
var btnInfo, btnSettings;
|
var btnInfo, btnSettings;
|
||||||
//var btnDebug; // debug
|
//var btnDebug; // debug
|
||||||
var displayTemp, displayProgress;
|
|
||||||
|
|
||||||
var state;
|
var state;
|
||||||
var prevState;
|
var prevState;
|
||||||
@ -35,8 +34,6 @@ function initButtonBehavior() {
|
|||||||
btnNew = $(".btnNew");
|
btnNew = $(".btnNew");
|
||||||
btnPrint= $(".btnPrint");
|
btnPrint= $(".btnPrint");
|
||||||
btnStop = $(".btnStop");
|
btnStop = $(".btnStop");
|
||||||
displayTemp = $("#thermometerContainer");
|
|
||||||
displayProgress = $("#printProgressContainer");
|
|
||||||
|
|
||||||
btnPrevious = $(".btnPrevious");
|
btnPrevious = $(".btnPrevious");
|
||||||
btnNext = $(".btnNext");
|
btnNext = $(".btnNext");
|
||||||
@ -317,7 +314,7 @@ function update() {
|
|||||||
setState(printer.state,printer.hasControl);
|
setState(printer.state,printer.hasControl);
|
||||||
|
|
||||||
thermometer.update(printer.temperature, printer.targetTemperature);
|
thermometer.update(printer.temperature, printer.targetTemperature);
|
||||||
//TODO: update progress
|
progressbar.update(printer.currentLine, printer.totalLines);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setState(newState,newHasControl) { //TODO add hasControl
|
function setState(newState,newHasControl) { //TODO add hasControl
|
||||||
@ -362,10 +359,10 @@ function setState(newState,newHasControl) { //TODO add hasControl
|
|||||||
// progress indicator
|
// progress indicator
|
||||||
switch(newState) {
|
switch(newState) {
|
||||||
case Printer.PRINTING_STATE:
|
case Printer.PRINTING_STATE:
|
||||||
displayProgress.show(); // TODO: Show progress
|
progressbar.show();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
displayProgress.hide(); // TODO: hide progress
|
progressbar.hide();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,8 +53,6 @@ $(function() {
|
|||||||
initVerticalShapes();
|
initVerticalShapes();
|
||||||
|
|
||||||
thermometer.init($("#thermometerCanvas"), $("#thermometerContainer"));
|
thermometer.init($("#thermometerCanvas"), $("#thermometerContainer"));
|
||||||
|
|
||||||
progressbar = new Progressbar();
|
|
||||||
progressbar.init($("#progressbarCanvas"), $("#progressbarCanvasContainer"));
|
progressbar.init($("#progressbarCanvas"), $("#progressbarCanvasContainer"));
|
||||||
|
|
||||||
|
|
||||||
@ -98,10 +96,10 @@ $(function() {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
//*/
|
//*/
|
||||||
}
|
}
|
||||||
showhideInterval = setInterval(showOrHideThermo, 2500);
|
//showhideInterval = setInterval(showOrHideThermo, 2500);
|
||||||
});
|
});
|
||||||
|
|
||||||
var showhideInterval;
|
/*var showhideInterval;
|
||||||
var showOrHide = false;
|
var showOrHide = false;
|
||||||
|
|
||||||
function showOrHideThermo() {
|
function showOrHideThermo() {
|
||||||
@ -115,7 +113,7 @@ function showOrHideThermo() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
showOrHide = !showOrHide;
|
showOrHide = !showOrHide;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
function settingsLoaded() {
|
function settingsLoaded() {
|
||||||
console.log("settingsLoaded");
|
console.log("settingsLoaded");
|
||||||
|
Loading…
Reference in New Issue
Block a user