Commit graph

90 commits

Author SHA1 Message Date
Kienz
ddaf8ba796 Fix touch events if canvas is inside a scrolled container (see issue #123).
Fix bug if mouse moves over absolute scrolled element while object scaling (see issue #385). Also if mouse is moved over documentElement (fabric.document) while scaling object is fixed (same issue like #385).

Tested with Safari 5.1.7, 6.1, Firefox 18, 3.6.28, Chrome 24/25beta, Opera 12.12 and iPhone iOS 6.1, iPad iOS 6.1 in non-scrolled and scrolled containers.
2013-02-01 18:27:20 +01:00
kangax
6da2ed6d65 More canvas refactoring 2013-01-20 20:40:26 +01:00
kangax
70119f7095 Refactor some logic from canvas and object classes into mixins 2013-01-20 20:40:26 +01:00
Kienz
2715ef306c Bugfix for controlsAboveOverlay (issue #380)
Only if pointer is over targetCorner lastRenderedObjectWithControlsAboveOverlay is used as targetObject.

See issue #380.
2013-01-14 17:09:50 +01:00
kangax
1f206d039e Move gesture-based logic into a separate module 2013-01-10 18:23:23 +01:00
kangax
84270a47b2 Merge remote-tracking branch 'jaffer/master' 2013-01-10 14:31:59 +01:00
kangax
082bee8279 Add fabric.Canvas.prototype.freeDrawingCursor 2013-01-10 14:22:02 +01:00
Jaffer Haider
20a87c6609 Support for pinch gesture to scale and rotate objects using Event.js. 2013-01-08 16:04:38 +05:00
kangax
e12b6598cd Merge master 2012-12-18 18:12:08 +01:00
kangax
71dd5a9ec0 Pass original event to all fabric custom events (that are triggered via mouse/touch) 2012-12-18 11:52:18 +01:00
kangax
203ea6b51f Doc fixes 2012-12-18 11:46:51 +01:00
kangax
c8172be31d Final doc additions. Every public method is now documented! 2012-12-16 20:44:26 +01:00
kangax
b5b901e99e Fix isMoving not set to false sometimes. Closes #350. Version 0.9.31. 2012-12-15 17:29:40 +01:00
kangax
4bcc0bd80f Add uniScaleTransform and centerTransform parameters to canvas, which control how objects are transformed 2012-12-15 17:13:40 +01:00
kangax
a6a7b72dcd Padding-related fixes and some canvas.class refactoring. 2012-12-07 19:19:04 +01:00
kangax
913a4970bc Merge master 2012-12-07 15:43:57 +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
352dd44b3c Implement smooth free drawing. Free drawing is now a separate module. Thanks @coulix! 2012-12-06 19:47:34 +01:00
kangax
0c1fd43fc1 First stab at dynamic origin of transformation (based on the excellent work of https://github.com/stormbreakerbg). 2012-12-06 19:12:54 +01:00
coulix
a0cf70994d No need for free drawing to extend fabric Objecti + freedrawing module presence check before instantiation 2012-12-01 00:34:33 +01:00
coulix
8f8322fb46 Merge master 2012-11-30 18:57:49 +01:00
coulix
16422bed01 Refactoring 2012-11-30 18:42:02 +01:00
kangax
63c5c02560 Add support for dashed selection. Thanks @coulix! Version 0.9.24. 2012-11-28 13:04:39 +01:00
coulix
61db93d5ec Smooth live free drawing on contextTop canvas 2012-11-28 11:55:30 +01:00
Greg Tappero
d0952172a3 Dashed selection borders
Wip dashed selection nearly there

fix dashed selection merge
2012-11-28 11:44:29 +01:00
kangax
d693130115 Add canvas reference to active group. Version 0.9.23. 2012-11-27 16:25:07 +01:00
kangax
f0b5329157 Doc additions, fixes. 2012-11-23 13:38:26 +01:00
kangax
2e1d02148b Get rid of _theta and update "angle" property dynamically. Version 0.9.22. Fix #283. 2012-11-15 14:20:45 +01:00
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