ember-cli-sketchpad
v0.1.1
Published
The default blueprint for ember-cli addons.
Downloads
2
Readme
ember-cli-sketchpad
An Ember.js addon to include a simple sketchpad based on sketchpad library.
Instalation
To install Sketchpad via NPM:
$ npm install ember-cli-sketchpad --save-dev
Usage
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.