Commit graph

1021 commits

Author SHA1 Message Date
kangax
e620e634b2 Add backwards-incompat doc notes 2013-08-31 12:52:30 +02:00
Stefan Kienzle
89f3ab0668 Fix fabric.Circle.set for radius - update width/height if radius is set
Closes issue #811
2013-08-30 11:51:08 +02:00
kangax
507dff705b Fix tint filter. Thanks @mewdriller 2013-08-30 01:13:29 +02:00
Kienz
345ed3f5e9 Fix fabric.Text#fontFamily in SVG output - Closes issue #813
Add unit tests
2013-08-29 22:06:24 +02:00
kangax
434bfb2c6d Fix fabric.Canvas subclassing; fabric.Canvas, fabric.StaticCanvas now created via createClass. 2013-08-28 15:17:25 +02:00
Kienz
f31a62a25c Add encoding to canvas.toSVG(options)
Add unit tests for canvas.toSVG
2013-08-27 20:32:15 +02:00
kangax
78dc27a029 Call abort in context of an object. Closes #803 2013-08-23 14:30:33 +02:00
Jaak Sarv
2cd96f7933 Fixed bug where object selection borders where misaligned 2013-08-22 18:05:12 +03:00
Juriy Zaytsev
b708fbafa4 Merge pull request #799 from vegasje/feature/allow-touch-scrolling
Simple boolean option on canvas to allow scrolling on touchscreen devices
2013-08-21 15:19:22 -07:00
Jeremy Watkins
143203d99d Adding a default allowTouchScrolling value, along with a description of its purpose 2013-08-21 15:01:00 -07:00
Stefan Kienzle
55d5d99fdc Fix loadFromJSON for image objects without image filters 2013-08-21 10:08:35 +02:00
Jeremy Watkins
d728951ccf Simple boolean option on canvas to allow scrolling on touchscreen devices 2013-08-20 10:44:53 -07:00
kangax
d1bcd18de5 Fix resolveNamespace 2013-08-17 20:18:06 +02:00
Stefan Kienzle
bd60887ef2 Remove cursor reset in __onMouseUp (old fix for firefox). Closes issue #793 2013-08-15 16:06:26 +02:00
Juriy Zaytsev
751f39cc58 Merge pull request #792 from Kienz/maskFilter
Update `fabric.Image.filters.Mask` - based on https://github.com/kangax/fabric.js/pull/667 (@aleph1)
2013-08-14 13:00:49 -07:00
kangax
a2e4d30a82 Add fabric.Canvas#skipTargetFind 2013-08-14 21:51:00 +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
kangax
a5ab1baf24 Don't call setCoords when rendering text 2013-08-14 13:54:39 +02:00
kangax
4b1d1140eb Doc additions 2013-08-14 12:55:09 +02:00
kangax
3317010fdf Add support for fabric.Text#skipFillStrokeCheck 2013-08-14 12:55:08 +02:00
Stefan Kienzle
e151d297fc Add filter root class fabric.Image.filters.BaseFilter from which all filter classes inherit from 2013-08-13 14:06:33 +02:00
kangax
79cd44650c Update docs, build distribution 2013-08-12 11:52:13 +02:00
Kienz
a61b384684 Add toJSON back to image filters
Add toJSON to unit tests
2013-08-09 20:37:56 +02:00
Kienz
f2035da955 Add image filter tests
Doc fixes
2013-08-09 19:59:30 +02:00
Stefan Kienzle
6599d393ac Fix fabric.Image.setElement - now _element and _originalElement (until now _originalImage) are set. Closes #745
Add additional parameter callback (invoked after filters habe been applied).
Fix `fabric.Image.fromObject` - don't overwrite image width/height with object width/height.
`fabric.Image.applyFilters` only resets _originalElement - fixes issue if object's width/height are different to _originaElement's width/height
[BACK_INCOMPAT] Renamed `fabric.Image.filters` method `toJSON` -> `toObject`
Fix serializiation of fabric.Image filter objects
2013-08-09 14:18:27 +02:00
Kienz
92bdebfde7 Doc fixes, Update README (1800+ unit tests) 2013-08-08 18:31:26 +02:00
kangax
2c6f6c27b4 Doc fixes 2013-08-08 16:39:40 +02:00
Juriy Zaytsev
7ce8b35fd8 Merge pull request #784 from Kienz/colorFix
Add color "orange" to `fabric.Color.colorNameMap`
2013-08-07 15:17:05 -07:00
Kienz
31f1abac12 Add color "orange" to `fabric.Color.colorNameMap 2013-08-07 21:39:25 +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
ef0ebebf0b Add _drawChars abstraction in text class 2013-08-07 13:52:35 +02:00
kangax
5717df817b Fix error when parsing gradient-based fill attribute. Closes #749 2013-08-07 13:51:59 +02:00
kangax
bbe83dad0f Support reviver in Node's version of loadSVGFromURL and loadSVGFromString 2013-08-06 16:12:00 +02:00
kangax
9edba2c8f6 Add fabric.Image.pngCompression and use it in applyFilters under Node 2013-08-05 11:22:05 +02:00
Stefan Kienzle
473663aea1 Merge pull request #767 from MeLight/master
Single click in freedrawing mode now works for pencil brush, circle brush and pattern_brush - fixes #756
2013-08-02 10:25:19 -07:00
Yuri Shmorgun
25b12d3cd7 Renamed putPaint to drawDot
Fixed more styling issues
2013-07-30 21:33:45 +03:00
kangax
c827c92aad Add oCoords in docs 2013-07-30 16:41:18 +02:00
kangax
a64cc65eb6 Pass abort option in fabric.Object#animate 2013-07-29 23:58:15 +02:00
Yuri Shmorgun
b507c0c18d Fixed tabs 2013-07-29 00:31:12 +03:00
Juriy Zaytsev
f55e25f904 Merge pull request #772 from Kienz/patch-1
Set object shadow and context shadow only if shadowColor is set
2013-07-28 10:49:05 -07:00
kangax
e6bc08701c Update centering methods docs to mention the need for setCoords 2013-07-28 19:43:07 +02:00
Kienz
e6188e55f3 Set object shadow and context shadow only if shadowColor is set
Otherwise toSVG() returns for every brush object a shadow filter
2013-07-28 18:36:29 +02:00
kangax
f270ca0259 Move animation methods to an optional module 2013-07-28 15:25:31 +02:00
kangax
0c98f83fa4 Simplify node-based applyFilters 2013-07-27 20:47:45 +02:00
kangax
34b5eee748 Increase dimensions of svg filter region to avoid clipping 2013-07-27 19:52:44 +02:00
melight
f9438fd66d Gah. Fixed tabs and spaces. Again. 2013-07-27 01:24:47 +03:00
melight
26bf1b78f3 Fixed indentations issues too! 2013-07-27 01:17:08 +03:00
Yuri Shmorgun
de9b077469 Fixed JSHint issues from previous commit 2013-07-25 20:43:42 +03:00
kangax
7a46482328 Add shadow toSVG support. Version 1.2.7 2013-07-25 19:39:21 +02:00
kangax
22ac5d947f Fix patterns width/height 2013-07-25 16:45:15 +02:00
Yuri Shmorgun
d5de9042cd Issue #756 fixed - single click in free drawing mode now works for pencil brush, circle brush and pattern_brush (inherits pencil brush fix) 2013-07-24 23:30:48 +03:00
kangax
bc3adcffbc Clip free drawing 2013-07-24 22:16:28 +02:00
Kienz
0912d1eeeb Remove activeObject on creating activeGroup with shiftKey - closes issue #764
Add @default jsdoc tag etc.
2013-07-24 20:21:51 +02:00
kangax
67b54a44a5 Fix pattern toSVG 2013-07-22 22:00:03 +02:00
kangax
974ed943b8 Fix polyline, polygon tests and JSHint warnings 2013-07-22 14:39:07 +02:00
kangax
6b36e72521 Make SVG output Corel Draw -compatible. Closes #758 2013-07-22 14:22:36 +02:00
kangax
d3e2b03856 Start implementing pattern toSVG support 2013-07-22 14:22:36 +02:00
Kienz
c9d866dcf9 Fixed fabric.PathGroup.fromObject - use fabric.util.enlivenObjects to instatiate fabric.Path objects
Corrected jsdoc tags for fabric.PathGroup.fromObject, fabric.Path.fromObject and fabric.Path.fromElement
Fixed quint tests for fabric.Path and fabric.PathGroup
2013-07-18 22:21:19 +02:00
kangax
6f1b6bf243 Avoid canvas re-rendering for each object when loading from JSON 2013-07-17 16:36:29 +02:00
kangax
45017eeed2 Fire 'path:created' event for circle and spray brushes 2013-07-16 23:46:11 +02:00
kangax
8a0e9bd6b4 Fix fabric.Path.fromElement. Version 1.2.5 2013-07-13 20:15:35 +02:00
kangax
8f02189d50 Fix fabric.Path/fabric.PathGroup fromObject 2013-07-13 18:56:41 +02:00
Juriy Zaytsev
d741b647bc Merge pull request #740 from nathan-muir/kangax-master
Fix issue with `fabric.Line` in browsers that don't support 'setLineDash'
2013-07-13 02:09:00 -07:00
kangax
b8ad7fa79e Clip text background and decoration properly. Closes #743. 2013-07-13 02:35:04 +02:00
kangax
c8cab03aac [BACK_INCOMPAT] fabric.Path.fromObject is now async. fabric.Canvas#loadFromDatalessJSON is deprecated. 2013-07-12 22:38:21 +02:00
kangax
72ef6c67fa Parse lineHeight in style attribute. This fixes IE11's only failing test. 2013-07-11 20:39:45 +02:00
Nathan Muir
f97d593c84 Fixed issue with fabric.Line when browser doesn't support 'setLineDash' (firefox & IE 10). Example at http://jsfiddle.net/taRvU/1/ 2013-07-11 12:16:34 +10:00
kangax
4e5f5badc0 Avoid trailing comma in shadow.class.js when toSVG is stripped. Thanks @danielbeardsley 2013-07-08 12:39:19 +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
kangax
21f87bb63a Fix polygon/polyline tests and minor cleanup 2013-07-07 22:25:01 +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
33fd6c66b5 Version 1.2.1 2013-07-06 16:04:29 +02:00
Juriy Zaytsev
e4989e3fbe Merge pull request #709 from woutercommandeur/path
Fix path behaviour with top/left offsets. Closes #663
2013-07-06 05:56:43 -07:00
kangax
0b9a9fa9e2 Fix incorrectly created group. Closes #710 2013-07-05 23:10:45 +02:00
kangax
be72f68670 Make sure object angle is always positive 2013-07-04 14:18:30 +02:00
kangax
a33a599417 Remove commented out code 2013-07-04 14:18:30 +02:00
Juriy Zaytsev
aca2a62a22 Merge pull request #734 from sn3p/master
Make `sendBackward` / `bringForward` work with non-intersecting objects
2013-07-03 15:38:20 -07:00
Matthijs Kuiper
fe4c0cbb32 Make sendBackward/bringForward work with non-intersecting objects
sendBackward/bringForward functions now take an additional parameter
`intersecting` (boolean).
If `true`, send object behind/in front of next intersecting object.
If `false` (default), send object one level down/up without checking for
intersection.

See issue https://github.com/kangax/fabric.js/issues/707
2013-07-03 23:05:05 +02:00
Kienz
520b2258d3 Convert opacity value into float value. If stop-opacity is set as attribute (not as style attribute) el.getAttribute('stop-opacity') returns null. Problem exists since commit a0b7fa4eb9.
Add default value rgb(0,0,0) for stop-color and 1 for stop-opacity.
Add more gradient tests.
2013-07-02 21:09:50 +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
53aaedadb6 Fix docs 2013-06-20 14:24:00 +02:00
Daniel Beardsley
f10bef57af Resizing: allow centerTransform per-object
Instead of ONLY a global setting. Some objects (like circles) make far
more sense with centerTransform so it's nice to be able to do it
per-object.
2013-06-19 17:01:32 -07:00
Juriy Zaytsev
8805547e74 Merge pull request #716 from iFixit/load-image-buffer-support
Add support for Buffers in `fabric.utils.loadImage`
2013-06-19 04:19:33 -07:00
Cedric Wienold
5fc960aa56 Add support for Buffers to utils.loadImage
If the user has preloaded image data in a Buffer, allow that user to use
that data to load into a Fabric.js image.

This is possible because node-canvas supports setting 'src' to a Buffer.
2013-06-19 04:11:06 -07:00
kangax
6597b8919b Make sure only existent custom properties included in output. Closes #713 2013-06-19 12:49:45 +02:00
kangax
4d4a129ee6 Fix objects z-index when creating a group via shift click 2013-06-18 12:34:43 +02:00
Michal Knizek
f22c198a1e Zero opacity in gracient color stop kangax/fabric.js#711 2013-06-18 09:00:55 +02:00
Wouter Commandeur
b2b305e90b fix path behaviour with top/left offsets, fixes #663 2013-06-16 11:56:35 +02:00
kangax
be8e921e57 Fix nested matrix multiplication. Closes #705 2013-06-13 23:10:33 +02:00
Stefan Kienzle
7e9122945e Merge pull request #701 from woutercommandeur/flip
fix flickering when flipping using the corner scaling controls
2013-06-13 13:36:37 -07:00
Wouter Commandeur
6f4e78d6fc semicolons again 2013-06-13 17:50:40 +02:00
Wouter Commandeur
cb5bb66628 adjust scaling when dealing with padding 2013-06-13 17:41:07 +02:00
Wouter Commandeur
34e00e862c missing semicolon fixed 2013-06-13 17:00:31 +02:00
Wouter Commandeur
10e878fb62 mouse coordinates had to be adjusted for padding, now scaling works with padding as well 2013-06-13 16:52:21 +02:00
kangax
5bd8ba28d6 Fix loadFromJSON callback when objects array is empty. Closes #703 2013-06-13 13:39:17 +02:00
Wouter Commandeur
f4e4715905 remove commented out code 2013-06-12 21:23:15 +02:00
Wouter Commandeur
ecedb34d23 fix behaviour to be the same as the original 2013-06-12 21:21:34 +02:00
Wouter Commandeur
0ad759c428 fix flickering when flipping using the corner scaling controls 2013-06-12 19:24:30 +02:00
Riley Dutton
d79ff8f5e2 Fix bug for not firing selection:created when using Shift to add objects
Currently if you use Shift+Click to add objects to a group, selection:created will only fire after you add 3 or more objects to the group. This fix allows selection:created to fire when the group is first created (when the second object is added).
2013-06-12 10:19:00 -05:00
Juriy Zaytsev
6ad7e80f95 Merge pull request #696 from woutercommandeur/scaleflipfix
Fix flipping by using the corner controls
2013-06-12 06:31:00 -07:00
Wouter Commandeur
3809d19024 fix indentation 2013-06-11 11:03:05 +02:00
Wouter Commandeur
6dec0d24e0 fix flipping of objects using the corner controls 2013-06-11 10:07:35 +02:00
Wouter Commandeur
86bda44927 adjust point translation for strokeWidth. This fixes #687 (part 2) 2013-06-10 16:59:52 +02:00
kangax
5792521c7a Remove bottom/right from fabric.Path#_parseDimensions, as it's incorrect and not used anywhere. Build distribution. Closes #666 2013-06-10 15:44:23 +02:00
kangax
816261d863 objects -> getObjects() 2013-06-10 15:30:17 +02:00
kangax
d89dea62ac Only use quadraticCurveTo when rendering rectangle with rounded corners. Closes #691 2013-06-10 15:30:17 +02:00
Wouter Commandeur
b55bfd5326 fix scaling with large strokeWidth, this fixes #687 2013-06-09 21:28:08 +02:00
Wouter Commandeur
e503c36170 fix objects jumping around when scaling one side of a group and then rotating 2013-06-07 16:42:26 +02:00
kangax
51b7c09314 Move Cufon methods to text.cufon. Move drawControls to Canvas (from StaticCanvas). Move dataURL-exporting methods to dataurl_exporter mixin. 2013-06-06 12:31:32 +02:00
kangax
e1f93a3668 Move dimensionAffectingProps to fabric.Text.prototype. Simplify and speed up Intersection class. Build distribution. 2013-06-06 03:06:17 +02:00
kangax
55eeed181b Move drawArc to utils. Simplify and speed up fabric.Point 2013-06-06 02:49:42 +02:00
kangax
64317de0d0 Revert text box behavior back to previous (so that characters don't peak out of bounding box). Version 1.1.21 2013-06-05 14:53:35 +02:00
kangax
1b1e0ecc72 Fix node text rendering again 2013-06-05 13:51:26 +02:00
Wouter Commandeur
3c9f7ba5ab and fix bug. 2013-06-04 21:57:00 +02:00
Wouter Commandeur
54aad583cd no need for extra local var 2013-06-04 21:55:54 +02:00
Wouter Commandeur
823ea5ecc5 local var for strokeWidth 2013-06-04 21:52:30 +02:00
Wouter Commandeur
b8e3e6d83f proper fix for strokeWidth causing problems with controls on large scaling 2013-06-04 21:51:23 +02:00
Wouter Commandeur
af31d2abc9 fix object controls being incorrectly rendered at large scaling. Fixes #680. 2013-06-04 21:20:03 +02:00
Wouter Commandeur
e377e681c3 adjust mouse cursor depending on rotation. fixes #644 2013-06-03 19:10:33 +02:00
kangax
2f1383a713 Fix text rendering again. Version 1.1.19 2013-06-03 18:32:44 +02:00
Wouter Commandeur
2dadf7b06a fix transparentCorners beheaviour. When transparentCorners is specified we nolonger clearRect. See issue #405. 2013-06-03 10:51:20 +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
kangax
221146997c Fix pattern initialization from function string. Closes #442. Version 1.1.18 2013-06-02 22:07:16 +02:00
kangax
e65a7bfee8 Fix text rendering on Node when originY !== top 2013-06-02 21:17:26 +02:00
kangax
1c1b7e4b95 Fix function body matching regex. Add fabric.util.getFunctionBody 2013-06-01 18:08:36 +02:00
kangax
46183d8a85 Fix function body regex to match in IE. Closes #658 2013-06-01 17:48:46 +02:00
kangax
9b09a957f4 Better docs 2013-06-01 16:27:10 +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
Stefan Kienzle
2698597c74 Fix vertical gradients (x1 = x2 = 0)
I think `ctx.canvas.width` is not needed.
If gradient coords are e.g. `{x1: 0, y1: -50, x2: 0, y2: -50}` the vertical gradient doesn't work.
Fixes issue #660
2013-05-31 13:30:44 +02:00
kangax
2223b1b61f Remove more functions in distribution when SVG import (parser) is not included. Always include stateful mixin. Closes #662 2013-05-30 21:55:26 +02:00
kangax
b53209437f Move shape classes (circle, line, rect, path, etc.) to /shapes dir 2013-05-30 21:53:49 +02:00
Kienz
86211daa9a Fix indentation (2 whitespaces)
Add opaque to fabric.Image.filters.Convolute.toJSON
Update docs
2013-05-28 21:44:10 +02:00
Wouter Commandeur
d06b6e130e Split image filters into separate files 2013-05-26 15:42:29 +02:00
Kienz
7bb8cc63c6 Fix fabric.util.getElementOffset for Firefox 2013-05-26 01:19:54 +02:00
Juriy Zaytsev
13326cde52 Merge pull request #646 from Kienz/parseSVGOpacity
Parse SVG stroke-opacity and fill-opacity. Add hsl/hsla support.
2013-05-25 15:08:17 -07:00
kangax
0a44d30347 Fix fabric.Line to render properly when x2/y2 is smaller than x1/y1. Thanks @LimeyTX. Closes #648 2013-05-26 00:06:06 +02:00
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
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
Kienz
1ba6d1345e Merge remote-tracking branch 'origins/master' into parseSVGOpacity 2013-05-25 11:32:59 +02:00
Kienz
c96bc217c2 Add link to github page from that the hsl code is adapted 2013-05-25 11:23:30 +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
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
kangax
5e10c0011b Fix regression in adjustPosition. Version 1.1.16 2013-05-23 03:52:56 +02:00
kangax
8a52f99292 Fix line rendering when points make height become negative. Closes #589 2013-05-21 18:38:32 +02:00
kangax
f3f1db63b3 Fix fabric.Line rendering 2013-05-21 17:47:44 +02:00
kangax
257d629575 Remove space at the bottom of containing box on text objects (with high line height). Fix underline/strike-through to work with line height correctly. Closes #608 2013-05-21 13:16:26 +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
727c075235 Add method complexity() to fabric.Text (returns 1) 2013-05-20 10:17:39 +02:00
kangax
d2bcfc922d Build distribution 2013-05-19 16:26:23 +02:00
Juriy Zaytsev
21bfba0d42 Merge pull request #622 from nathan-muir/master
Fix issue with `getElementOffset` when using canvas in fullscreen mode
2013-05-19 04:10:43 -07:00
kangax
1ed4e40bdf Move brushes to /brushes and mixins to /mixins. Organize ATTRIBUTE_NAMES to use fabric.SHARED_ATTRIBUTES. 2013-05-18 16:43:49 +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
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
kangax
b2bcb3aff5 Fix adjustPosition and _getLeftTopCoords 2013-05-14 11:25:52 -04:00
kangax
0be6a5d556 Fix node text rendering. Version 1.1.14 2013-05-12 20:30:24 -04: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
Juriy Zaytsev
0229df4a78 Merge pull request #627 from aleph1/master
Optimize Grayscale Filter performance and footprint
2013-05-11 10:53:11 -07:00
Daniel Barber
17c83dcd67 Optimized Grayscale Filter performance and footprint.
Changed from "for" to "while" loop and reduced number of variables.

It is possible to get even better performance by assigning the average
amount in a single line, or by dropping the average variable and doing
a direct assignment (See:
http://jsperf.com/fabric-js-grayscale-benchmark/5), however I wasn't
sure if this is against the project's coding guidelines.
2013-05-11 12:29:29 -04:00
Kienz
efc4d8f486 Don't fire object:modified on group selection (with shiftKey)
Fixing tags for jsdoc
2013-05-11 11:27:31 +02:00
Nathan Muir
8e8597cb7b Updated fabric.util.getElementOffset(). Returns correct offset when using requestFullscreen(parentElement) 2013-05-10 14:14:38 +10:00
kangax
2b6b64dd02 Add support for removing SVG export functionality during build (via no-svg-export flag) 2013-05-09 14:21:10 -04:00
Kienz
6e612facc6 Fix isContainedWithinRect and isContainedWithinObject, Add fabric.Object.containsPoint 2013-05-09 19:41:04 +02:00
kangax
70cf7a6963 Tweak docs 2013-05-09 12:14:30 -04:00
Kienz
d2d1c50872 Check infinity in setCoords() if object has zero width 2013-05-09 12:14:00 +02:00
Juriy Zaytsev
9843d6642b Merge pull request #611 from xxorax/nodeOnloadFilter
Fix callback called 2 times on Node
2013-05-08 21:05:35 -07:00
kangax
5f8ca2cbc9 Make background white when generating data url jpeg image. Closes #613 2013-05-07 11:37:00 -04:00
xxorax
dcfeb9c8ff Fix callback called 2 times, recent versions of Node call onload on the
elements
2013-05-06 18:35:42 +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
Stefan Kienzle
662b322cd1 Call setCoords() only on target object
Only update target's cornerCoords.
2013-05-06 18:11:42 +03:00
kangax
d6e292e482 Fix text rendering. Closes #590. Version 1.1.12 2013-05-05 13:23:49 -04:00
kangax
fde521317e Store result of setLineDash support check. Build distribution. Version 1.1.11 2013-05-04 20:29:59 -04:00
Kienz
e4287accb6 Fix typo 2013-05-04 18:32:22 +02:00
Kienz
8645378288 Implement dashed stroke + some fixes with stroke, fill, removeShadow and clipTo + fixes in brushes
- fabric.Rect (now uses fabric.util.drawDashedLine), fabric.Line, fabric.Triangle, fabric.Polygon, fabric.Polyline, fabric.Image now supports dashed stroke
- fabric.Circle and fabric.Ellipse actual only supports native dashed stroke (browser must support context.setLineDash)
- fabric.Image.toSVG() has stroke/dashed-stroke support
- fabric.Object#clipTo has now affect on fabric.Image's stroke
- fabric.Shadow#affectStroke is considered - _removeShadow is now called in _renderFill (check whether stroke is to be affected) and _renderStroke
- reset shadow styles (contextTop) in fabric.PencilBrush, fabric.CircleBrush and fabric.Spraybrush (fabric.BaseBrush.removeShadowStyles)
2013-05-04 18:25:57 +02:00
tka
85f18e36f5 when use nodejs load remote image with fullpath
sometime use server generate image, and passing parameter in url
so when send request should use full path, not only pathname
2013-05-03 15:24:18 +08: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
f5b88b4045 Make fabric.Canvas#isTargetTransparent public. Closes #595 2013-05-01 09:58:39 -04:00
kangax
e8825bc581 Doc fixes 2013-05-01 09:35:26 -04:00
kangax
775df6e836 Move state-related methods to stateful mixin 2013-05-01 09:29:57 -04:00
kangax
17974a55be Reuse mt coordinate values in mtr coordinates. Closes #592 2013-05-01 03:06:04 -04:00
kangax
eeecde62a8 Normalize style values. Closes #598 2013-05-01 02:58:59 -04:00
Stefan Kienzle
6caf60670b Fixed _renderFill - fallback for offsetX/offsetY
If object.fill.offsetX or object.fill.offsetY is undefined (e.g. fill = fabric.Gradient) browser might have problems (seen in firefox 3.6.28).
2013-04-30 16:27:01 +03:00
kangax
a6a5cb4a54 Load image via fabric.util.loadImage in cloneAsImage. Add fabric.util.createImage helper. Closes #593 2013-04-29 15:16: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
d755d64c76 Remove unnecessary renderAll calls. Thanks @Kienz. Closes #587 2013-04-26 21:49:13 -04:00
Stefan Kienzle
acfddabe16 Fire 'object:selected' only once
The event 'object:selected' should only be called on first activation.
Fixes #584
2013-04-26 11:55:13 +03:00
kangax
4e1a26cc11 Update docs 2013-04-25 14:21:32 -04:00
kangax
56e6107752 Doc fixes 2013-04-25 13:52:05 -04:00
kangax
c16dcf88a4 Change inline docs to conform to jsdoc3 2013-04-24 12:58:04 -04:00
kangax
40d5a52492 More robust rendering of text on Node.js; left-aligned text is now aligned consistently. 2013-04-24 12:50:38 -04:00
kangax
66c3c80d18 Fix doc 2013-04-22 09:26:57 -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
dce3f6f6ca Optimize _initDimensions to not create off-screen canvas every time. Closes #564 2013-04-20 12:04:45 -04:00