# HG changeset patch # User Nicholas Jillings # Date 1452693720 0 # Node ID 5d29ff213161f5b02d31ff7b1e2cdcedb6c39010 # Parent c1c5cb020fd3df7cd79e813c25d8d3e1b6418c74 popup resize not called if not created. Horizontal sliders resize on window resize function. diff -r c1c5cb020fd3 -r 5d29ff213161 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 c1c5cb020fd3 -r 5d29ff213161 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(); }