ember-cli-sketchpad

0.1.1 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i ember-cli-sketchpad

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • nihas