UNPKG

cacatoo

Version:

Building, exploring, and sharing spatially structured models

412 lines (112 loc) 5.4 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Canvas</title> <link rel="icon" type="image/png" href="images/favicon.png" /> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> <script src="scripts/jquery.js"></script> <script> $(function(){ $("#Navigator").load("navigator.html"); }); </script> </head> <body> <div id="main"> <h1 class="page-title">Class: Canvas</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Canvas<span class="signature">(gridmodel, property, height, width, scale)</span><span class="type-signature"></span></h2> <div class="class-description">Canvas is a wrapper-class for a HTML-canvas element. It is linked to a @Gridmodel object, and stores what from that @Gridmodel should be displayed (width, height, property, scale, etc.)</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Canvas"><span class="type-signature"></span>new Canvas<span class="signature">(gridmodel, property, height, width, scale)</span><span class="type-signature"></span></h4> <div class="description"> The constructor function for a @Canvas object. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>gridmodel</code></td> <td class="type"> <span class="param-type"><a href="Gridmodel.html">Gridmodel</a></span> </td> <td class="description last">The gridmodel to which this canvas belongs</td> </tr> <tr> <td class="name"><code>property</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">the property that should be shown on the canvas</td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">height of the canvas (in rows)</td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">width of the canvas (in cols)</td> </tr> <tr> <td class="name"><code>scale</code></td> <td class="type"> <span class="param-type">scale</span> </td> <td class="description last">of the canvas (width/height of each gridpoint in pixels)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line1232">line 1232</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="displaygrid"><span class="type-signature"></span>displaygrid<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Draw the state of the Gridmodel (for a specific property) onto the HTML element </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line1272">line 1272</a> </li></ul></dd> </dl> </article> </section> </div> <div id="Navigator"></div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jul 28 2021 15:33:33 GMT+0200 (Central European Summer Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>