Commit graph

1051 commits

Author SHA1 Message Date
kangax
aea61aa64e Update itext docs 2013-11-06 20:35:32 +01:00
kangax
c3fd102cdb Fix fabric.Object#selectable. Closes #957 2013-11-06 18:41:02 +01:00
kangax
d0abb90f1c Add fabric.Image#crossOrigin which allows crossOrigin image loading and canvas rendering without tainting. fabric.util.loadImage now accepts 4th argument (crossOrigin) and sets crossOrigin="" on image element by default. fabric.Image.fromURL can be passed crossOrigin via 3rd argument (options). Closes #263 2013-11-05 15:13:15 +01:00
kangax
baf646e7a0 Support mouse and touch events simultaneously. Closes #670 2013-11-05 12:27:15 +01:00
kangax
f91dd30dc7 Better line length in parser 2013-11-05 11:59:48 +01:00
kangax
6cb941c116 Extract elements parsing into a separate object (ElementsParser) 2013-11-04 17:12:05 +01:00
kangax
ce8fe3447d Break parseStyleAttribute apart 2013-11-04 16:41:26 +01:00
kangax
2753108028 Initial implementation of fabric.IText#toSVG (~75% complete atm) 2013-11-04 15:20:40 +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
Juriy Zaytsev
fe54615584 Merge pull request #931 from lorenzopolidori/controls-visibility
Added object controls visibility. Closes #552.
2013-11-03 15:28:19 -08:00
kangax
330784ac2c [BACK_INCOMPAT] Change default objects' originX/originY to left/top 2013-11-04 00:15:49 +01:00
Lorenzo Polidori
d1642c0729 Added object controls visibility (github issue #552). 2013-11-03 23:08:05 +00:00
kangax
c6c5090a20 Small tweaks in text.class.js 2013-11-03 17:38:39 +01: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
Kienz
6f115bbf1e Fix fabric.util.enlivenObjects for empty fabric.Group objects
Add unit test
Fixes issue #943
2013-11-02 16:02:38 +01:00
kangax
bdf147fbfb Fix itext styling due to caching 2013-11-02 15:06:15 +01:00
kangax
2da3fa80b5 Slight reorganization 2013-11-02 14:41:28 +01:00
kangax
7eee6ddef0 Add caching to IText which increases performance of large text tremendously 2013-11-02 14:15:20 +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
c6ff46269c Preserve canvas reference in fabric.Object#toDataURL. Closes #938 2013-10-31 16:00:31 +01:00
kangax
6210da1568 Avoid jshint error with "unknown" typeof 2013-10-30 18:15:02 +01:00
kangax
43a8df57b3 Remove duplication in anim_ease 2013-10-30 17:42:49 +01:00
kangax
7ff0ae826f Refactor _renderViaNative a bit more 2013-10-30 17:35:20 +01:00
kangax
bc5b78f60c Refactor touch event abstraction 2013-10-30 17:29:55 +01:00
kangax
9433729124 Refactor getPointer 2013-10-30 17:26:26 +01:00
kangax
3b3b478e77 Refactor _setObjectScale 2013-10-30 17:15:53 +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
10a3319ed1 Refactor _restoreObjectState 2013-10-30 15:09:02 +01:00
kangax
8ad5e7e511 IText doc fixes 2013-10-30 14:55:02 +01:00
kangax
f53559773f Prevent errors in FF when rendering non-ready patterns 2013-10-29 21:14:20 +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
167f2fa089 Move shared attributes out of parser since it's needed by many "classes" 2013-10-28 14:01:44 +01:00
kangax
dd11dc7e87 Resize canvas back only after data url is retrieved. Closes #924 2013-10-28 08:02:58 +01:00
kangax
6892783156 Refactor fabric.Text#toSVG 2013-10-27 19:20:46 +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
803ad572d4 draw -> render, for consistency 2013-10-27 13:27:05 +01:00
kangax
10c8a108d4 Unify image loading in few places 2013-10-27 13:12:48 +01:00
kangax
8f42a40964 Refactor pointerX/pointerY 2013-10-27 13:01:38 +01:00