mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-12-22 21:23:48 +01:00
additions to Thermometer to allow the general Update function to show() and hide() the Thermometer's container DIV
This commit is contained in:
parent
77b6ed3357
commit
82165c585b
@ -1,3 +1,5 @@
|
||||
var $displayThermometer;
|
||||
|
||||
function Thermometer() {
|
||||
this.currentTemperature = 0; // default val
|
||||
this.targetTemperature = 180; // default val
|
||||
@ -20,9 +22,11 @@ function Thermometer() {
|
||||
[244, 50, 50] // 'ready / hot'
|
||||
];
|
||||
|
||||
this.init = function(targCanvas) {
|
||||
this.init = function(targCanvas, targCanvasContainer) {
|
||||
console.log("Thermometer.init()");
|
||||
|
||||
$displayThermometer = targCanvasContainer;
|
||||
|
||||
this.$canvas = targCanvas;
|
||||
this.canvas = this.$canvas[0];
|
||||
this.context = this.canvas.getContext('2d');
|
||||
|
@ -37,7 +37,7 @@ $(function() {
|
||||
initPreviewRendering();
|
||||
initButtonBehavior();
|
||||
|
||||
thermometer.init($("#thermometerCanvas"));
|
||||
thermometer.init($("#thermometerCanvas"), $("#thermometerContainer"));
|
||||
|
||||
printer.init();
|
||||
$(document).on(Printer.UPDATE,update);
|
||||
|
Loading…
Reference in New Issue
Block a user