Commit graph

264 commits

Author SHA1 Message Date
kangax
e8e32e80de Fix gradient colorStops initialization. Thanks @Kienz 2013-03-18 13:11:31 +01:00
kangax
2622a380bf [BACK_INCOMPAT] fabric.Group#objects -> fabric.Group._objects (making it consistent with canvas._objects). Objects in group always have group reference to a group they're in. bringToFront, sendToBack, etc. now work in relation to group when called on objects within group. 2013-03-16 16:41:19 +01:00
kangax
9fb9b1ca34 Fix unit tests 2013-03-10 20:58:48 +01:00
kangax
506125bbe6 [BACK_INCOMPAT] fabric.Canvas.toDataURL now accepts options object instead linear arguments. fabric.Canvas.toDataURLWithMultiplier is deprecated; use toDataURL({ multiplier: … }) instead. 2013-03-06 18:47:50 +01:00
kangax
43dd170f5b Add fabric.Object#visible property. Closes #342. Version 1.0.13. 2013-03-06 18:45:18 +01:00
kangax
9be89b2f2f drawCorners -> drawControls, for consistency. Remove unused hasCorners and use hasControls instead of hideCorners. Version 1.0.12 2013-02-20 13:19:22 +01:00
kangax
9df85553b9 [BACK_INCOMPAT] Add fabric.util.createAccessors. Add accessors for fabric.Text -specific properties (setTextDecoration, setFontWeight, setFontStyle, etc.). Make text object dimensions change when setting dimension-affecting properties. fabric.Text#setFontsize becomes setFontSize. Version 1.0.11. 2013-02-18 16:22:48 +01:00
kangax
7b8dfe5a30 More test fixes 2013-02-17 13:48:21 +01:00
kangax
3f3d336852 Fix text unit tests 2013-02-17 13:26:53 +01:00
kangax
160e7e5ded Alias fabric.Observable.fire to trigger, similar to jQuery, Backbone, etc. Closes #401 2013-02-11 13:22:30 +01:00
kangax
97fa81aa77 Fix polygon boundaries. Closes #416 2013-02-11 13:21:33 +01:00
Arthaey
48ab4607b9 Add option to suppress XML preamble in toSVG method. 2013-02-05 22:20:56 -08:00
kangax
5ee9b13a92 Add support for shadows (via fabric.Shadow) 2013-02-04 20:49:05 +01:00
kangax
107dcfcbd6 Add fabric.Pattern tests 2013-02-03 17:01:01 +01:00
kangax
6777c50012 Add support for patterns 2013-02-03 02:15:29 +01:00
kangax
15eee3b861 Fix tests 2013-01-02 23:33:21 +01:00
kangax
7121830ca6 Merge dynamic origin branch into master. Version 1.0.0 2012-12-29 20:04:24 +01:00
kangax
2735d543e2 Merge master. Enable hasRotatingPoint by default (now that objects are not rotated via corners) 2012-12-26 11:18:17 +01:00
kangax
894988b508 Fix browser-based unit tests 2012-12-23 23:30:01 +01:00
kangax
c11abb377f Fix tests. Build distribution. Version 0.9.35. 2012-12-23 15:28:08 +01:00
kangax
4ae8b9d725 Simplify object straightening logic. Thanks @woutercommandeur. Closes #362. 2012-12-22 20:20:54 +01:00
kangax
882d7085d8 Fix fabric.Object#cloneAsImage on node. Closes #336. Version 0.9.34 2012-12-20 19:49:51 +01:00
kangax
f0d2235053 Fix group loading in dateless json. Closes #322 2012-12-20 16:23:31 +01:00
kangax
245de99834 Fix unit tests 2012-12-16 21:11:38 +01:00
kangax
35ba6c6bf5 Final fix for fabric.util.loadImage 2012-12-10 15:59:44 +01:00
kangax
5d1cfce96a Try to fix fabric.util.loadImage test once again. 2012-12-10 15:52:14 +01:00
kangax
26d735146f Fix fabric.util.loadImage test. 2012-12-10 15:44:30 +01:00
Kienz
332dcd81c2 Add unit tests for loadFromJSON with json object instead of json string 2012-12-08 13:38:19 +01:00
kangax
2b33b7f570 Locking properties (lockMovementX, lockMovementY, lockRotation, etc.) are now respected in groups. Closes #152. 2012-12-07 15:39:47 +01:00
kangax
7a1de3c57b Fix fabric.util.loadImage test. 2012-12-04 12:39:46 +01:00
kangax
801fd3fb4d Fix text test. 2012-12-04 12:03:16 +01:00
kangax
b330c9d715 Build distribution. Fix unit tests. Version 0.9.27. 2012-12-03 20:23:45 +01:00
kangax
1633bce401 Add most of the unit tests for fabric.util methods. Fix #35. 2012-12-01 17:52:03 +01:00
kangax
2329ef59fe Add support for specifying additional properties to return in toObject, toJSON. Fix #272. 2012-11-30 23:46:09 +01:00
kangax
dbe5ad2149 Adjust positioning of text objects created via fromElement. Fix #303. Version 0.9.20. 2012-10-31 00:19:13 +01:00
Steve Pemberton
e8a696c4b1 fix for retreiving scrolled & Fixed Descendants, Mouse Position 2012-10-24 19:56:48 +01:00
kangax
0e3abc745d Fix unit test 2012-10-23 23:10:17 +02:00
kangax
70784f55d9 Add support for off method to remove all handlers for event when not given any handlers. 2012-10-20 20:11:16 +02:00
kangax
8494350baf Remove onFpsUpdate as it's such a rarely used functionality (and could be accomplished on application level). 2012-10-20 20:10:32 +02:00
kangax
f9eeeb2916 Fix unit tests. 2012-10-14 02:53:25 +02:00
kangax
307c9503d4 Fix fabric.Group#toObject not serializing children image objects. Fix #260. 2012-10-08 21:01:29 +02:00
kangax
999f7f5231 Account for bounding box in scaleToWidth/scaleToHeight. Fix #271. Version 0.9.12. 2012-10-08 19:35:37 +02:00
kangax
b555245780 Add support for animating multiple properties. 2012-10-03 23:45:49 +02:00
kangax
0ead6db114 Path groups now have empty fill by default. 2012-09-10 19:54:47 -04:00
kangax
f8ecc529f5 Fix fontFamily setting. 2012-09-10 19:45:25 -04:00
kangax
44dc5f7fe7 Update text dimensions after changing text. Closes #257. Version 0.9.7. 2012-09-07 13:30:32 -04:00
kangax
7cf01772a4 Fix fabric.Text#set. 2012-09-07 13:15:42 -04:00
kangax
ada83ffff5 Change unstable image test once again 2012-09-06 12:06:40 -04:00
kangax
762cfb7b8a Fix unit tests. Add loadFromJSON test for previous fix. Version 0.9.5. 2012-09-02 12:28:52 -04:00
kangax
db37e1e855 Add convenience methods to objects, utilizing new object.canvas property — reference to a canvas to which an object was added last. Add unit tests for new methods. 2012-08-20 18:23:54 +02:00
kangax
9a7d40d7d7 Change the way gradients are initialized.
They no longer need `ctx` property, which is now taken from object directly during rendering time.
Add unit tests for gradients.
2012-08-20 18:23:53 +02:00
kangax
d97f08b5a3 Remove line.html file. 2012-08-20 18:23:53 +02:00
kangax
8e429ceaf9 Fix loadFromDatalessJSON when native text is present in data. Bump allowed node version to 0.8.6. 2012-08-15 15:30:59 +02:00
kangax
98614842e7 Bring IMG_WIDTH/IMG_HEIGHT back. 2012-08-14 16:13:30 +02:00
kangax
7151dc211c Fix failing unit tests. 2012-08-14 16:04:32 +02:00
David Rice
19763483df With node-canvas 0.13.0 (and libgif installed) image width/height can be determined for a .gif 2012-08-13 16:30:31 +01:00
kangax
3ce8507932 Implement fabric.Text.fromElement. Closes #182. 2012-08-11 18:59:53 +02:00
kangax
df02b880ae Remove no longer needed test files 2012-08-11 16:32:02 +02:00
kangax
fe9d927d47 Move site into a different repository. 2012-08-10 17:20:04 +02:00
kangax
fe08e6aa3b Revamp site to use jekyll. 2011-09-07 18:02:17 -04:00
kangax
8ea5f0d52c Closes #47. More conforming Function.prototype.bind. 2011-08-29 12:09:32 -04:00
kangax
a3d693302c Closes #38. Add support for fabric.Canvas#backgroundImage. 2011-08-28 14:55:33 -04:00
kangax
a41fd5dffd Closes #43. fabric.Text#set can now accept object with property/values. 2011-08-12 13:46:17 -04:00
kangax
8f819bb760 Fabric can now run under node.js 2011-08-11 15:18:18 -04:00
kangax
27999a327c Add unit tests for fabric.loadSVGFromString. 2011-08-04 20:48:25 -04:00
kangax
04bb0aad66 Add "hasControls" and "hasBorders" options to fabric.Object. "hasControls", when set to false allows to fully disable controls rendering (and mouse detection); hasBorders does the same for object borders. Fix failing unit tests. Update QUnit. 2011-08-02 19:35:02 -04:00
kangax
76b67aa34c [BACK_INCOMPAT] More consistent option names in fabric.Text: fontfamily --> fontFamily, fontsize --> fontSize, fontweight --> fontWeight (similarly to other options, like textShadow, textDecoration, fontStyle, etc.) 2011-07-21 20:32:02 -04:00
kangax
e3dd685f1b Add support for "textAlign" in fabric.Text. Could be any of "left", "center", or "right" values. Works with multiline text. 2011-07-21 14:53:48 -04:00
kangax
89c030ebdf Closes #18. Less confusing method names: removeActiveObject --> discardActiveObject, removeActiveGroup --> discardActiveGroup (since both of those methods don't actually _remove_ objects). [BACK_INCOMPAT] 2011-07-15 11:39:48 -04:00
kangax
c046bbd5f1 Closes #34 — Support multiple sequences of command arguments in SVG paths. 2011-07-09 15:50:44 -04:00
kangax
7a62895d03 Fix bootstrapping of functional tests. 2011-07-09 11:00:55 -04:00
kangax
1bed43e3c4 Add unit tests for fabric.Observable. fabric.Canvas#observe can now accept object — canvas.observe({ event1: ..., event2: ... }). 2011-07-02 01:19:32 -04:00
kangax
31e3ae7bb7 Fix menu links on couple of pages. 2011-06-29 11:11:53 -04:00
kangax
a7155ccbfb Reorganize project structure. Add "customization" demo (work in progress). 2011-06-29 11:10:08 -04:00
kangax
628efcdc70 fabric.Element is renamed to fabric.Canvas, which makes more sense. fabric.Element is kept for compatibility reasons (but is deprecated). Bump version to 0.3. 2011-06-28 19:14:40 -04:00
kangax
6845db3670 Rework observable mechanism: All events are now scoped to canvas instances. fabric.util.observeEvent(...) becomes canvas.observe(...) and only observes events of that particular canvas instance. fabric.util.observeEvent becomes fabric.util.observe, fabric.util.stopObservingEventfabric.util.stopObserving, and fabric.util.fireEventfabric.util.fire. These could still serve as a generic pub-sub mechanism. Add "mouse:down" event (to be consistent with "mouse:up"). Add "Event inspector" demo page. 2011-06-27 18:25:45 -04:00
kangax
e7aafae9e7 Add support for "opacity" attribute. 2011-06-14 17:28:54 -04:00
kangax
27c72bd634 Use set with object in tests (rather than chaining it). 2011-06-14 10:11:25 -04:00
kangax
0a9d835b12 Dynamically generate accessors based on state properties — width, height, fill, opacity, scaleX, scaleY, etc. For example, rect.set('fill', 'red') can now be replaced with rect.setFill('red'), and rect.get('opacity') with rect.getOpacity(). 2011-05-31 00:56:01 -04:00
kangax
d7fd8f0af3 fabric.Object#set can now be passed an object of property/value pairs rather than just property and value. E.g.: rect.set({ width: 100, height: 50, fill: 'red' }). 2011-05-29 21:59:48 -04:00
kangax
c1150c714a fabric.Element now has forEachObject. Add header to /demos, /tests and /docs pages. 2011-05-22 09:57:37 -04:00
kangax
abaa87fbd0 Add fabric.Text#backgroundColor (can be used for text highlighting). Change default lineheight of text objects from 1 to 1.6. 2011-05-13 14:34:24 -04:00
kangax
fe37bc66a0 fabric.Element#loadImageFromURL no longer displays image that's being loaded. Fix getPointer unit test. 2011-05-11 18:58:51 -04:00
kangax
2be834d582 Make sure tests continue running even if image is not loaded. 2011-05-11 18:42:19 -04:00
kangax
f47a4eff0b Bump timeout interval for large images to load. 2011-05-11 18:38:54 -04:00
kangax
6af48ed1c7 Fix couple more unit tests. 2011-05-11 18:34:52 -04:00
kangax
3ea4a4ad95 Fix majority of failing unit tests. 2011-05-11 18:17:21 -04:00
kangax
1f0b1280d4 Add unit tests for fabric.Object#selectable; make sure "selectable" is part of toJSON/toObject output. Fix failing fabric.Object unit tests. 2011-05-11 17:48:43 -04:00
kangax
79e37bbf30 Add fabric.Object#selectable Boolean property (true by default), which can be used to control object selection. 2011-05-11 15:56:49 -04:00
kangax
7041b64ad6 Update minified file. 2011-05-10 19:02:31 -04:00
kangax
14e988aa9f lockScaling constrain is now broken into lockScalingX and lockScalingY ones. Add lockUniScaling to be able to prevent non-proportional scaling of an object. lockHorizontally is now lockMovementX and lockVertically is now lockMovementY for consistency. Change demo accordingly. 2011-05-05 17:02:46 -04:00
kangax
b96c91a56f Try using requestAnimationFrame for animation test. 2011-05-03 19:03:10 -04:00
kangax
5c7440cc13 Fix leaking of one element's attribute values onto another (following) element during SVG parsing. 2011-04-29 16:44:49 -04:00
kangax
7a28d275a3 Add test for issue #25 about parseSVGDocument and rect element. 2011-04-28 16:37:21 -04:00
kangax
74dcd851dd Animation benchmark now allows to dynamically change scale of animated objects, load different shapes, and change canvas size. This allows us to see how all these aspects (e.g. canvas size or shape size) influence canvas rendering performance. 2011-04-23 17:39:56 -04:00
kangax
e61f46b44c Add "lineHeight" to fabric.Text options. Add slider to control line height of selected text to demo. 2011-04-20 16:36:31 -04:00
kangax
cf1c1b2808 Disable clipping in demo. 2011-04-11 15:21:07 -04:00
kangax
a29aa82518 Add experimental clipping support. 2011-04-11 02:41:55 -04:00
kangax
cc0c5085d7 Add fabric.Circle#getRadiusX, fabric.Circle#getRadiusY methods. 2011-04-09 17:37:35 -04:00
kangax
9853b4a18f Add rudimentary support for stroke style. Fix IE errors on a demo page. 2011-03-28 18:57:40 -04:00