Commit graph

237 commits

Author SHA1 Message Date
Kienz
2c29c0cfab Fix typo, add hsl/hsla (with whitespaces) unit tests and move stuff outside of functions 2013-05-25 19:42:31 +02:00
Kienz
1ba6d1345e Merge remote-tracking branch 'origins/master' into parseSVGOpacity 2013-05-25 11:32:59 +02:00
Kienz
66fc8f4d4b Parse SVG stroke-opacity and fill-opacity
- SVG attribute opacity is now used for object's opacity
- fill-opacity and stroke-opacity are added to stroke and fill color value
- Add hsl/hsla support (e.g. hsl(270, 80%, 10%), hsla(320, 10%, 66%, 0.5))
- Add support for rgb/rgba values with whitespaces around values (e.g. rgba( 255 , 100 , 50 , 0.1 )) and percentage values (e.g. rgb(100%, 67%, 15%, 0.8))
- Delete stroke and strokeWidth from fabric.Text (defined in fabric.Object)
- New unit test for parse stroke-opacity and fill-opacity
- Update unit tests (new tests for hsl/hsla and rgb/rgba (whitespaces and percentage values))
- Change equal and deepEqual parameter order (e.g. equal(actualValue, expectedValue, message))
- Doc additions
2013-05-25 11:03:09 +02:00
kangax
d23cbcbb3a Fix unit tests 2013-05-23 20:16:08 +02:00
Kienz
c03c556177 Fix wrong positioned bounding box of fabric.Polygon and fabric.Polyline objects
- Substract minX and minY from points.x/points.y (_calcDimensions)
- Same in fromElement - but only if minX or minY is negative
2013-05-23 20:02:44 +02:00
Kienz
f0ca6b7b8f Remove fabric.Group.containsPoint => uses now fabric.Object.containsPoint
Update group unit test - containsPoint checks now scaled group and group with padding
Fix text unit test (complexity, toString)
2013-05-20 18:41:16 +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
kangax
c65b1f5e7d Add support for parsing shorthand font declaration in styles, such as "font: italic 12px Arial,Helvetica,sans-serif" 2013-05-12 13:01:23 -04:00
Kienz
6e612facc6 Fix isContainedWithinRect and isContainedWithinObject, Add fabric.Object.containsPoint 2013-05-09 19:41:04 +02:00
kangax
a47128afa4 Add support for same options in fabric.Object#toDataURL as there are in fabric.Canvas#toDataURL. Closes #609 2013-05-06 11:52:16 -04:00
kangax
35d5cf220f [BACK_INCOMPAT] Make fabric.Object#toDataURL synchronous. Fix fabric.Object#cloneAsImage to preserve angle. Closes #596 2013-05-01 14:49:42 -04:00
kangax
eeecde62a8 Normalize style values. Closes #598 2013-05-01 02:58:59 -04:00
kangax
f6da728aad Add support for parsing "compressed" path data in SVG path's. Version 1.1.10 2013-04-29 11:12:20 -04:00
kangax
c16dcf88a4 Change inline docs to conform to jsdoc3 2013-04-24 12:58:04 -04:00
kangax
22de40dc54 Add support for pattern offsets (via fabric.Pattern#offsetX/offsetY). Version 1.1.8 2013-04-22 09:16:58 -04:00
kangax
e56d37d9da Fix text and line rendering in path group. Add support for multiple declarations in "transform" attribute. Fix stroke color of line. Version 1.1.7 2013-04-18 21:42:46 -04:00
kangax
fcc0c5cbbb Only call change and complete callbacks once, when animating multiple properties. Closes #544 2013-04-06 12:44:10 +02:00
kangax
5a3d59c3a7 Fix text unit test 2013-04-04 14:03:08 +02:00
kangax
d24d6307e5 [BACK_INCOMPAT] fabric.Object.setActive(…) -> fabric.Object.set('active', …). fabric.Object.isActive is gone (use active instead) 2013-03-29 16:26:27 +01:00
kangax
40bda07140 Fix fabric.Canvas#clipTo. Thanks @sn3p 2013-03-24 18:09:55 +01: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
919f95a0a0 Move collection-related methods to fabric.Collection, shared by fabric.Canvas and fabric.Group. 2013-03-20 10:28:35 +01:00
kangax
d89bbf0d8d Temporarily comment out unit tests that fail due to Node 0.10 bug (https://github.com/joyent/node/issues/5011) 2013-03-19 13:10:33 +01:00
kangax
e8e32e80de Fix gradient colorStops initialization. Thanks @Kienz 2013-03-18 13:11:31 +01:00
kangax
2622a380bf [BACK_INCOMPAT] fabric.Group#objects -> fabric.Group._objects (making it consistent with canvas._objects). Objects in group always have group reference to a group they're in. bringToFront, sendToBack, etc. now work in relation to group when called on objects within group. 2013-03-16 16:41:19 +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
kangax
9be89b2f2f drawCorners -> drawControls, for consistency. Remove unused hasCorners and use hasControls instead of hideCorners. Version 1.0.12 2013-02-20 13:19:22 +01:00
kangax
9df85553b9 [BACK_INCOMPAT] Add fabric.util.createAccessors. Add accessors for fabric.Text -specific properties (setTextDecoration, setFontWeight, setFontStyle, etc.). Make text object dimensions change when setting dimension-affecting properties. fabric.Text#setFontsize becomes setFontSize. Version 1.0.11. 2013-02-18 16:22:48 +01:00
kangax
7b8dfe5a30 More test fixes 2013-02-17 13:48:21 +01:00
kangax
3f3d336852 Fix text unit tests 2013-02-17 13:26:53 +01:00
kangax
160e7e5ded Alias fabric.Observable.fire to trigger, similar to jQuery, Backbone, etc. Closes #401 2013-02-11 13:22:30 +01:00
kangax
97fa81aa77 Fix polygon boundaries. Closes #416 2013-02-11 13:21:33 +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
107dcfcbd6 Add fabric.Pattern tests 2013-02-03 17:01:01 +01:00
kangax
6777c50012 Add support for patterns 2013-02-03 02:15:29 +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
kangax
2735d543e2 Merge master. Enable hasRotatingPoint by default (now that objects are not rotated via corners) 2012-12-26 11:18:17 +01:00
kangax
894988b508 Fix browser-based unit tests 2012-12-23 23:30:01 +01:00
kangax
c11abb377f Fix tests. Build distribution. Version 0.9.35. 2012-12-23 15:28:08 +01:00
kangax
4ae8b9d725 Simplify object straightening logic. Thanks @woutercommandeur. Closes #362. 2012-12-22 20:20:54 +01:00
kangax
882d7085d8 Fix fabric.Object#cloneAsImage on node. Closes #336. Version 0.9.34 2012-12-20 19:49:51 +01:00
kangax
f0d2235053 Fix group loading in dateless json. Closes #322 2012-12-20 16:23:31 +01:00
kangax
245de99834 Fix unit tests 2012-12-16 21:11:38 +01:00
kangax
35ba6c6bf5 Final fix for fabric.util.loadImage 2012-12-10 15:59:44 +01:00
kangax
5d1cfce96a Try to fix fabric.util.loadImage test once again. 2012-12-10 15:52:14 +01:00
kangax
26d735146f Fix fabric.util.loadImage test. 2012-12-10 15:44:30 +01:00