Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the demos I've looked at, canvas elements in tracks don't scale with everything else during zoom transitions, leaving gaps (on zoom-in transitions) or overlaps (on zoom-outs).
Canvas elements have an internal notion of width and height, which are the pixel dimensions of the drawing area. And, as HTML elements, they also have CSS width and height properties, which do not have to correspond to the pixel dimensions of the drawing area. In other words, canvas.width and canvas.style.width are semantically different and can be set independently.
This patch sets the CSS width of canvas elements to 100% so that they stretch and shrink with everything else during zooms. I've barely tested it (only on Firefox) but it seems to do what I wanted.