An Ember.js addon to include a simple sketchpad based on sketchpad library.
To install Sketchpad via NPM:
$ npm install ember-cli-sketchpad --save-dev
Just add the following component to your application:
{{input-sketchpad width=400 height=400 value=sketchpad class="sketchpad"}}
After that, you should be able to access your sketchpad with the variable you used on the 'value' field
export default Ember.Controller.extend({
actions: {
undo: function(sketchpad) {
this.get('sketchpad').undo();
},
redo: function(sketchpad) {
this.get('sketchpad').redo();
},
},
});
The Sketchpad Object API follows the same as the sketchpad library.