Click and drag your mouse (or finger on touch device) to draw a line. A new path is created for each touch or click.
Paths are stored in a nested array; you can inspect the variable in console: session (assuming the example is in it's own window).
Cordova handles A LOT of cross platform issues for us, but not all of them. We can simplify these by using a YML or JSON config file to keep track of the differences so our code can stay slim and maintainable.
This concept is based on this article which I found from this SO answer.
| { | |
| "locals": [ | |
| "foobar" | |
| ], | |
| "dependencies": { | |
| "jb55/domready": "*" | |
| }, | |
| "scripts": [ | |
| "index.js" | |
| ] |
Dependencies managed with Bower:
npm install -g bower
bower install...Then open up index.html in a browser.
| # install nvm | |
| # see https://github.com/creationix/nvm | |
| # be sure to restart your terminal after this step | |
| curl https://raw.github.com/creationix/nvm/master/install.sh | sh | |
| # install Node | |
| # use nvm. if you cannot, download binary from Node website http://nodejs.org/download/ | |
| nvm help | |
| nvm ls-remote | |
| # install a recent version |
| <h1>Using both small and large grids</h1> | |
| <ul class='small-block-grid-2 large-block-grid-4'> | |
| <li><img src='http://placekitten.com/g/200/220' /></li> | |
| <li><img src='http://placekitten.com/g/200/200' /></li> | |
| <li><img src='http://placekitten.com/g/200/280' /></li> | |
| <li><img src='http://placekitten.com/g/200/250' /></li> | |
| <li><img src='http://placekitten.com/g/200/240' /></li> | |
| <li><img src='http://placekitten.com/g/200/270' /></li> | |
| <li><img src='http://placekitten.com/g/200/230' /></li> |
| mkdir temp | |
| cd temp | |
| git clone [email protected]:yourDomain/yourRepoName.git | |
| cd yourRepoName/ | |
| git remote rm origin | |
| git remote add origin https://[email protected]/yourUsername/yourNewRepoName.git | |
| git remote show origin | |
| git push origin master | |
| cd ../.. | |
| rm -rf temp |
Alberta Aboriginal Treaty Lands.
| /*! ****************************** | |
| Handlebars helpers | |
| *******************************/ | |
| // debug helper | |
| // usage: {{debug}} or {{debug someValue}} | |
| // from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/) | |
| Handlebars.registerHelper("debug", function(optionalValue) { | |
| console.log("Current Context"); | |
| console.log("===================="); |