This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
Releases: literallycanvas/literallycanvas
Releases · literallycanvas/literallycanvas
v0.5.2
v0.4.13
- Require React 0.14+ (up from 0.13+)
- SelectShape tool (no GUI for this yet)
- Use <LC.LiterallyCanvasReactComponent /> as a React component!
- Rewrote LC.init() (with GUI) to use LiterallyCanvasReactComponent. This
causes some initialization of the LiterallyCanvas object to be done one
or more frames after the LC.init() call. Please report any resulting
bugs on GitHub. - CommonJS build that can be install from NPM with "npm install literallycanvas"
- Improved eyedropper tool
- Samples background. Should match expected behavior better.
- Can be used to set fill color as well as stroke color.
- LC.util.getDefaultImageRect() and LiterallyCanvas.getDefaultImageRect()
make it easy to figure out the effective bounds of the canvas, whether
or not it is "infinite." Mostly useful for tool implementations. - Fixed CSS Z-ordering bug that caused text being edited to show up on top
of the color picker
v0.4.11
- lc.setWatermarkImage(image)
- 'scale' parameter for the Image shape
- Fix text box drag handles (they were invisible)
- Transparency and saturation sliders in color picker
- Build a literallycanvas-core library that does not include the tool UI
- Decouple polygon tool UI from tool; trigger 'lc-polygon*' events
- Fixed several bugs in SVG rendering
- Fixed behavior of stroke width picker when switching tools
v0.4.10
v0.4.9
- The snapshot API is more public. The JSON-suffixed snapshot methods are
being deprecated in favor of ones that deal with JavaScript objects. - New LC.init() options:
- snapshot: load a snapshot immediately
- defaultStrokeWidth
- strokeWidths: defaults to [1, 2, 5, 10, 20, 30]
- toolbarPosition can now be 'hidden'
- Snapshots save and load pan and zoom values, image size, and background
shapes - lc.getImage({margin: {top, right, bottom, left}}) lets you put a margin
around an image whose bounds are derived from the shapes' bounding rect - LC.renderSnapshotToImage()
- LC.renderSnapshotToSVG()
- LC.teardown() completely removes Literally Canvas from the web page
- LC.util.addImageOnload(img, callback) adds a callback to the image's onload
event without replacing any existing callbacks - Polygon tool behavior improvements:
- On-screen UI to close or cancel, for a better experience on touch devices
- Cancel current shape if user hits undo, redo, or clear
- Event handling improvements
- LC.util.classSet replaces internal usage of React.addons.classSet
- LC.util.combineCanvases() doesn't draw each canvas twice (probably fixed
some image rendering bugs) - Deprecations (docs provide external replacements):
- Keyboard navigation (keyboardShortcuts option)
- lc.getSnapshotJSON()
- lc.setSnapshotJSON()
- LC.snapshotJSONToShapes()
v0.4.8
v0.4.7
v0.4.6
v0.4.5
- Require React v0.13+ (up from v0.10)
- UI improvements
- New option toolbarPosition: 'top'|'bottom'
- LC.renderShapesToCanvas(shapes, rect, backgroundColor)
- LC.renderShapesToSVG(shapes, rect, backgroundColor)
- LC.snapshotToShapes(snapshot) -> shapes
- LC.snapshotJSONToShapes(snapshotJSON) -> shapes
- New rendering API
- LC.defineCanvasRenderer(shapeName, (ctx, shape) -> mutate ctx)
- LC.defineSVGRenderer(shapeName, (shape) -> string)
- Tools can be implemented with @usesSimpleAPI=false and the new events
pointerdown, pointermove, pointerdrag, and pointerup - Polygon tool
- Zero-length lines render consistently across browsers (by not rendering)
- Shape rendering aligned to pixel grid for sharper drawings
- Zooming works correctly
- Configurable zoomMin, zoomMax, zoomStep