# HG changeset patch # User Nicholas Jillings # Date 1452693720 0 # Node ID 5bd699bc44d2a2c0ff5b3f5b2cede502275e274d # Parent 23f77550b842e9d938e828dbc678b5108712ebbf popup resize not called if not created. Horizontal sliders resize on window resize function. diff -r 23f77550b842 -r 5bd699bc44d2 core.js --- a/core.js Wed Jan 13 12:27:38 2016 +0000 +++ b/core.js Wed Jan 13 14:02:00 2016 +0000 @@ -664,11 +664,13 @@ this.resize = function(event) { // Called on window resize; - this.popup.style.left = (window.innerWidth/2)-250 + 'px'; - this.popup.style.top = (window.innerHeight/2)-125 + 'px'; - var blank = document.getElementsByClassName('testHalt')[0]; - blank.style.width = window.innerWidth; - blank.style.height = window.innerHeight; + if (this.popup != null) { + this.popup.style.left = (window.innerWidth/2)-250 + 'px'; + this.popup.style.top = (window.innerHeight/2)-125 + 'px'; + var blank = document.getElementsByClassName('testHalt')[0]; + blank.style.width = window.innerWidth; + blank.style.height = window.innerHeight; + } }; } diff -r 23f77550b842 -r 5bd699bc44d2 interfaces/horizontal-sliders.js --- 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(); }