Mercurial > hg > webaudioevaluationtool
diff interfaces/horizontal-sliders.js @ 473:5bd699bc44d2 Dev_main
popup resize not called if not created. Horizontal sliders resize on window resize function.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 13 Jan 2016 14:02:00 +0000 |
parents | 23f77550b842 |
children | 9ae9d1fb80bf |
line wrap: on
line diff
--- a/interfaces/horizontal-sliders.js Wed Jan 13 12:27:38 2016 +0000 +++ b/interfaces/horizontal-sliders.js Wed Jan 13 14:02:00 2016 +0000 @@ -234,6 +234,11 @@ $(outsideReference).removeClass('track-slider-playing'); } }; + this.resize = function(event) + { + this.holder.style.width = window.innerWidth-200 + 'px'; + this.slider.style.width = window.innerWidth-420 + 'px'; + }; this.enable = function() { // This is used to tell the interface object that playback of this node is ready @@ -280,6 +285,12 @@ var canvas = document.getElementById('scale-canvas'); canvas.width = window.innerWidth-420; canvas.height = totalHeight; + for (var i in audioEngineContext.audioObjects) + { + if (audioEngineContext.audioObjects[i].specification.type != 'outside-reference'){ + audioEngineContext.audioObjects[i].interfaceDOM.resize(event); + } + } drawScale(); }