diff --git a/js/Thermometer.js b/js/Thermometer.js index 687b94f..50e8bf8 100644 --- a/js/Thermometer.js +++ b/js/Thermometer.js @@ -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'); diff --git a/js/main.js b/js/main.js index 4d5ca0d..a6d02ec 100644 --- a/js/main.js +++ b/js/main.js @@ -37,7 +37,7 @@ $(function() { initPreviewRendering(); initButtonBehavior(); - thermometer.init($("#thermometerCanvas")); + thermometer.init($("#thermometerCanvas"), $("#thermometerContainer")); printer.init(); $(document).on(Printer.UPDATE,update);