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

Integrated progressbar

This commit is contained in:
peteruithoven 2013-10-17 14:40:33 +02:00
parent 53e8ccc294
commit b978b5ada5
2 changed files with 6 additions and 11 deletions

View File

@ -12,7 +12,6 @@ var btnOops, btnStop, btnClear;
var btnMoveUp, btnMoveDown, btnTwistLeft, btnTwistRight;
var btnInfo, btnSettings;
//var btnDebug; // debug
var displayTemp, displayProgress;
var state;
var prevState;
@ -35,8 +34,6 @@ function initButtonBehavior() {
btnNew = $(".btnNew");
btnPrint= $(".btnPrint");
btnStop = $(".btnStop");
displayTemp = $("#thermometerContainer");
displayProgress = $("#printProgressContainer");
btnPrevious = $(".btnPrevious");
btnNext = $(".btnNext");
@ -317,7 +314,7 @@ function update() {
setState(printer.state,printer.hasControl);
thermometer.update(printer.temperature, printer.targetTemperature);
//TODO: update progress
progressbar.update(printer.currentLine, printer.totalLines);
}
function setState(newState,newHasControl) { //TODO add hasControl
@ -362,10 +359,10 @@ function setState(newState,newHasControl) { //TODO add hasControl
// progress indicator
switch(newState) {
case Printer.PRINTING_STATE:
displayProgress.show(); // TODO: Show progress
progressbar.show();
break;
default:
displayProgress.hide(); // TODO: hide progress
progressbar.hide();
break;
}

View File

@ -53,8 +53,6 @@ $(function() {
initVerticalShapes();
thermometer.init($("#thermometerCanvas"), $("#thermometerContainer"));
progressbar = new Progressbar();
progressbar.init($("#progressbarCanvas"), $("#progressbarCanvasContainer"));
@ -98,10 +96,10 @@ $(function() {
}, 1000);
//*/
}
showhideInterval = setInterval(showOrHideThermo, 2500);
//showhideInterval = setInterval(showOrHideThermo, 2500);
});
var showhideInterval;
/*var showhideInterval;
var showOrHide = false;
function showOrHideThermo() {
@ -115,7 +113,7 @@ function showOrHideThermo() {
}
showOrHide = !showOrHide;
}
}*/
function settingsLoaded() {
console.log("settingsLoaded");