Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
cross-browser scratchpad
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
scratchpad.js

README.md

Scratchpad - cross-browser scratchpad

View demo

Requirements

Usage

var canvas = scratchpad( {
    'width'    : 400,
    'height'   : 400,
    'thickness': 10,
    'colour'   : '#ABC',
    'element'  : '#scratchpad'
} );

...
...
...

canvas.clear();

Properties

  • width: width of the scratchpad
  • height: height of the scratchpad
  • thickness: stroke thickness
  • colour: stroke colour (colour and color are aliases) :-)
  • element (mandatory): the jQuery element which should be transformed into the scratchpad

element is mandatory. All other properties are optional.

Object Methods

  • clear(): clears the scratchpad
Something went wrong with that request. Please try again.