Commit graph

138 commits

Author SHA1 Message Date
kangax
19a82b2b50 Add test for elements inside <defs> being ignored. 2011-01-06 15:38:20 -05:00
kangax
b550020024 Elements that are descendants of <defs> elements are no longer rendered (as per spec). 2011-01-06 15:20:56 -05:00
kangax
d5a82f3fd9 Make sure straight lines are rendered. 2010-12-25 21:48:48 -05:00
kangax
661ea4de04 "text" property of text objects should be a "state property" (used in undo/redo management). 2010-12-25 21:48:42 -05:00
kangax
cc9d469b81 fabric.Element#remove should clear active object if it's active object that's being removed. 2010-12-25 21:45:30 -05:00
kangax
773fe2bc55 Only activate guidelines in demo when url query has specific parameter. 2010-10-31 23:57:59 -04:00
kangax
33278ae20b Reorganize fabric.Element in such way so that centering and aligning guidelines could work together.
`fabric.Element#onObjectMove` callback is gone, replaced by "object:moved" event (which allows subscription to the event by multiple parties).
Similarly, `fabric.Element#onMouseUp` is replaced with "mouse:up" event, and `fabric.Element#afterRender` with "after:render" one.
The drawback of these events, as of now, is that it's not possible to determine which canvas instance fired which event --
in case of multiple canvas instances in a document, this could get hairy. Will probably fix it by introducing some kind of `Observable` mixin,
which would add "observe" and "fire" methods to `fabric.Element` itself.
2010-10-31 22:42:20 -04:00
kangax
33467d15a2 First (crooked and incomplete) implementation of aligning guidelines. 2010-10-31 01:28:54 -04:00
kangax
45795824ac First stab at centering guidelines and snapping to a center (vertical/horizontal). 2010-10-30 21:47:15 -04:00
kangax
f497327131 Fabric now runs fully under ES5 strict mode (except certain 3rd party dependencies, like cufon.js and json2.js). 2010-10-21 22:54:00 -04:00
kangax
948d3998c8 A couple more doc fixes and build distribution + minified. 2010-10-19 16:31:39 -04:00
kangax
f052a067ef More documentation. 2010-10-19 16:27:24 -04:00
kangax
f281be8a38 Use "codeview" template for docs. Link to documentation in README. 2010-10-15 13:26:08 -04:00
kangax
33e929053e More documentation. 2010-10-15 12:55:53 -04:00
kangax
2d1d0d80e5 Add jsdoc-toolkit and generate docs. 2010-10-15 12:11:37 -04:00
kangax
588c422bbb Give demo text random angle and slightly better random positioning. 2010-10-15 00:59:41 -04:00
kangax
2f168d05a9 Add few sample fonts and cufon.js (which is a dependency for fabric.Text). 2010-10-15 00:56:54 -04:00
kangax
639aa12e2a Another chunk of documentation (which is a bitch, by the way). 2010-10-14 22:16:24 -04:00
kangax
415205d3f2 Document bunch of API (still incomplete, but getting there). 2010-10-14 17:42:39 -04:00
kangax
e70830f7d6 Introduce fabric.log and fabric.warn methods, as simple wrappers around console.log and console.warn (instead of declaring those methods right on console). This makes it easier to mock them when testing, and is generally safer due to less tinkering with host objects. 2010-10-11 14:45:06 -04:00
kangax
8ceca73561 Recalculate offset after adding shape to canvas on demo page (otherwise, FF4 is bugging out for some strange reason). 2010-09-22 18:32:02 -04:00
kangax
c97a41a514 Fix bug on demo page, when requests weren't made. 2010-09-22 18:23:05 -04:00
kangax
b35b559c6a String.prototype.trim now strips '\xA0' characters in engines which fail to match that character via \s. Fix a couple of unit tests. 2010-09-14 18:57:55 -04:00
kangax
769c0c1eb7 Function.prototype.bind now calls object it's being invoked on indirectly (better spec compliance), thanks Garrett Smith;
Unit test `fabric.util.makeElementUnselectable` and make test names in util module more descriptive.
2010-09-14 12:53:29 -04:00
kangax
30a8e12c73 Cache Math.PI * 2 when rendering ellipses. Build distribution files. 2010-09-09 17:57:10 -04:00
kangax
d8937fca9f Only render circles and ellipses according to left/top when they are part of a group. 2010-09-09 17:55:43 -04:00
kangax
f2f37e5ffd Update unit tests count. Add link to project on github to a demo page. Fix one of the remaining failing json tests. 2010-09-09 17:37:32 -04:00
kangax
18d217f2b8 Fix fabric.Object.prototype.toJSON test (which was testing toJSON according to old behavior — returning string, rather than an object). 2010-09-09 17:20:55 -04:00
kangax
e9fd7c6166 Fix bug in Polyline and Polygon points attribute parsing (thanks to unit tests). 2010-09-09 17:10:21 -04:00
kangax
ed4dca3117 Add unit tests for fabric.util.makeElement, fabric.util.addClass, and fabric.util.wrapElement. 2010-09-09 16:37:07 -04:00
kangax
2b73b27c09 Add fabric.version (start with 0.1). 2010-09-08 23:13:00 -04:00
kangax
8ed28fa260 Typo in Function.prototype.bind. Fix incorrect positioning when drawing circles and ellipses. 2010-09-08 23:07:52 -04:00
kangax
13db51994e Normalize points (according to containing box) when creating Polygon and Polyline objects from elements. 2010-09-08 16:39:51 -04:00
kangax
652712601e Canvas.Polygon.prototype._toOrigin is not used and is not needed, so remove it;
`parsePointsAttribute` can now parse values like "a b c d", not only "a,b c,d".
2010-09-08 16:35:06 -04:00
kangax
d00a37d593 More effecient Function.prototype.bind and unit tests for bind, getById, and toArray. 2010-09-06 12:33:57 -04:00
kangax
d3de320b49 Add another set of shapes to the demo. 2010-09-05 22:23:46 -04:00
kangax
9a1bd4a728 Add few more shapes to the demo page. 2010-09-02 12:50:45 -04:00
kangax
371d38c0de Fix typo. 2010-09-01 17:58:42 -04:00
kangax
6ba986da49 Add unit tests for fabric.util.object.extend and fabric.util.object.clone. 2010-09-01 17:56:59 -04:00
kangax
2d9fe82214 Add few more fabric.util unit tests — trim, camelize, capitalize. 2010-09-01 17:35:17 -04:00
kangax
0177c91917 Change links to demo pages from yura.thinkweb2.com to github pages (kangax.github.com/fabric.js). Add link to unit tests, that can be run right in the browser. 2010-09-01 17:03:16 -04:00
kangax
8d5520c49a Add few more test shapes to a demo page; reorganize sidebar slightly. 2010-09-01 16:15:38 -04:00
kangax
eba95c6ee7 Loading data from json (via loadFromJSON rather than loadFromDatalessJSON) should preserve z-index order of objects
(but ideally, we need to get rid of duplication in `loadFromJSON` and `loadFromDatalessJSON`).
2010-08-30 19:11:14 -04:00
kangax
fea32f32a0 Add note about IE9 problem with images. 2010-08-30 19:08:18 -04:00
kangax
53b1a90516 Fix paths of demo .js files. 2010-08-27 15:01:29 -04:00
kangax
43d11b6914 In demo, notify about inability to serialize canvas to an image when toDataURL is not supported. 2010-08-27 13:25:10 -04:00
kangax
13d87dd060 Extend canvas element through excanvas' initElement in fabric.Element.supports. 2010-08-27 13:19:36 -04:00
kangax
b07fcb52a0 IE9PP3 -> IE9PP4; Add links to demos. 2010-08-27 13:10:23 -04:00
kangax
c6f4f3f61d Build distribution files 2010-08-27 12:30:13 -04:00
kangax
2d7d61d82a Do not set background color value to "transparent", as that results in IE8 painting black. Use "rgba(0,0,0,0)" instead. 2010-08-27 12:29:06 -04:00