forked from literallycanvas/literallycanvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGES.txt
185 lines (170 loc) · 6.99 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
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
v0.4.10:
* Fix the text tool
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:
* Fix loading an image from JSON.
* Rename pointerdown, pointerdrag, pointermove, and pointerup to
lc-pointerdown, lc-pointerdrag, lc-pointermove, and lc-pointerup (#308)
v0.4.7:
* Fix color picker not working on Firefox
v0.4.6:
* Fix various awful bugs
* Move color pickers back to the left, with a slightly better UI than before
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
v0.4.4:
* Fix idiotic text tool exception
v0.4.3:
* User-friendly text tool
* lc.setShapesInProgress(shapes), a better way to draw shapes in progress
* Tool.willBecomeActive(lc) and Tool.didBecomeActive(lc)
* Include IE shims for CustomEvent and ctx.setLineDash()
* Text shapes are now anchored at the top left instead of baseline left.
Positions are updated automatically.
* Text bounds are correctly accounted for when exporting to SVG. Text wrapping
may be incorrect unless you render the text to the canvas first.
* SVG export produces valid XML with the correct namespace and no newlines
* Better-ish visual style
* getImage() content bounds detection includes background shapes
* Fixed one class of image-not-displaying bugs
* Line path reuses smoothed points instead of recalculating on load
v0.4.2:
* lc.getSVGString()
* LC.setTool() is part of the public API
* Improved behavior when dragging outside the LC div while drawing
* backgroundColor initialization option works
* Allow transparent stroke and fill colors
v0.4.1:
* Watermark can be included in image output with
getImage({includeWatermark: true})
* Line tool allows dashes, arrows
* LinePathShape can be used without smoothing; set
{smooth: false}
* New icons for undo/redo
* Tooltips everywhere
* getImage() scales for retina correctly
* Watermark no longer requires user input to render if image isn't
loaded at init time
* Dragging off the canvas while drawing no longer results in a crazy
line
v0.4:
* New GUI using React.js
* Simplified color picker
* Removed jQuery dependency, though the plugin works if jQuery is present
* Performance improvements
* Line path adds points in constant time
* Line path throttles mouse events
* requestAnimationFrame is used
* Retina display rendering is the correct size instead of being scaled up
half-resolution
* Code is browserified; can still be used as a standalone script
* Overhauled API for defining tools and shapes (see docs)
* Backgrounds and watermarks are no longer affected by the eraser
* No DOM is preserved inside the container div at all
* LiterallyCanvas class API
* Removed preserveCanvasContents option
* watermarkScale option
* 'toolClasses' option has been replace with 'tools' option
* Constructor takes (containerElement, opts) instead of (canvas, opts)
* API for subscribing/unsubscribing event listeners has changed (see #130)
* Redraw layers ('main' or 'background') with repaintLayer(layerName);
repaint everything with repaintAllLayers(). Removed repaint().
* getImage() allows rendering drawing at any scale clipped to any rect. Old
canvasForExport() and canvasWithBackground() are deprecated.
* setPan() and setZoom() can set position and zoom values directly, in
addition to the old pan() and zoom() that move them by relative values.
* getContentBounds() returns the bounding rect of all shapes
* LC.util functions
* sizeToContainer() removed in favor of matchElementSize()
* renderShapes() renders any list of shapes to a canvas, without having to
instantiate LiterallyCanvas
* getBoundingRect(listOfRects)
* Reorganized top-level API on window.LC or require('literallycanvas')
LC.init()
LC.registerJQueryPlugin()
LC.util
LC.tools
LC.defineOptionsStyle()
LC.defineShape()
LC.createShape()
LC.JSONToShape()
LC.shapeToJSON()
LC.setDefaultImageURLPrefix()
* Support for fixed size drawing area
* Basic localization support
* Added ellipse tool
* Event handling bug fixes
v0.3:
* LiterallyCanvas.canvasWithBackground() renders the current drawing over a
background image
* Save/load to/from JSON
* Text tool
* New events
* preserveCanvasContents option
* Image shape (no corresponding tool yet)
* Split code into jQuery plugin and core code
* Remove Underscore dependency
* Support IE Mobile (probably)
v0.2.1:
* Redo toolbar/CSS markup
* Drop fat version of build
* Allow changing background color
v0.2:
* Speed improvements
* Line tool
* Rectangle tool
* Better iOS support (fix several bugs)
* Toolbar style tweaks
* Replace Imgur stuff with canvasForExport()
v0.1: Initial release