Commit graph

58 commits

Author SHA1 Message Date
Andrea Bogazzi
015af249fa Update canvas loadFromJSON to restore includeProperties (#2921)
added test also.
2016-04-30 13:51:12 +02:00
Andrea Bogazzi
99ef58ad78 Update canvas_static.js 2016-02-08 15:25:10 +01:00
Andrea Bogazzi
84f75b5e9f Update canvas_static.js 2016-02-07 18:36:28 +01:00
Andrea Bogazzi
4030b18d9f add test for dataurl 2016-02-07 18:31:05 +01:00
Andrea Bogazzi
842af5d993 change svg header to use viewbox 2015-11-22 14:32:11 +01:00
Andrea Bogazzi
4a979633e4 Update canvas_static.js 2015-11-13 00:45:48 +01:00
Andrea Bogazzi
cda0611326 Add support for skew objects. 2015-09-17 14:22:12 +02:00
Andrea Bogazzi
0edd147b0e Update group.class.js 2015-08-08 14:30:24 +02:00
Juriy Zaytsev
bd09021b3b Fix tests 2015-07-20 13:53:38 -04:00
Andrea Bogazzi
f805e57297 Update rect.js 2015-07-20 12:57:13 +02:00
Juriy Zaytsev
2171dd1379 Output less irrelevant information in fabric.Image#toObject 2015-07-17 17:42:30 -04:00
Juriy Zaytsev
0e154be1a3 Fix tests 2015-07-14 16:45:29 -04:00
kangax
94f7035624 Lint unit tests and fix errors/warnings 2015-04-23 11:47:35 +02:00
Incuuu
4907861edb Add tests for setBackgroundImage options parameter 2015-04-07 13:38:26 +04:00
Andrea Bogazzi
49f449ee4f Update image.class.js 2014-10-11 21:56:38 +02:00
Juriy Zaytsev
e524c13521 Merge pull request #1638 from joerozek/stacking
Support for preserving object stacking. Closes #1636.
2014-09-25 13:32:03 +02:00
Andrea Bogazzi
af1138a686 Divided FillRule from globalCompositeOperation 2014-09-23 08:53:56 +02:00
Andrea Bogazzi
0a958de01e Update canvas_static.js 2014-09-18 14:54:16 +02:00
Joe Rozek
d2b146c21c support for preserving object stacking 2014-09-04 12:01:48 -07:00
Andrea Bogazzi
8500f28f8f removed x and y no more used for rect 2014-08-05 13:08:40 +02:00
Bnaya Peretz
f7fa1a874a tests 2014-07-31 18:19:19 +03:00
Stefan Kienzle
306a040fef Fix initialization of viewportTransform array
Add unit tests
JSDoc tweaks
2014-07-17 13:28:55 +02:00
Kienz
fd3ace05bb [BACK_INCOMPAT] Possibility to remove multiple fabric.Objects from collection (canvas, group) - this (canvas, group or object) is returned instead of delete object
Update unit tests - use strictEqual for some cases
Add multiple objects raised `object:added` for last added object first - now 1st added object raises 1st `object:added` event, 2nd object raises 2nd `object:added`…
2013-12-07 11:07:46 +01:00
Kienz
d4b2ea18b7 Fix center methods for object’s with different originX/originY
object.center() only re-renders canvas once instead of twice
Update unit tests
2013-11-20 20:41:13 +01:00
kangax
ffe6091dd7 Move getObjects to fabric.Collection. Add support for getObjects(type). Version 1.3.10. 2013-11-09 14:50:30 +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
330784ac2c [BACK_INCOMPAT] Change default objects' originX/originY to left/top 2013-11-04 00:15:49 +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
14d053e9b2 Fix unit test 2013-09-29 10:21:55 +02:00
Kienz
be86429b32 Add reviver function to fabric.Canvas.toSVG.
Reviver function accepts one parameter (svg string representation of object instance) and should return svg string.
Add qunit test.
2013-09-29 09:22:44 +02:00
kangax
f2ad6e5be6 [BACK_INCOMPAT] Move "backgroundColor" from fabric.Text to fabric.Object (only works with text for now). Remove fabric.Object#overlayFill. Remove fabric.Canvas.toGrayscale, fabric.Object#toGrayscale, and fabric.Object#overlayFill. Version 1.3.5 2013-09-28 23:47:53 +02:00
kangax
408a8b9de6 Alias "jpg" format to "jpeg". Closes #806 2013-09-14 18:44:44 +02:00
kangax
5ebd697978 [BACK_INCOMPAT] Remove selectable, hasControls, hasBorders, hasRotatingPoint, transparentCorners, perPixelTargetFind from default object/json representation of objects. Fix includeDefaultValues. Version 1.2.13. Closes #795 2013-09-11 11:41:00 +02:00
Kienz
8c74f2b335 [BACK_INCOMPAT] fabric.Text#textShadow has been removed - new fabric.Text.shadow property (type of fabric.Shadow)
[BACK_INCOMPAT] `fabric.BaseBrush`shadow properties are combined into one property => `fabric.BaseBrush.shadow`(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY no longer exist)
Removed fabric.Text.getText method => is generated with `fabric.util.createAccessors`
`fabric.Shadow` can now initialized with string or object (e.g. '10px 10px 5px rgb(0,0,255)', 'rgb(0,0,255) 10px 10px 5px', {color: 'gb(0,0,255)', offsetX: 10, offsetY: 10, blur: 5})
`fabric.Shadow.getShadow`to get css3 declaration of shadow (String)
`fabric.Object.set('shadow', value)`is now the same as `fabric.Shadow.setShadow(value)`
Add unit tests
2013-09-03 19:11:21 +02:00
Kienz
f31a62a25c Add encoding to canvas.toSVG(options)
Add unit tests for canvas.toSVG
2013-08-27 20:32:15 +02:00
Kienz
b63a943137 Renamed property renderOnAddition to renderOnAddRemove
fabric.Canvas.renderAll can now be disabled on removing objects (renderOnAddRemove = false)
Add tests for renderOnAddRemove (add, insertAt and remove)
jsdoc additions
2013-08-07 21:01:45 +02:00
kangax
33fd6c66b5 Version 1.2.1 2013-07-06 16:04:29 +02:00
kangax
6597b8919b Make sure only existent custom properties included in output. Closes #713 2013-06-19 12:49:45 +02:00
kangax
044f5ed483 Fix rect positioning when loading from JSON. Closes #522 2013-06-03 02:24:41 +02:00
kangax
5a28acb032 Fix toJSON/toSVG serialization when there's active group on canvas. Closes #645 2013-06-03 01:55:51 +02:00
kangax
2407dbba49 Implement clipTo serialization, deserialization, and initialization. Closes #583. Closes #677. Closes #676 2013-06-02 23:04:54 +02:00
Kienz
d80fec5df1 Better strokeDashArray support + Fixes
- fabric.Text has now strokeDashArray support (only native support)
- fabric.Text.fill = null should now work
- Fix save/restore context in render methods => setLineDash affected drawBorder/drawControls
- Add strokeLineCap (default "butt"), strokeLineJoin (default "miter") and strokeMiterLimit (default 10)
- Add support for fabric.Object#fromElement for strokeDashArray (and other stroke properties)
- Add @default tag to properties (JSDoc 3)
- strokeDashArray now only works if stroke property is defined
- Add trokeLineCap (default "round"), strokeLineJoin (default "round") to fabric.BaseBrush
- Updated unit tests
2013-05-18 13:01:34 +02:00
Kienz
3a0a2c7fd2 Implement fabric.StaticCanvas#moveTo to move object to specified level in stack of drawn objects
You can also move fabric.Group objects in the grub objects stack to a specified level.

Add unit tests for moveTo.
2013-03-22 15:10:44 +01:00
kangax
9fb9b1ca34 Fix unit tests 2013-03-10 20:58:48 +01:00
kangax
506125bbe6 [BACK_INCOMPAT] fabric.Canvas.toDataURL now accepts options object instead linear arguments. fabric.Canvas.toDataURLWithMultiplier is deprecated; use toDataURL({ multiplier: … }) instead. 2013-03-06 18:47:50 +01:00
kangax
43dd170f5b Add fabric.Object#visible property. Closes #342. Version 1.0.13. 2013-03-06 18:45:18 +01:00
Arthaey
48ab4607b9 Add option to suppress XML preamble in toSVG method. 2013-02-05 22:20:56 -08:00
kangax
5ee9b13a92 Add support for shadows (via fabric.Shadow) 2013-02-04 20:49:05 +01:00
kangax
15eee3b861 Fix tests 2013-01-02 23:33:21 +01:00
kangax
7121830ca6 Merge dynamic origin branch into master. Version 1.0.0 2012-12-29 20:04:24 +01:00