Commit graph

145 commits

Author SHA1 Message Date
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
Tim Andres
1576306ef0 Simplified fabric.util.getBoundingRect code 2013-06-28 17:29:07 -04:00
Tim Andres
09e438b0ee Fixed bounding box bug with SVG parsed polylines and polygons 2013-06-28 16:39:15 -04:00
kangax
6597b8919b Make sure only existent custom properties included in output. Closes #713 2013-06-19 12:49:45 +02:00
kangax
55eeed181b Move drawArc to utils. Simplify and speed up fabric.Point 2013-06-06 02:49:42 +02:00
kangax
221146997c Fix pattern initialization from function string. Closes #442. Version 1.1.18 2013-06-02 22:07:16 +02:00
kangax
1c1b7e4b95 Fix function body matching regex. Add fabric.util.getFunctionBody 2013-06-01 18:08:36 +02:00
kangax
6e41088614 Fix getElementOffset in IE<9 2013-06-01 13:14:52 +02:00
Kienz
cd49e7d90e Update README
Move getKlass into seperate function (fabric.util.getKlass)
2013-05-31 20:52:04 +02:00
Kienz
7bb8cc63c6 Fix fabric.util.getElementOffset for Firefox 2013-05-26 01:19:54 +02:00
Kienz
46256f2eeb Reverse checks currentStyle & getComputedStyle => first check getComputedStyle and then currentStyle 2013-05-25 18:38:38 +02:00
Kienz
a6eab8d4e2 Fix wrong canvas offset
- Copy inline style attributes from lowerCanvasEl to upperCanvasEl
- Copy classes from lowerCanvasEl to upperCanvasEl
- Add borderTopWidth, borderLeftWidth, paddingTopWidth and paddingLeftWidth (offsetAttributes) to canvas offset (fabric.util.getElementOffset) - these properties are not considered from getBoundingClientRect()
- JSfiddle's for tests - new: http://jsfiddle.net/Kienz/KRcsY/, old: http://jsfiddle.net/Kienz/xrMDr/
2013-05-25 17:32:42 +02:00
kangax
d2bcfc922d Build distribution 2013-05-19 16:26:23 +02:00
Nathan Muir
fd22edb289 Merge pull request #1 from kangax/master
Merged master branch
2013-05-15 20:52:10 -07:00
kangax
f1c8670102 Remove unnecessary script attributes 2013-05-14 12:34:59 -04:00
kangax
6f306a6436 Add no-es5-compat option during build. Add option to include/exclude stateful module during build. 2013-05-14 12:34:45 -04:00
Nathan Muir
8e8597cb7b Updated fabric.util.getElementOffset(). Returns correct offset when using requestFullscreen(parentElement) 2013-05-10 14:14:38 +10:00