- Fix blank white space bug by allowing developers to set viewBox
- Fix unused eraser masks - firefox and random gaps
-
- Add option to use Windows surface pen button as eraser
- Memoize functions to reduce re-rendering
- Added optional id props to uniquely identify a sketch canvas
- Upgraded dependencies
- Updated tests to use the id props
- Fix multiple ReactSketchCanvas in one page causes issues due to id="background" #52
- Fix ReactSketchCanvas doesn't work on safari. #53
- Fix Package cannot be installed via npm #51
- update contributing.md
- update github actions
- Added cypress tests for all props and events
- Added
onStroke
prop to get last stroke on pointer up - Adds a point on click (without moving) #45
- Upgraded all dependencies
- Moved to DTS (tsdx fork) instead of nx
- Switched codebase to hook based implementation (support react >= 16.8)
- Removed immer dependency
- Changed React import to * from React #40
- Export image fails when the background is not an image [beta] #46
- Fix partial transparent erase (eraser stroke color changed to black for masking, add maskUnits) #44
- Renamed
onUpdate
toonChange
- Upgraded all dependencies
- Updated directory structure
- Added background image rendering directly in SVG
- Added option to export background image while exporting the canvas as image or SVG
- Added background image aspect ratio control
- Updated erase option to use mask instead of canvas color
- Add github action for deployment of storybook and package
- Removed background option to set background image using CSS-in-JS (instead check feature-filled backgroundImage prop)
- Changed import react as
import * as React from 'react'
- Switched to Nx
- Updated documentation
- Removed pepjs. Can be polyfilled by the web app directly instead
- add support any version above react 16.4
- Bump dependency versions
- Set default value of
allowOnlyPointerType
as'all'
again
- Reset canvas option to reset internal state and clean undo/redo stack
- Fix exportImage function to export png in Firefox and Safari
- Add
withTimestamp
prop andgetSketchingTime
function to measure the sketching time of the user
- Add index.d.ts to npm registry
- Add Github as registry
- Update example
- Added defaultProps to onUpdate in ReactSketchCanvas
- Added touch-action="none" to allow pepjs polyfill pointer events
- Update README.md
- Removed the annoying console.log from Canvas
Added README :)
- Rewrote codebase in typescript
- Added pepjs to support more browsers
- Added onUpdate feature to get current paths in
CanvasPath
type
- Fixed sketch offset issue when the canvas is scrolled
- Updated undo/redo/reset strategy
- Updated demo in storybook
- Renamed SvgSketchCanvas to ReactSketchCanvas to keep naming convention
- Added className property to set class names for CSS selectors
- Removed SvgSketchCanvas
- Moved immutable dependency from Canvas file
Removed onUpdate feature and made the system modular
- Made Canvas as a separate module. Now event handlers can be hooked with Canvas class to update paths from server. (For Collaboration use case)
- Removed onUpdate feature and instead made Canvas module
- Added onUpdate property to get the current sketch paths after every update
allowOnlyPointerType
- Added "allowOnlyPointerType" use-case. Now single pointer type can be targetted
- Switched to pointer events
- Add SVG background using CSS
- Export and load paths
- Erase mode and eraser width
- Rename exportAsImage() to exportImage() for naming consistency
- Rename exportAsImage()