Commit graph

62 commits

Author SHA1 Message Date
kangax
a816fb9740 Fix object controls detection when controlsAboveOverlay=true. Fix #256. 2012-10-28 13:56:07 +01:00
kangax
aaee929373 Make overlay image part of canvas object/json representation. Some renderAll cleanup. Fix #265. 2012-10-28 12:21:44 +01:00
Steve Pemberton
e8cdf8e2fe Fixes for shift selecting/unselecting groups
Shift selecting/deselecting no longer causes the group to have its
transform re-applied.

You can no longer drag a shift added object separately from the group.
This also fixes the issue of the object jumping on addition to a group.

Objects in a group are now rendered to the upper-canvas in the order
they are in on the lower canvas.
2012-10-21 15:31:11 +01:00
kangax
f576ec797b Documentation additions. 2012-10-20 20:12:28 +02:00
kangax
84a956c4b6 Lint everything with JSHint. Version 0.9.14. 2012-10-14 02:53:12 +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
f646bdc735 object.theta --> object._theta 2012-09-02 11:34:48 -04:00
kangax
deb33940a2 Avoid rendering dot in FF on click in free drawing mode. 2012-08-23 15:15:11 +02:00
kangax
3fbdd508ba Fix inline docs. 2012-08-20 18:23:53 +02:00
Kienz
35e8addd88 moveCursor and typing error defaultCursor
Property moveCursor, _setCursor(this.moveCursor) when moving object,
typing error defaultCursor
2012-07-29 11:05:07 +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
83582467d6 Merge master 2012-06-23 18:18:02 +02:00
kangax
9926d8389a [BACK_INCOMPAT] Remove CANVAS_WIDTH, CANVAS_HEIGHT properties from fabric.Canvas.prototype (as they're no longer used anywhere). Lowercase some of the fabric.Canvas.prototype properties, for consistency: CURSOR -> defaultCursor, ROTATION_CURSOR -> rotationCursor, HOVER_CURSOR -> hoverCursor, CONTAINER_CLASS -> containerClass. 2012-06-23 00:18:41 +02:00
kangax
9d36e26d71 Fix "mouse:down", "mouse:move", "mouse:up" events not firing during free drawing mode. 2012-06-22 17:25:15 +02:00
kangax
5d803c9778 Fire "mouse:down", "mouse:move", "mouse:up" events during free drawing mode. 2012-06-22 17:05:07 +02:00
kangax
126c2aa507 Merge master 2012-06-20 17:43:39 +02:00
Maciej Gajewski
752339aa3e Rotation point now works after flipY. 2012-05-29 13:04:25 +02:00
Maciej Gajewski
1d037645b9 Added ability to set cursor for rotation point just as default cursor. 2012-05-29 12:42:41 +02:00
kangax
7451d8978a Set cursor to "crosshair" when hovering over rotating control. 2012-05-15 18:01:38 +04:00
kangax
5cbd8bdb8a Merge remote-tracking branch 'Kienz/master' 2012-05-15 16:53:57 +04:00
Kienz
b3b99e6aee Fix problem when hasRotatingPoint = 'false'. In this case the behavior is the same as before: corner-controls: scale + rotate. 2012-05-15 15:36:19 +03:00
kangax
a5efac75bb Merge remote-tracking branch 'Kienz/master' 2012-05-15 16:14:15 +04:00
Kienz
475e3ae1ce Bugfix seperate rotating point 2012-05-15 14:56:55 +03:00
kangax
60f6bdfa60 Merge remote-tracking branch 'Kienz/master' 2012-05-15 15:08:03 +04: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
Kienz
33c7cda3aa Group selection by holding shift key if canvas.selection = false no longer possible 2012-05-14 12:25:02 +03:00
kangax
7c95155c2e Add fabric.Canvas#getSelectionElement for retrieval of canvas element on which object selection is drawn. 2012-05-13 18:37:28 +04:00
kangax
5a2eb2e3df [BACK_INCOMPAT] fabric.Canvas#getContext now returns context of canvas element on which all objects are drawn. fabric.Canvas#getSelectionContext returns context of canvas element on which object selection is drawn. 2012-05-13 18:30:12 +04:00
kangax
83e3c8bd9e Initial implementation of generic groups. See https://github.com/kangax/fabric.js/wiki/Working-with-groups for more info. 2012-04-08 15:15:31 +02:00
kangax
3d6ae8442f Fix object controls not working in IE8. Closes #92. 2012-01-26 19:39:30 -05:00
kangax
d72fceb14b Documentation tweaks. 2011-12-08 09:44:05 -05:00
kangax
ea99a1fc7c Pass actual event when firing synthetic "object:selected" one. 2011-12-05 12:55:31 -05:00
kangax
eb9d64f89a Fix Opera <12 bug with canvas not getting correct prototype. 2011-11-28 19:47:41 -05:00
kangax
b8ea6b7cec [BACK_INCOMPAT] Add support for static canvases — fabric.StaticCanvas. fabric.Canvas#loadImageFromURL -> fabric.util.loadImage. Add fabric.Canvas#centerObject. 2011-11-27 23:57:28 -05:00
kangax
7adb4309de Add support for customizing canvas default cursor. 2011-11-11 15:01:20 -05:00
kangax
6c463afda5 Fix fabric.Canvas#backgroundImage bug. 2011-10-28 17:10:01 -04:00
kangax
2b08618742 Fire "object:scaling" and "object:rotating" events. 2011-09-29 09:31:57 -04:00
kangax
36aeed700a [BACK_INCOMPAT] fabric.Canvas#selection boolean property now only affects _group_ selection (i.e. blue area that allows to select multiple objects no longer appears). Objects can still be selected by clicking on them. To make _everything unselectable_ — set "selectable" property of each object to false AND fabric.Canvas#selection to false. 2011-09-26 14:43:00 -04:00
kangax
5fa051ccb9 Do not add/remove touch listeners in non-supporting environments. 2011-09-22 11:56:19 -04:00
kangax
efd2aba325 Add basic touch event support. 2011-09-21 19:29:00 -04:00
kangax
db456d2b68 Closes #49. Fix z-index issues with JSON loading.
`fabric.Canvas#insertAt` now accepts third (boolean) argument, indicating whether splicing can be used of insertion or not.
2011-09-19 20:23:00 -04:00
kangax
5dc7220425 Closes #51 again. Fix background scaling in toDataURLWithMultiplier. 2011-09-07 16:30:25 -04:00
kangax
952a31262e Closes #51. Fix canvas background becoming smaller when "rasterizing" canvas via toDataURLWithMultiplier. 2011-09-06 14:03:28 -04:00
kangax
a3d693302c Closes #38. Add support for fabric.Canvas#backgroundImage. 2011-08-28 14:55:33 -04:00
kangax
09fd6210b1 "mousemove" event listener on document is now only attached after "mousedown" on canvas. This avoids unnecessary work when moving mouse outside of canvas (especially with multiple canvas instances on a page). 2011-08-26 12:58:01 -04:00
kangax
8f819bb760 Fabric can now run under node.js 2011-08-11 15:18:18 -04:00
kangax
35ad4bf6e3 Preparing fabric to run on node.js 2011-08-05 19:00:26 -04:00