Mercurial > hg > webaudioevaluationtool
comparison interfaces/timeline.js @ 2808:d5d374b399cb
Some restructuring of the timeline CSS/JS
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 25 Apr 2017 10:55:39 +0100 |
parents | 510a64224eec |
children | 3a2dbff86da9 |
comparison
equal
deleted
inserted
replaced
2807:510a64224eec | 2808:d5d374b399cb |
---|---|
254 comments: this.comments, | 254 comments: this.comments, |
255 layer1: document.createElement("canvas"), | 255 layer1: document.createElement("canvas"), |
256 layer2: document.createElement("canvas"), | 256 layer2: document.createElement("canvas"), |
257 layer3: document.createElement("canvas"), | 257 layer3: document.createElement("canvas"), |
258 layer4: document.createElement("canvas"), | 258 layer4: document.createElement("canvas"), |
259 resize: function (w) { | 259 resize: function () { |
260 var w = $(this.layer1.parentElement).width(); | |
260 this.layer1.width = w; | 261 this.layer1.width = w; |
261 this.layer2.width = w; | 262 this.layer2.width = w; |
262 this.layer3.width = w; | 263 this.layer3.width = w; |
263 this.layer4.width = w; | 264 this.layer4.width = w; |
264 this.layer1.style.width = w + "px"; | 265 this.layer1.style.width = w + "px"; |
407 this.playButton.DOM.textContent = "Wait"; | 408 this.playButton.DOM.textContent = "Wait"; |
408 | 409 |
409 buttonHolder.appendChild(this.playButton.DOM); | 410 buttonHolder.appendChild(this.playButton.DOM); |
410 | 411 |
411 this.resize = function () { | 412 this.resize = function () { |
412 var w = window.innerWidth; | 413 this.canvas.resize(); |
413 w = Math.min(w, 800); | |
414 w = Math.max(w, 200); | |
415 root.style.width = w + "px"; | |
416 var c_w = w - 100; | |
417 this.canvas.resize(c_w); | |
418 }; | 414 }; |
419 | 415 |
420 this.enable = function () { | 416 this.enable = function () { |
421 // This is used to tell the interface object that playback of this node is ready | 417 // This is used to tell the interface object that playback of this node is ready |
422 this.canvas.layer1.addEventListener("click", this.canvas); | 418 this.canvas.layer1.addEventListener("click", this.canvas); |