Commit graph

90 commits

Author SHA1 Message Date
kangax
c3fd102cdb Fix fabric.Object#selectable. Closes #957 2013-11-06 18:41:02 +01:00
kangax
baf646e7a0 Support mouse and touch events simultaneously. Closes #670 2013-11-05 12:27:15 +01:00
kangax
59af4b7934 Add ctrl/cmd + x support 2013-11-04 12:05:29 +01:00
kangax
1c07c9600e Fix cursor appearance in itext 2013-11-04 11:59:10 +01:00
Lorenzo Polidori
d1642c0729 Added object controls visibility (github issue #552). 2013-11-03 23:08:05 +00:00
Kienz
5017bc6626 [BACK_INCOMPAT] fabric.StaticCanvas#backgroundImage and fabric.StaticCanvas#overlayImage are fabric.Image instances. fabric.StaticCanvas#backgroundImageOpacity, fabric.StaticCanvas#backgroundImageStretch, fabric.StaticCanvas#overlayImageLeft and fabric.StaticCanvas#overlayImageTop were removed.
`backgroundImage` and `overlayImage` are now `fabric.Image` instances
New property `overlayColor` (analog to `backgroundColor`) - should be set with `canvas.setOverlayColor`
`backgroundImageOpacity` was removed => use `fabric.Image#opacity`
`overlayImageLeft ` was removed => use `fabric.Image#left`
`overlayImageTop ` was removed => use `fabric.Image#top`
`backgroundImageStretch` was removed => use `fabric.Image#width` and `fabric.Image#height`. If you scale your canvas you have to adjust the backgroundImage width/height manually.
Update SVG output.
Add 2nd parameter `firstLetterOnly` to `fabric.util.string.capitalize` => only first letter is transformed to uppercase (other letters stay untouched)
Add `preserveAspectRatio="none"` to `fabric.Image#toSVG` (otherwise streched backgroundImage and overlayImage didn't work as expected)
Update examples - TODO: Update jsfiddles for `setBackgroundImage` and `setOverlayImage`
Add unit test

Closes issue #270
2013-11-03 13:09:49 +01:00
kangax
9bfce93ddf Only fire dblclick if clicked at the same location 2013-11-02 12:37:50 +01:00
kangax
c5c6474c4d Ensure one editing text at a time 2013-11-01 22:39:28 +01:00
kangax
7235a97e91 Add basic copy/paste support in IText; fix certain char insertion. 2013-11-01 22:28:23 +01:00
kangax
7022cd4a9b Even more canvas_events refactoring 2013-10-30 17:05:11 +01:00
kangax
171cfc1a05 More canvas_events refactoring 2013-10-30 16:58:47 +01:00
kangax
cd66612aa3 More canvas_events refactoring 2013-10-30 16:34:57 +01:00
kangax
61a3fb5123 Refactor __onMouseDown 2013-10-30 15:32:04 +01:00
kangax
8ad5e7e511 IText doc fixes 2013-10-30 14:55:02 +01:00
Alex Chuchunkov
a6f8e16c81 stopObserving w/o arguments removes all event - handler pairs. Closes issue #936 2013-10-29 22:47:29 +04:00
kangax
dd11dc7e87 Resize canvas back only after data url is retrieved. Closes #924 2013-10-28 08:02:58 +01:00
kangax
eee0c9416b Refactor canvas event handling 2013-10-27 19:05:04 +01:00
kangax
fb05e13c69 Return early 2013-10-27 18:40:53 +01:00
kangax
8d2d6dabad De-duplicate cursor moving methods even more 2013-10-27 18:39:22 +01:00
kangax
b02c444b3f Move regex into instance property 2013-10-27 14:35:25 +01:00
kangax
b8b3403b0d Move line shifting into a separate method 2013-10-27 14:32:33 +01:00
kangax
b6ceb0a87d Refactor key movement handlers in IText 2013-10-27 14:26:17 +01:00
kangax
733eccb00c Separate IText behavior into a separate "module" 2013-10-27 14:05:35 +01:00
kangax
4ecef881fe Move out event binding 2013-10-26 19:16:44 +02:00
kangax
e34fb6a256 More specific documentation 2013-10-25 09:05:39 +02:00
Kienz
0f9612b69f Fix object selection with shift key - Closes issue #912 2013-10-22 20:33:20 +02:00
Juriy Zaytsev
b92e9575e0 Merge pull request #866 from rykerwilliams/master
Update Events / Gestures modules with event.js 1.1.3
2013-10-12 14:13:02 -07:00
rykerwilliams
5bf42c099f Add custom object properties to clone function. 2013-10-06 17:02:36 -04:00
rykerwilliams
d40509d688 Remove diff tool change. 2013-10-06 16:41:27 -04:00
rykerwilliams
5445f52db3 Remove canvas_wheel_event.mixin.js. Change wrapping to bind. 2013-10-06 16:35:09 -04:00
rykerwilliams
8fafe15649 Merge branch 'master' of https://github.com/kangax/fabric.js 2013-10-05 21:02:45 -04:00
kangax
f93a0e4313 Fix text rendering offsets on Node by simplifying things 2013-09-30 16:15:00 +02:00
Kienz
61835602f9 Remove toGrayscale from fabric.PathGroup and fabric.Collection 2013-09-29 09:49:41 +02:00
Kienz
fa2f18a77a Add more docs.
Examples, tutorial and demo links.
2013-09-28 12:31:32 +02:00
kangax
485b3569d3 Add docs 2013-09-27 22:22:28 +02:00
Juriy Zaytsev
3345156793 Merge pull request #873 from Kienz/docAddtions
Doc additions
2013-09-26 12:12:28 -07:00
Kienz
7792b1274b Doc additions
Add example and jsfiddle link to `canvas.loadFromJSON`
2013-09-26 21:04:10 +02:00
Kienz
9de6c9a473 Doc additions
Add examples and links to jsfiddle to `fabric.Object.setGradient`, `fabric.Object.setPatternFill`, `fabric.Object.setShadow` and `fabric.Canvas.toDataURL
2013-09-26 20:17:53 +02:00
Kienz
5f9edecd18 [BACK_INCOMPAT] Split fabric.Object.centerTransform and fabric.Canvas.centerTransform into the properties centeredScaling and centeredRotation
centeredScaling: Define if object scaling should be centered (true). Default = false.
centeredRotation: Define if object rotates around center (true) or around origin (originX/originY) point (false).  Default = false.
Pressed altKey negates the behavior.
2013-09-26 18:19:17 +02:00
kangax
41ab3a0064 Doc additions 2013-09-26 14:12:02 +02:00
rykerwilliams
f083a3dabb Forgot __onShake method. 2013-09-23 10:55:00 -04:00
rykerwilliams
88aa0df407 Added new custom version of event.js. Added event listeners for shake, drag and orientation change.
Custom version available: https://github.com/rykerwilliams/Event.js
2013-09-23 10:10:40 -04:00
rykerwilliams
888f324e46 Casing Issue. Remove unneed variables. 2013-09-21 17:51:51 -04:00
rykerwilliams
9283530837 Add wheel event mixin. 2013-09-21 17:41:06 -04:00
kangax
d29a1d9ccd Uncomment fabric.Object#getPointByOrigin 2013-09-19 19:49:51 +02:00
Juriy Zaytsev
3c50e72548 Merge pull request #853 from Kienz/patch-1
Avoid unnecessary `renderAll` calls in mousedown and mouseup events
2013-09-18 06:17:51 -07:00
Kienz
516fa76b68 Fix jshint error 2013-09-18 08:23:36 +02:00
Kienz
721ac7a8c2 Doc additions - document object parameter 2013-09-17 22:42:58 +02:00
Stefan Kienzle
23a4685d22 Avoid unnecessary renderAll calls in mousedown and mouseup events.
Tested it with `canvas.selection = true/false`.
2013-09-17 18:45:54 +02:00
kangax
dbc96349ce Refactoring 2013-09-15 20:29:20 +02:00