From ebd2a143005566358f4a2356f279386d2470be9a Mon Sep 17 00:00:00 2001 From: Humberto Alfonso Díaz Date: Fri, 5 Jul 2019 13:37:04 +0200 Subject: FUNCT Add temperature management --- src/js/temperature.js | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/js/temperature.js (limited to 'src/js') diff --git a/src/js/temperature.js b/src/js/temperature.js new file mode 100644 index 0000000..45cbe8c --- /dev/null +++ b/src/js/temperature.js @@ -0,0 +1,73 @@ +var left = 22; +var right = 22; + +var lowTemperature = 15; +var hiTemperature = 30; +var temperatures = []; + +var isScrolling; +var elementHeight; + +function createTemperatureElement() { + var element = document.createElement('div'); + element.classList = ['temperature']; + element.style.height = elementHeight+'px'; + element.style.lineHeight = elementHeight+'px'; + return element; +} + +function update(node, index) { + node.scrollTop = index*elementHeight; + + for( var i=0; i