One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
|
import React, {PropTypes} from 'react'; | |
import { debounce } from 'lodash'; | |
// A simple helper component, wrapping retina logic for canvas and | |
// auto-resizing the canvas to fill its parent container. | |
// To determine size/layout, we just use CSS on the div containing | |
// the Canvas component (we're using this with flexbox, for example). | |
// Expects a "paint" function that takes a "context" to draw on | |
// Whenever this component updates it will call this paint function | |
// to draw on the canvas. For convenience, pixel dimensions are stored |