CC-2301 : not drawing fades of length zero.
This commit is contained in:
parent
0169c01724
commit
ef100f89f1
|
@ -395,26 +395,30 @@ WaveformDrawer.prototype.drawFade = function(id, type, shape, start, end) {
|
||||||
ctx,
|
ctx,
|
||||||
tmpCtx;
|
tmpCtx;
|
||||||
|
|
||||||
width = ~~(end - start + 1);
|
if ((end - start) === 0) {
|
||||||
left = start;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
div = document.createElement("div");
|
width = ~~(end - start + 1);
|
||||||
div.classList.add("playlist-fade");
|
left = start;
|
||||||
div.classList.add("playlist-fade-"+id);
|
|
||||||
div.style.width = width+"px";
|
|
||||||
div.style.height = this.height+"px";
|
|
||||||
div.style.top = 0;
|
|
||||||
div.style.left = left+"px";
|
|
||||||
|
|
||||||
canv = document.createElement("canvas");
|
div = document.createElement("div");
|
||||||
canv.setAttribute('width', width);
|
div.classList.add("playlist-fade");
|
||||||
canv.setAttribute('height', this.height);
|
div.classList.add("playlist-fade-"+id);
|
||||||
ctx = canv.getContext('2d');
|
div.style.width = width+"px";
|
||||||
|
div.style.height = this.height+"px";
|
||||||
|
div.style.top = 0;
|
||||||
|
div.style.left = left+"px";
|
||||||
|
|
||||||
this.drawFadeCurve(ctx, shape, type, width);
|
canv = document.createElement("canvas");
|
||||||
|
canv.setAttribute('width', width);
|
||||||
|
canv.setAttribute('height', this.height);
|
||||||
|
ctx = canv.getContext('2d');
|
||||||
|
|
||||||
div.appendChild(canv);
|
this.drawFadeCurve(ctx, shape, type, width);
|
||||||
fragment.appendChild(div);
|
|
||||||
|
div.appendChild(canv);
|
||||||
|
fragment.appendChild(div);
|
||||||
|
|
||||||
for (i = 0, len = this.channels.length; i < len; i++) {
|
for (i = 0, len = this.channels.length; i < len; i++) {
|
||||||
dup = fragment.cloneNode(true);
|
dup = fragment.cloneNode(true);
|
||||||
|
|
Loading…
Reference in New Issue