Commit graph

161 commits

Author SHA1 Message Date
asturur
587d527bb8 Update arc.js
while investigating why some arcs fails, reduced the number of calls to math.sin and math.cos, not by that much.
2014-06-21 17:45:50 +02:00
Max Kaplan
6f3f1ff7c9 Fix loadFromJSON 404s breaking fabric (Image)
Prevent image 404s in Images from loadFromJSON from breaking everything
trying to get attributes of a source which is null, while passing it
upwards to allow dealing with images which failed to load outside of
Fabric.JS Issue #1079
2014-03-07 01:12:50 -05:00
kangax
2acdc7e85b Fix few bracketless statements. Down to 257 failures on JSCS. 2014-02-27 15:00:42 -05:00
kangax
1d4356008a Revert scroll detection change. 2014-02-21 15:04:42 -05:00
kangax
52a60769ee Update docs, specifying ms. 2014-02-20 13:59:27 -05:00
kangax
631226d26b More JSCS fixes; down to 295 failures 2014-02-17 11:55:54 -05:00
kangax
d2f6a9033e Add JSCS validation & change bunch of things for conformance. Down to 333 failures from ~1000. 2014-02-16 16:36:14 -05:00
kangax
21f573d381 Speed up getElementStyle 2014-02-16 16:36:13 -05:00
Michael Elsdörfer
1be7b9fee8 Fix mouse handling inside a scrollable div.
See also #870, which was incorrectly merged.
2014-02-15 03:29:22 +01:00
kangax
f928e68386 Few small tweaks 2014-01-26 22:19:12 -05:00
kangax
dbbfb992cb Add all properties onto prototype (not to invalidate hidden classes) 2014-01-23 10:49:23 -05:00
kangax
56f0bfb9cc Avoid setting crossOrigin on an image if unspecified. Closes #971 2013-11-27 20:00:33 +01:00
Michael Sievers
13feddfa16 Call fabric.util.getScrollLeftTop inside getElementOffset 2013-11-20 13:06:28 +01:00
Michael Sievers
7cb161438c Move getScrollLeftTop from dom_events.js to dom_misc.js 2013-11-20 10:42:34 +01:00
kangax
de7b92bda5 Some refactoring; move arc into a separate file 2013-11-16 15:20:41 +01:00
kangax
779c2ef527 Move isTransparent logic to utils 2013-11-13 14:10:28 +01:00
kangax
1183464dde Refactor arcToSegments 2013-11-10 17:13:01 +01:00
kangax
2d2bd68325 Add doc on requestAnimFrame 2013-11-06 21:20:07 +01:00
Juriy Zaytsev
b09af384c4 Merge pull request #956 from articulate/master
Finer animation
2013-11-06 12:18:25 -08:00
kangax
dcf1e1e980 Add data-url crossOrigin workaround 2013-11-06 21:16:44 +01:00
bbudd
24da312a54 fixed weird spacing stuff2 2013-11-05 17:03:47 -08:00
bbudd
61fdc7d93a fixed weird spacing stuff 2013-11-05 17:03:01 -08:00
bbudd
afb6db8e1c change animate to use sub-millisecond where possible 2013-11-05 16:58:39 -08: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
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
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
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
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
kangax
f114a566b1 Refactor min/max in lang_array 2013-10-27 12:54:35 +01:00
kangax
64f749f8d1 Remove duplication in Polyline/Polygon classes 2013-10-26 20:20:48 +02:00
kangax
1cf94af014 Remove duplication in anim_ease.js 2013-10-25 12:15:26 +02:00
kangax
41ab3a0064 Doc additions 2013-09-26 14:12:02 +02:00
kangax
7e9e27aba5 Fix object loading yet again 2013-09-24 18:34:32 +02:00
kangax
15a6a3c3df Fix objects enlivening with sparse arrays. Version 1.3.3 2013-09-24 15:58:52 +02:00
kangax
83ca60e885 Fix resolveNamespace and getKlass on node 2013-09-24 13:25:38 +02:00
kangax
6de9f65702 Fix animation abort 2013-09-19 19:49:51 +02:00
kangax
24836cbdaf Call abort earlier in animation loop (makes it possible to abort immediately) 2013-09-19 19:49:51 +02:00
Kienz
9f6dea5d9e Add reviver function to fabric.Canvas.loadFromJSON (and loadFromDatalessJSON)
Add unit test
2013-09-12 20:10:23 +02:00
kangax
d1bcd18de5 Fix resolveNamespace 2013-08-17 20:18:06 +02:00
Stefan Kienzle
901ee7f942 Update fabric.Image.filters.Mask - based on https://github.com/kangax/fabric.js/pull/667 (@aleph1)
[BACK_INCOMPAT] `fabric.Image._initFilters` is now async, add parameter callback
Add `fabric.util.resolveNamespace` - used to get correct klass in `fabric.util.enlivenObjects`
Doc additions
2013-08-14 18:07:56 +02:00
Kienz
92bdebfde7 Doc fixes, Update README (1800+ unit tests) 2013-08-08 18:31:26 +02:00
kangax
f270ca0259 Move animation methods to an optional module 2013-07-28 15:25:31 +02:00
kangax
0bf607be2e Revert polygon/polyline points change as it breaks shapes in SVG import section 2013-07-08 12:39:13 +02:00
kangax
3eb00518f8 Fix pointer detection in scrollable container. Thanks @kwicher. Closes #730 2013-07-07 22:32:03 +02:00
Juriy Zaytsev
3076a7b45f Merge pull request #736 from timandres/master
Fix polygon/polyline bounding box
2013-07-07 13:09:30 -07:00
kangax
a33a599417 Remove commented out code 2013-07-04 14:18:30 +02:00