Mercurial > hg > webaudioevaluationtool
comparison 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 |
comparison
equal
deleted
inserted
replaced
472:23f77550b842 | 473:5bd699bc44d2 |
---|---|
232 var outsideReference = document.getElementById('outside-reference'); | 232 var outsideReference = document.getElementById('outside-reference'); |
233 if (outsideReference != null) { | 233 if (outsideReference != null) { |
234 $(outsideReference).removeClass('track-slider-playing'); | 234 $(outsideReference).removeClass('track-slider-playing'); |
235 } | 235 } |
236 }; | 236 }; |
237 this.resize = function(event) | |
238 { | |
239 this.holder.style.width = window.innerWidth-200 + 'px'; | |
240 this.slider.style.width = window.innerWidth-420 + 'px'; | |
241 }; | |
237 this.enable = function() | 242 this.enable = function() |
238 { | 243 { |
239 // This is used to tell the interface object that playback of this node is ready | 244 // This is used to tell the interface object that playback of this node is ready |
240 this.play.disabled = false; | 245 this.play.disabled = false; |
241 this.play.textContent = "Play"; | 246 this.play.textContent = "Play"; |
278 var totalHeight = (numObj * 125)-25; | 283 var totalHeight = (numObj * 125)-25; |
279 document.getElementById('scale-holder').style.width = window.innerWidth-220 + 'px'; | 284 document.getElementById('scale-holder').style.width = window.innerWidth-220 + 'px'; |
280 var canvas = document.getElementById('scale-canvas'); | 285 var canvas = document.getElementById('scale-canvas'); |
281 canvas.width = window.innerWidth-420; | 286 canvas.width = window.innerWidth-420; |
282 canvas.height = totalHeight; | 287 canvas.height = totalHeight; |
288 for (var i in audioEngineContext.audioObjects) | |
289 { | |
290 if (audioEngineContext.audioObjects[i].specification.type != 'outside-reference'){ | |
291 audioEngineContext.audioObjects[i].interfaceDOM.resize(event); | |
292 } | |
293 } | |
283 drawScale(); | 294 drawScale(); |
284 } | 295 } |
285 | 296 |
286 function drawScale() | 297 function drawScale() |
287 { | 298 { |