Commit graph

90 commits

Author SHA1 Message Date
kangax
17fe1a2929 Allow to change number precision in sag transform values. Thanks Will McNeilly. 2012-10-24 22:05:19 +02:00
Steve Pemberton
f11f83b0db Fix for negative width on objects 2012-10-14 18:30:08 +01:00
Steve Pemberton
da28b363e4 Revert "Fix for negative width on objects preventing selection"
This reverts commit 55853039cd.
2012-10-14 18:23:39 +01:00
Steve Pemberton
55853039cd Fix for negative width on objects preventing selection 2012-10-14 13:27:41 +01:00
kangax
84a956c4b6 Lint everything with JSHint. Version 0.9.14. 2012-10-14 02:53:12 +02:00
kangax
33c8a34399 Fix gradient setting in loadFromJSON. Fix #246 again. 2012-10-13 19:56:54 +02:00
kangax
07698a22ae Add support for finding target per-pixel (ignoring transparent ones). This allows to drag shapes by non-transparent pixels only. Thanks Steve Pemberton for initial work. Version 0.9.13. 2012-10-11 00:40:03 +02:00
kangax
eacc459cf0 Add support for switching between filled and stroked corners. 2012-10-11 00:36:49 +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
4ac8b68d78 Show rotating point handle only if hasControls=true. Remove "hideCorners" since there's already "hasControls" property (consistent with "hasBorders" one). Version 0.9.11. 2012-10-07 16:12:37 +02:00
kangax
2b3994f4c7 Fix corner detection. Thanks Josh Pearce. Fix #275. Fix #269. 2012-10-03 23:45:49 +02:00
kangax
b555245780 Add support for animating multiple properties. 2012-10-03 23:45:49 +02:00
kangax
e8278236d6 Do not show middle controls when lockUniScaling is on. Closes #228. 2012-09-08 23:27:05 -04:00
kangax
06b0746258 Fix transform matrix bug. Closes #33. 2012-09-06 12:00:36 -04:00
kangax
77c7bd134f Fix object padding. 2012-09-05 17:25:37 -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
5f19d75a03 [BACK_INCOMPAT] Move NUM_FRACTION_DIGITS & MIN_SCALE_LIMIT to fabric.Object. 2012-09-02 11:50:07 -04:00
kangax
f646bdc735 object.theta --> object._theta 2012-09-02 11:34:48 -04:00
Kienz
77fe7884c0 RotatingPoint not working since strokeWidth is included in boundingBox of objects.
This should fix this.

Jsfiddle example:
http://jsfiddle.net/r2ZE7/23/
2012-08-27 19:51:28 +02:00
kangax
204923e86c Object boundaries now take "strokeWidth" into consideration. Closes #166. 2012-08-26 23:25:16 +02:00
kangax
0bbaddf859 Fix _initGradient with non-empty non-gradient values. 2012-08-20 18:39:04 +02:00
kangax
189b0efd34 Bump version to 0.9.0. 2012-08-20 18:34:37 +02: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
9d2f3d261b Fix rendering bug with objects in group that also have transform attribute. 2012-08-14 14:37:27 +02:00
kangax
a0d05624ed Remove incorrect offsets in polygon rendering and fix <rect> position when part of a group. Closes #113. Closes #229. 2012-08-14 14:03:20 +02:00
kangax
0fcd356bf6 Initial support for "strokeDashArray" (WIP; works for rectangles only for now). 2012-08-08 00:04:01 +02:00
kangax
3e6b880086 Fix set({ key1: value1, key2: value2 }) not working with groups. 2012-08-08 00:04:01 +02:00
kangax
04d770aa35 No longer allow to resize inactive objects (this also means cursor doesn't appear when hovering over resizing controls of inactive (non-selected) objects). 2012-08-02 21:19:06 +02:00
kangax
57484274ba Fabric events related to objects can now be observed on objects themselves.
For example, instead of:

canvas.observe('object:selected', function(o) {
  console.log('selected', o.target);
})

you can now do:

object.on('selected', function() {
  console.log('selected', object);
});

Events that are fired on objects are:

- mouseup
- mousedown
- mousemove

- rotating
- scaling
- moving

- modified
- selected

- added
2012-07-18 18:29:27 +02:00
kangax
5ce8df3c67 Remove invisible rotating point and fix few other bugs with it. Add fabric.Object#rotatingPointOffset offset. Closes #190. 2012-07-11 16:29:10 +02:00
kangax
5e29a2b319 Fix bugs in fabric.Object#animate (thanks Anton Ignatov). 2012-06-13 13:30:53 +02:00
kangax
e17fe9ddef Prevent error in fabric.Object#toDataURL when called before setCoords. 2012-06-07 16:24:44 +02:00
Juriy Zaytsev
a239bdd2a8 Merge pull request #168 from garg/master
Fix `fabric.Object#toDataURL` to take bounding rectangle dimensions into consideration. Add `fabric.Object#getBoundingRectWidth`, `fabric.Object#getBoundingRectHeight`.
2012-05-31 14:50:06 -07:00
garg
49a51b1388 Added getBoundingRectHeight and getBoundingRectWidth and changed toDataURL to use those instead of getHeight and getWidth. 2012-05-30 20:30:42 -03:00
Maciej Gajewski
752339aa3e Rotation point now works after flipY. 2012-05-29 13:04:25 +02:00
kangax
0e79544c12 Preserve hasControls, hasBorders, hasRotatingPoint values during serialization. Closes #163. 2012-05-21 14:24:33 +04:00
kangax
09d6a6451d Revert circle as rotating control for now (will need to figure out why scaling occurs there). 2012-05-15 18:36:34 +04:00
kangax
c5bf683d63 Display circle as rotating control, rather than square. 2012-05-15 18:01:57 +04:00
Kienz
7c0a2e65cd Bugfix seperate rotating point 2012-05-15 14:54:39 +03:00
Kienz
ee380cc3a0 Revert "Revert "Separate rotating corner""
This reverts commit cc41222b0d.
2012-05-15 00:46:05 +02:00
Kienz
cc41222b0d Revert "Separate rotating corner"
This reverts commit d95894f5c2.
2012-05-15 00:44:38 +02:00
Kienz
d95894f5c2 Separate rotating corner
These changes are based on the easel.ly project. The separate rotate
corner can enabled/disabled by the option hasRotatingPoint
(true/false). By default the option is set to false.
Maybe you can have a look at these changes.
2012-05-15 00:35:20 +02:00
Juriy Zaytsev
351ec5d48f Merge pull request #155 from balthazar/master
Add easing functions.
2012-05-13 07:43:06 -07:00
kangax
cba1d4ca21 [BACK_INCOMPAT] Move object straightening methods into its own, optional module (fabric.Object#straighten, fabric.Object.fxStraighten, fabric.Canvas#straightenObject). 2012-05-11 15:31:30 +04:00
Balthazar Auger
f2a37a3bc0 Adapt fabric.util.animate to work with general easing equations 2012-04-24 02:28:45 -03:00
Balthazar Auger
b2853e8717 Study how to insert easing functions 2012-04-24 00:27:18 -03:00
kangax
19dbb74307 Fix trailing commas. Closes #118. 2012-02-03 09:18:35 -05:00
kangax
e9dee5a37d Make SVG export of text more reliable (rgba()-based colors now work in Illustrator). Cut off decimal parts of values in SVG output, which slims down the size. 2012-02-01 18:43:52 -05:00