Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 979 Bytes

README.md

File metadata and controls

33 lines (28 loc) · 979 Bytes

ember-cli-sketchpad

An Ember.js addon to include a simple sketchpad based on sketchpad library.

NPM

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.