Determine the displayed shape of the visible canvas; react to changes in the displayed shape
This canvas is resizable - drag the bottom right corner to change its dimensions.
Test purpose
- Create a resizable <canvas> element
- Create a Phrase entity to display in the canvas
- Create hook functions for the Phrase that will be invoked as the <canvas> dimensions are changed
- Check that appropriate hooks are fired, and the Phrase entity updated, in response to changes in the canvas element's dimensions - five states ('banner', 'landscape', 'rectangle', 'portrait', 'skyscraper') should be viewable as the canvas corner is dragged horizontally right (and up) and then diagonally down/left
Annotated code