Code Monkey home page Code Monkey logo

ember-smoother-signature's Introduction

ember-smoother-signature

Ember Observer Score npm version Code Climate Issue Count

This addon is a wrapper for the excellent signature_pad library.

Works great on a desktop...

Desktop

...or on a mobile device!

Mobile

Installation

Install this addon using ember-cli:

ember install ember-smoother-signature

Usage

Use ember-smoother-signature in your template:

{{signature-pad
    submit=(action 'YOUR_ACTION')
    back=(action 'YOUR_ACTION')
}}

DISCLAIMER: If you look at signature_pad, it has many more options.

We'll incorporate all that soon, but if you have time on your hands then feel free to submit a PR!

Contributing

Installation

  • git clone this repository
  • cd ember-smoother-signature
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License. [embadge]: http://embadge.io/

ember-smoother-signature's People

Contributors

antonbavykin1991 avatar joedursun avatar sacarino avatar uramonz avatar zinyando avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

ember-smoother-signature's Issues

Dynamically pick the returned signature format

Currently, the signature is returned as a image/svg+xml. There are other formats supported by the toDataURL though - image/png, image/jpeg, and image/webp (Chrome). See MDN reference. You could even get the array of point groups returned instead, if you wanted to draw the signature again in the future.

We should modify the addon to have a default of image/svg+xml but allow a output format to be passed in as well.

Accept an optional background color when saving as a jpeg

signature_pad needs a background color to be set when saving the canvas contents as a jpeg type. It's also another way to indicate where the signature needs to happen.

examples:
backgroundColor: 'rgb(255, 255, 255)'
backgroundColor: '#d2d2d2'

We should make this an optional input for the addon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.