UNPKG

scrawl-canvas

Version:
62 lines (48 loc) 1.82 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Demo DOM 016</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> <style> #mystack { width: 400px; height: 400px; min-width: 200px; min-height: 200px; max-width: 800px; max-height: 800px; overflow: hidden; resize: both; } #myelement { width: 250px; height: 40px; border: 1px solid blue; } </style> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - DOM test 016</h1> <h2>Determine the displayed shape of the visible stack; react to changes in the displayed shape</h2> <h3>This stack is resizable - drag the bottom right corner to change its dimensions.</h3> <div id="mystack" data-scrawl-stack> <div id="myelement">Undefined text</div> </div> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create a resizable Stack artefact containing an Element artefact</li> <li>Create hook functions for the Element that will be invoked as the Stack dimensions are changed</li> <li>Check that appropriate hooks are fired, and the Element updated, in response to changes in the Stack's dimensions - five states ('banner', 'landscape', 'rectangle', 'portrait', 'skyscraper') should be viewable as the Stack corner is dragged horizontally right (and up) and then diagonally down/left</li> </ul> <p><b>Touch test:</b> canvas should be resizable</p> <p><a href="../docs/demo/dom-016.html">Annotated code</a></p> </div> <script src="dom-016.js" type="module"></script> </body> </html>