Juriy Zaytsev
61853dd275
Merge pull request #1495 from Kienz/issue1494
...
Fix initialization of viewportTransform array
2014-07-17 18:54:27 +02:00
Juriy Zaytsev
2c6cafe34f
Merge pull request #1496 from Kienz/jsdocFixes
...
JSDoc + JSCS tweaks - Part 1
2014-07-17 18:52:54 +02:00
asturur
795d8a7aa5
Update misc.js
...
some more polishing, for me and for toFixed.
2014-07-17 16:38:09 +02:00
asturur
5ca64ad636
Update parser.js
2014-07-17 16:25:59 +02:00
asturur
dfbd1887bf
Update misc.js
...
some more polishing
2014-07-17 16:24:46 +02:00
Stefan Kienzle
b34387d10e
JSDoc + JSCS tweaks - Part 1
2014-07-17 16:18:57 +02:00
Stefan Kienzle
43b029e8a4
Just do slice() for cloning
2014-07-17 14:35:28 +02:00
Stefan Kienzle
306a040fef
Fix initialization of viewportTransform array
...
Add unit tests
JSDoc tweaks
2014-07-17 13:28:55 +02:00
asturur
0bb156f308
Update misc.js
...
it had some problem with len of string 0 and slicing from 0 to -0 , or calculating len of ''.
now is ok, rects went crazy and i didn't notice.
2014-07-17 07:44:03 +02:00
asturur
d34f970ffb
Update misc.js
2014-07-17 00:42:31 +02:00
asturur
81092715c1
Update misc.js
...
added missing space.
2014-07-17 00:38:55 +02:00
asturur
d78996194b
Update misc.js
2014-07-17 00:37:27 +02:00
asturur
bd4c7a0c4d
Update parser.js
2014-07-16 18:56:10 +02:00
asturur
0d4320c018
Update parser.js
...
Use parseUnit to normalize pt,pc,mm,in,cm to px.
2014-07-16 15:34:54 +02:00
asturur
bf4fa0091f
Update misc.js
...
add parseUnit function to normalize mm,cm,in,pt,pc to pixels.
res is setted to 96dpi is not real screen resolution dependant.
2014-07-16 15:29:41 +02:00
kangax
69fdc220e1
Add JSDoc validation in JSCS. Few style/doc fixes.
2014-07-16 11:45:50 +02:00
Mike Shaver
825bec65df
More doc-comment fixes.
2014-07-15 15:59:53 -07:00
Juriy Zaytsev
49a783bb2a
Merge pull request #1484 from shaver/doc-comment-fixes
...
Fix some doc comment errors that were preventing build.
2014-07-16 00:47:47 +02:00
Mike Shaver
095ee86e37
Fix some doc comment errors that were preventing build.
2014-07-15 15:34:06 -07:00
Juriy Zaytsev
26a964f241
Merge pull request #1476 from twffy/upstream
...
Fix positioning of controls for lines
2014-07-15 19:17:05 +02:00
Paul Kaplan
bbd1dd2d99
Simplify point parsing logic
...
The SVG spec basically allows delimiting numbers and pairs of numbers
with either whitespace or commas, so convert all commas to whitespace,
split on whitespace and remove the `asPairs` logic
2014-07-14 09:59:03 -05:00
Paul Kaplan
112dce71a3
Allow whitespace around commas in point parsing
...
Per the SVG spec:
http://www.w3.org/TR/SVG/shapes.html#PointsBNF
2014-07-12 18:08:03 -05:00
Tom French
9bbb4911c9
Brace style and JSHint
2014-07-11 18:29:17 +01:00
Tom French
91c642b0fa
Fix controls for lines while scaling
2014-07-11 13:24:26 +01:00
Tom French
154b1cf5a3
Fix controls for scaled lines
2014-07-11 13:12:38 +01:00
Tom French
1434daac47
Fix controls for lines without caps
2014-07-11 13:12:13 +01:00
asturur
a453ba83d7
Update ellipse.class.js
...
Fixes border without killing opacity. Opacity need to be moved in render function maybe, not in _render.
2014-07-10 12:09:47 +02:00
Tom French
c40cada006
Merge remote-tracking branch 'upstream/master'
2014-07-09 20:12:38 +01:00
Tom French
23ab51b733
Fixes for stroked objects
2014-07-09 19:51:28 +01:00
Juriy Zaytsev
1663b5644c
Merge pull request #1466 from simvan/IE8-IsVML-issue
...
isVML causing an issue in IE8 when filling in the corners of rectangles
2014-07-09 12:26:38 +02:00
Stefan Kienzle
9ad2279e8a
Revert JSCS tweaks for single-line return statements.
2014-07-08 13:32:58 +02:00
Simon van Lankveld
6df9412bf7
Changing isVML to a function so that the G_vmlCanvasManager can be evaluated when needed instead a single time at the beginning.
2014-07-08 21:49:20 +12:00
Stefan Kienzle
de99a508c2
Make setCursor public.
...
JSCS tweaks.
2014-07-07 16:18:31 +02:00
Tom French
8cf9642fe4
Transform point given to zoomToPoint
2014-07-05 20:18:23 +01:00
Tom French
6b8ce5c1ce
JSHint
2014-07-05 18:06:21 +01:00
Tom French
300de3be0d
Correct rendering of active group
2014-07-04 20:07:04 +01:00
Tom French
d5f8d88bfc
Fix ToSVG scaling
2014-07-04 17:47:25 +01:00
Tom French
ec0dcbfeb0
JSHint
2014-07-04 17:33:37 +01:00
Tom French
f6161f8713
ToSVG respects viewport transformation
2014-07-04 11:29:48 +01:00
Tom French
6fbd5df49c
Fix FromObject
2014-07-04 11:29:48 +01:00
Tom French
42ce906e0d
Fix group coordinates
2014-07-04 11:29:30 +01:00
Tom French
a4129c31e8
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
dist/fabric.min.js
dist/fabric.min.js.gz
dist/fabric.require.js
src/canvas.class.js
2014-07-03 16:02:43 +01:00
Chris Buergi
9a867f893f
Fire 'selection:changed' on IText object.
...
Previously the 'text:selection:changed' was only fired on the canvas, but not on the object.
2014-07-03 10:02:47 +02:00
Stefan Kienzle
6e97a70469
Reset backgroundColor with null value
2014-07-01 18:29:06 +02:00
Chris Buergi
dda68b44dd
Render IText correctly when only fontWeight or fontStyle changes
...
Fixes rendering of characters that only have the styles "fontWeight" and/or "fontStyle" set. Previously _hasStyleChanged() did not detect a change if only one of those two styles have been set.
2014-06-30 16:19:35 +02:00
Juriy Zaytsev
0f2e306a64
Merge pull request #1425 from asturur/use-tag-use
...
Support use tag
2014-06-25 12:25:06 +02:00
asturur
b21820cc6b
Update parser.js
...
Changed getElementsByTagName with queryselectorall, allow to go just on "use" node , but all of them ( getElementsByTagName doesn't , it select just first level of child.
Removed tagname check now useless.
2014-06-25 08:02:42 +02:00
Stefan Kienzle
50e3fd717c
Merge pull request #1427 from asturur/shadow-return-null
...
Update shadow.class.js - `objects.setShadow(null)` removes the sahdow
Closes #1422
2014-06-24 15:48:16 +02:00
asturur
12c2fb82c3
Update shadow.class.js
...
At the end was a bad idea. If we call new fabric.Shadow() we should get a shadow whatever we pass as an argument.
2014-06-24 15:39:31 +02:00
asturur
22b0149e49
Update object.class.js
...
as suggested by Kienz.
2014-06-24 15:38:14 +02:00
asturur
4ccc2c83ba
Update parser.js
...
Moved in a separate function.
Tried to fix sneaky tabs and spaces.
2014-06-24 15:17:59 +02:00
kangax
492253e5ca
JSCS tweaks. Down to 114 failures.
2014-06-24 14:12:17 +02:00
asturur
79d035d27e
Update shadow.class.js
...
Shadow return null if null is passed.
Makes .setShadow(null) works.
2014-06-24 13:16:42 +02:00
asturur
52c9792e15
Use of tag use
...
Deep cloning nodes that should be used before normal document parsing.
2014-06-24 13:12:27 +02:00
asturur
049259cc09
style parsing fix
...
code style should be ok this time
2014-06-22 20:51:04 +02:00
kangax
715fda8e94
Revert "Update path.class.js"
...
This reverts commit 77dd88569d .
2014-06-21 19:23:44 +02:00
kangax
62eb4e39f5
Revert "Build dist"
...
This reverts commit ac006b837f .
2014-06-21 19:15:10 +02:00
kangax
ac006b837f
Build dist
2014-06-21 19:10:20 +02:00
Juriy Zaytsev
48247712c7
Merge pull request #1415 from asturur/master
...
Update path.class.js
2014-06-21 19:07:57 +02:00
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
asturur
77dd88569d
Update path.class.js
...
Modified path positioning, fixes svg 170, debian logo, change some errors in different errors.
2014-06-21 17:03:54 +02:00
Juriy Zaytsev
713f3ad7b1
Merge pull request #1407 from asturur/master
...
Ellipse positioning fix
2014-06-21 16:30:37 +02:00
asturur
35eebc0376
Update parser.js
2014-06-21 14:22:10 +02:00
asturur
54f5cf11e5
Update parser.js
...
Get rid of error stopping the parser for elements that doesn't have a parent with visible defined.
2014-06-21 14:19:31 +02:00
asturur
8294fd42ab
Update circle.class.js
...
Same kind of modification from ellipse.
2014-06-21 10:37:31 +02:00
asturur
beb3fc205f
Update ellipse.class.js
...
just extra space.
2014-06-21 10:31:04 +02:00
asturur
4729d104c8
Update ellipse.class.js
...
As crazy as it looks like. Translate the ellipse just if it doesn't have a transformMatrix.
I have the feeling that the problem is somewhere else, but i cannot fix it different way.
2014-06-21 10:29:22 +02:00
asturur
1257754d5b
Update circle.class.js
...
Forgot those changes.
2014-06-20 09:17:34 +02:00
asturur
402c2a6f3a
Update ellipse.class.js
...
Fixed some error i could not find but stopped the js to work.
2014-06-20 09:07:35 +02:00
asturur
efa6579450
Update path.class.js
2014-06-19 23:47:21 +02:00
asturur
fd658ce29b
remove path positioning fixes
...
in different branch.
2014-06-19 23:46:06 +02:00
asturur
9c444b4ecb
Path positioning
...
This path positioning change renders correctly the svg 170 ( the many red triangles ) and change the visualization of issue #1363 . Need extensive testing. Consider that viewbox has to be implemented better, so don't take too much negatively the errors on svgs that have viewbox with negative numbers.
if this is not a solution i hope at least it can inspire someone
2014-06-19 23:33:12 +02:00
asturur
2dc5e298a3
Update ellipse.class.js
2014-06-19 21:38:26 +02:00
asturur
66d6b633ba
Update ellipse.class.js
2014-06-19 21:37:33 +02:00
asturur
3f47559589
Start to fix the position of ellipses
...
Till this library won't use ctx.ellipse() this weird transformation will be a huge mess.
This little fix imroves position of not transformed ellipses.
You can see the fixes on the example i will post below.
It needs improvement to work with other transformMatrix.
2014-06-19 21:05:39 +02:00
asturur
190973f6c9
Update ellipse.class.js
...
Always transparency rendering related.
2014-06-19 17:14:36 +02:00
asturur
8482c1c29b
Update polygon.class.js
...
Apply opacity property to poligon class.
2014-06-19 10:42:55 +02:00
asturur
572038b0e5
Update path.class.js
...
apply opacity property on paths.
2014-06-19 10:42:05 +02:00
Tom French
5f8e0ee6ee
Fixes for group coordinates (coordinates now also generated before group is added to canvas)
2014-06-13 11:23:13 +01:00
Tom French
02b0b20343
Zoom overlay and background images
2014-06-12 13:10:42 +01:00
Tom French
b13e5763b6
Calculate group coordinates when initializing
2014-06-12 12:37:20 +01:00
Tom French
cd4d8b2c17
Fix group.hasMoved
2014-06-12 10:13:08 +01:00
Tom French
6924df7154
Replaced viewport-moving functions.
2014-06-06 20:46:34 +01:00
Jim Rodovich
1201cfb1e1
Make closepath commands update current x/y coordinates.
...
Per the SVG spec,
> If a "closepath" is followed immediately by any other command, then
> the next subpath starts at the same initial point as the current
> subpath.
2014-06-06 13:50:54 -05:00
Tom French
8c826a3204
Fixes for controlsAboveOverlay
2014-06-06 17:36:17 +01:00
Jim Rodovich
ff04efdc76
Don't ever draw lines to explicit M/m commands.
...
#1365 converted multiple M/m coordinates to L/l commands when importing paths. The `_render` function was already attempting to connect those coordinates, but that's no longer necessary as the only consecutive M/m commands in `_render` were explicitly defined as M/m commands.
2014-06-06 10:31:54 -05:00
Kienz
c258b08f48
Add IE support for copy / paste events
...
Fix for `cut` event if nothing is selected
2014-06-05 00:56:34 +02:00
Stefan Kienzle
41933ccf20
Merge pull request #1348 from Kureev/copy/paste
...
Copy/Paste from/to external resources
2014-06-05 00:45:17 +02:00
Tom French
ef01083cab
Stray console.log removed.
2014-06-03 08:36:00 +01:00
Kureev Alexey
09836dc2c7
Copy/paste old browsers support check
2014-06-01 21:51:41 +02:00
Tom French
009c5389bf
JSHint, restoring .gitignore
2014-05-31 18:08:33 +01:00
Tom French
b4746e6bf2
Merge remote-tracking branch 'upstream/master'
2014-05-31 17:33:28 +01:00
Tom French
0d8db88e71
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
.gitignore
dist/fabric.js
dist/fabric.require.js
src/brushes/circle_brush.class.js
src/canvas.class.js
src/mixins/canvas_events.mixin.js
src/mixins/object_geometry.mixin.js
src/mixins/object_interactivity.mixin.js
src/shapes/group.class.js
src/shapes/image.class.js
src/shapes/object.class.js
src/shapes/path_group.class.js
src/shapes/text.class.js
2014-05-31 17:29:55 +01:00
Jim Rodovich
6f8444c86a
Convert extra "moveto" coordinates to "lineto" commands.
...
Per the [SVG spec](http://www.w3.org/TR/SVG11/paths.html#PathDataMovetoCommands ):
> If a moveto is followed by multiple pairs of coordinates, the
> subsequent pairs are treated as implicit lineto commands. Hence,
> implicit lineto commands will be relative if the moveto is relative,
> and absolute if the moveto is absolute."
2014-05-30 10:08:03 -05:00
Jim Rodovich
7e8dc3a91f
Fix slow clicks (> 100 ms) focusing previously-deselected IText.
2014-05-27 15:44:58 -05:00
Kureev Alexey
741e8cf43d
Copy/Paste from/to external resources
2014-05-25 18:15:54 +04:00
Stefan Kienzle
a2512b2cd0
Fix IText canvas handler initialization
2014-05-22 10:48:02 +02:00
Jim Rodovich
74b0329abd
Fix error when parsing empty SVG document.
...
And don't forget to call the callback.
2014-05-15 16:31:01 -05:00
Matt Harrison
bfb33fb1f7
Removed 'return this', not needed for private method
2014-05-15 15:18:37 +01:00
Matt Harrison
b7f03b8a6c
Added smoothing option on fabric.StaticCanvas to support setting imageSmoothingEnabled
2014-05-14 09:05:15 +01:00
Stefan Kienzle
cbf59d577c
JSON object without "objects" property throws "TypeError: Cannot read property 'length' of null" - Should now be fixed.
...
Add unit test.
Closes issue #1235
2014-05-13 13:32:55 +02:00
Juriy Zaytsev
91c32d89a7
Merge pull request #1323 from Kienz/issue-1257
...
Initialize "Noise" and "Brightness" filter with 0 instead of 100
2014-05-12 20:50:49 +02:00
Kienz
5ea264ae3d
fabric.Object.setAngle consider different originX/originY values other than "center"
...
Closes issue #1093
2014-05-12 20:36:59 +02:00
Stefan Kienzle
e0ee99caa4
Initialize "Noise" and "Brightness" filter with 0 instead of 100.
...
Closes issue #1257
2014-05-12 16:44:12 +02:00
yuri
99a3a77267
Added Multiply filter
2014-05-12 00:39:02 +03:00
kangax
f5691b4b4f
Set default originX as center. Closes #974
2014-05-09 23:29:11 +02:00
kangax
87b0f2da35
Add support for transparent value in fabric.Color
2014-05-09 22:55:33 +02:00
Juriy Zaytsev
916b35b93d
Merge pull request #1314 from rodovich/round-rect-arcs
...
Use a cubic bezier approximation for rounded rectangle corners.
2014-05-09 00:32:41 +02:00
Juriy Zaytsev
a20e329213
Merge pull request #1317 from rodovich/leading-decimal
...
Be able to parse numbers with no digits before the decimal point.
2014-05-09 00:31:46 +02:00
Jim Rodovich
6a478e6791
Use a cubic bezier approximation for rounded rectangle corners.
...
According to the SVG spec these corners are supposed to be elliptical arcs. HTML canvas does not have methods for elliptical arcs, but a cubic approximation can get within 0.02%.
Using the "magic number" from http://itc.ktu.lt/itc354/Riskus354.pdf .
2014-05-08 14:20:13 -05:00
Jim Rodovich
5b54f83548
Be able to parse viewbox numbers with no digits before the decimal.
2014-05-08 11:28:11 -05:00
Jim Rodovich
ed0b91109d
Be able to parse numbers with no digits before the decimal point.
...
Per the [SVG spec](http://www.w3.org/TR/SVG11/types.html#DataTypeNumber ), non-integer number values do not necessarily have any digits before the decimal point.
2014-05-08 11:20:56 -05:00
Jim Rodovich
95fd97fa63
Perform imported SVG rotations in degrees, per the SVG spec.
...
http://www.w3.org/TR/SVG11/coords.html#TransformAttribute
2014-05-08 10:56:32 -05:00
Jim Rodovich
76314abd95
Optimize for common case of radius 0.
2014-05-07 19:02:18 -05:00
Jim Rodovich
7b4455f29a
Constrain rounded rect radii to half the width & height.
2014-05-07 10:25:34 -05:00
Grzegorz Godlewski
ce786cc3ad
Transform matrix and isInPathGroup fix for images
2014-04-28 21:37:52 +02:00
kangax
9113b27e77
Revert _searchPossibleTargets optimization. Closes #1188
2014-04-24 10:33:33 -04:00
Juriy Zaytsev
c7b4b52981
Merge pull request #1282 from wilsonwc/master
...
Fix for #1237
2014-04-22 14:28:02 -04:00
kangax
314e06db6d
Fix fontWeight parsing
2014-04-18 16:07:59 -04:00
kangax
b3600e62a4
Add support for text-anchor's
2014-04-18 16:07:49 -04:00
Ross Wilson
14338a9559
Fix for #1237
...
Only set crossorigin on the element if something is specified
2014-04-16 13:03:02 -06:00
kangax
c8164959c8
Add support for SVG "visibility: hidden"
2014-04-16 14:05:34 -04:00
kangax
5e385e5ed0
Fix text offsets and size in SVG
2014-04-16 13:39:32 -04:00
kangax
f3b7884827
Add support for "evenodd" fill rule. Closes #1021
2014-04-15 20:09:01 -04:00
kangax
d6a73aa7f5
Make isSameColor cave-insensitive. Closes #1272
2014-04-14 12:17:06 -04:00
kangax
a48ed5b31b
Add support for display=none. Closes #1256
2014-04-10 17:47:36 -04:00
kangax
cfd71e9550
Fix viewBox parsing
2014-04-10 13:57:24 -04:00
kangax
3e06f4127d
Fix typo. Closes #1265
2014-04-09 18:02:20 -04:00
Juriy Zaytsev
63ea7b0c34
Merge pull request #1260 from Webbgaraget/toJSON-currentTransform-bugfix
...
Moves the resetting of _currentTransform.target inside `if (activeGroup)`-block
2014-04-08 17:03:50 -04:00
Anders Lisspers
46100b24bd
Moves the resetting of _currentTransform.target inside if (activeGroup)
...
This solves a problem that occurred if you were transforming (moving, scaling, rotating) a single object
when toJSON()/toObject() was run.
2014-04-03 16:20:05 +02:00
Ken Thompson
fa8bd1f40b
added "_this" reference for setTimeout
2014-03-27 20:49:43 -05:00
kangax
3f14a96c5a
Fix multiplier<1 export
2014-03-13 20:27:42 -04:00
Dennis Eijpe
b8dec2ddf0
Fix event listeners for multi-input devices
2014-03-09 17:14:06 +01:00
Max Kaplan
54f9c0428f
add spaces before {
2014-03-07 17:32:09 -05:00
Max Kaplan
fd38b8f4a4
formatting for fixes
2014-03-07 01:15:56 -05: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
Max Kaplan
f2943ef2bb
Fix loadFromJSON 404s breaking fabric (Pattern)
...
Prevent image 404s in patterns 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
2014-03-07 00:19:35 -05:00
kangax
eb919f9a04
Fix ellipse borders. Closes #1099 Thanks @xnramx
2014-03-06 19:47:55 -05:00
kangax
2acdc7e85b
Fix few bracketless statements. Down to 257 failures on JSCS.
2014-02-27 15:00:42 -05:00
kangax
eb75f4b491
Restore _currentTransform.target after toJSON. Closes #1159
2014-02-27 15:00:42 -05:00
Juriy Zaytsev
e15047016d
Merge pull request #1203 from Webbgaraget/allow-decimals-in-rgba-colors
...
Allow decimals in rgba colors.
2014-02-27 12:41:13 -05:00
Anders Lisspers
11a21f10ee
Allows rgba() colors to have decimals, i.e. rgba(45.2342%, 88.2342%, 83.5%)
2014-02-27 09:17:59 +01:00
Jeff Talbot
918d4dd5de
Initialize variable with the correct name that is actually used
2014-02-24 10:47:22 -06:00
XhmikosR
67e9c8829c
Remove extra commas.
2014-02-23 20:25:23 +02: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
8e75acf836
Expose cursorMap. Closes #1179
2014-02-19 15:26:07 -05:00
kangax
c85a33752b
Fix iText stealing focus
2014-02-19 15:25:50 -05:00
kangax
0dbf03835d
Fix typo, build dist
2014-02-19 14:59:50 -05:00
Juriy Zaytsev
8f2d29f5d6
Merge pull request #1172 from kreig/patch-1
...
fabric.Object.fillRule support using globalCompositeOperation
2014-02-19 14:44:05 -05:00
kangax
0eed619d98
Make isContainedWithinObject check for equality as well. Closes #1177
2014-02-18 17:07:37 -05:00
kangax
6798111f03
Build distribution
2014-02-18 15:14:06 -05:00
kangax
32368ecbad
Fix require typo
2014-02-18 14:53:59 -05:00
Juriy Zaytsev
7ded46ce7f
Merge pull request #1168 from aspectit/css-scale-new
...
Fix mouse handling if the canvas has been scaled via CSS.
2014-02-18 11:58:29 -05:00
Michael Sievers
3faf5f0bae
Added missing semicolon
2014-02-18 13:44:02 +01:00
Michael Sievers
bd2a235b12
Move ElementsParser instance methods to prototype
2014-02-18 13:44:01 +01:00
Michael Sievers
d44bde4605
Added semicolon to satisfy jshint
2014-02-18 13:43:20 +01:00
Michael Sievers
179ad93dc5
Make ElementsParser a constructor function and create instances in fabric.parseElements
2014-02-18 13:43:19 +01:00
Michael Elsdörfer
50107b06d7
Handle missing canvas bounds information correctly.
...
Fixes test failure.
2014-02-18 00:17:31 +01:00
Michael Elsdörfer
dc6e53288c
Also consider CSS transforms when handling mouse.
2014-02-18 00:17:31 +01:00
Michael Elsdörfer
d5f948877c
Make mouse handling respect CSS scaling.
...
Also DRYs getPointer() calls in many places.
See #868 .
2014-02-18 00:17:31 +01: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
kreig
e89c9c84bd
fabric.Object.fillRule support using globalCompositeOperation
...
Full support for the fabric.Object.fillRule option for any visual objects.
_setupFillRule(ctx) is used to set CanvasRenderingContext2D.globalCompositeOperation (from fillRule property).
_restorFillRule(ctx) restores previously saved globalCompositeOperation.
Both methods are called form the render() method, so individual blending settings for each object can be specified.
2014-02-16 19:00:53 +02: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
0460e4e248
Fix recent group addition
2014-02-11 12:47:09 -05:00
kangax
93ac070918
Make _calcBounds more flexible
2014-02-10 23:24:29 -05:00
kangax
be96d93f6e
Fix group origin after toJSON
2014-02-10 21:37:47 -05:00
RG72
107dd5735f
Options for node-canvas
...
Allowing to write pdf via node-canvas
```var canvas = fabric.createCanvasForNode(200, 200,'pdf');
..
fs.writeFile('out.pdf', canvas.nodeCanvas.toBuffer());```
2014-02-09 12:42:15 +05:00
Maciej Filip Szkodziński
7d72d0500f
Removed Line._getCenterToCenter helpers
...
Pre-rendering context translation for lines in path-groups uses the
pre-existing getCenterPoint.
Removed tests for removed code.
2014-02-05 17:33:20 +01:00
Maciej Filip Szkodziński
df764728e0
Fix group mocks in Line tests
...
Added missing semicolons in tests.
Refactored Line centerToCenterGetter to improve readability.
2014-02-05 17:07:45 +01:00
Maciej Filip Szkodziński
6b1e144c44
Line coordinates are correct
...
fabric.Line._setWidthHeight was assigning left and top as if both
origins were 'center'.
It now uses private helper methods to calculate the distances from
left and top edges of canvas to the line origins.
The data for existing Line.toObject test is updated with origin-relative
coordinates.
Rendering of line inside a path-group was assuming a 'center' origin
for both coordinates.
Context translation done before rendering for lines inside path-groups
now uses private helper methods to calculate distances from the center
of path-group to center of line.
2014-02-05 15:42:52 +01:00
Juriy Zaytsev
0584d94a5c
Merge pull request #1138 from GordoRank/Only-add-hidden-textarea-when-in-editing-mode
...
Fix object onClick (previously failed change)
2014-02-04 08:16:59 -08:00
GordoRank
d665ddfe81
Fix object onClick (previously failed change)
...
I'm unsure how but a previous change in this pull request never merged correctly (probably still due to my inexperience with github) Regardless, this tiny patch fixes the bug
2014-02-04 09:44:49 +00:00
Juriy Zaytsev
172a3d3da2
Merge pull request #1135 from bernardofd/prJan2014
...
[Fix] loadSVGFromString receives raw buffer instead of string when loading SVG file from disk
2014-02-01 11:38:12 -08:00
kangax
512b0186c8
Tweak iText after PR
2014-02-01 14:24:25 -05:00
Juriy Zaytsev
4a967b7ddf
Merge pull request #1114 from GordoRank/Improve-IText-performance
...
Improve overall IText performance with varying styles > 1000%
2014-02-01 11:22:20 -08:00
kangax
68d4a74def
Tweak few things in iText; build distribution
2014-02-01 13:18:22 -05:00
Juriy Zaytsev
93bd41f356
Merge pull request #1113 from GordoRank/Reduce-calls-to-fillText/strokeText-for-IText
...
Reduce calls to fillText/fillStroke in IText
2014-02-01 10:15:39 -08:00
Bernardo Figuerêdo Domingues
522a4cc1d7
Fix request_fs returns raw buffer instead of string.
...
Since fs.readFile returns the raw buffer if no encoding is specified, the call to loadSVGFromString would fail. This PR fixes that, transforming the buffer into string (assuming 'utf-8') encoding. For other encodings, it may garble special characters.
2014-01-30 15:34:09 -02:00
Juriy Zaytsev
213b99eb9f
Merge pull request #1127 from GordoRank/Optimize-searchPossibleTargets-for-IText
...
Optimize searchPossibleTargets for I-text
2014-01-27 12:54:02 -08:00
GordoRank
a962b59aa7
Iterate backwards
2014-01-27 13:05:32 +00:00
GordoRank
02d55954e9
Move check into separate function
2014-01-27 12:29:30 +00:00
kangax
f928e68386
Few small tweaks
2014-01-26 22:19:12 -05:00
mizzack
bed0cab833
Adding nullcheck to touches attr on event.
...
This was throwing errors in IE11 on desktop. Not that it needs gesture support...
2014-01-26 15:36:31 -05:00
GordoRank
88157a8107
Optimize searchPossibleTargets
2014-01-24 09:44:08 +00:00
kangax
e977372236
Remove node 0.6 from travis until jsdom fixes it
2014-01-23 11:25:04 -05:00
kangax
3dd2f1572d
Move for in body into a separate method (to allow inlining)
2014-01-23 10:49:23 -05:00
kangax
dbbfb992cb
Add all properties onto prototype (not to invalidate hidden classes)
2014-01-23 10:49:23 -05:00
GordoRank
531faae418
revert master
2014-01-23 10:15:30 +00:00
GordoRank
4183bddd26
revert
2014-01-23 10:14:58 +00:00
GordoRank
235f7add81
update cache in setElement()
2014-01-23 10:08:49 +00:00
GordoRank
c8da9fbfc3
update cache automatically in _set()
2014-01-23 10:07:33 +00:00
Juriy Zaytsev
b600c39119
Merge pull request #1112 from GordoRank/Add-textselected-event
...
Add "text:selection:changed" event
2014-01-22 21:48:36 -08:00
GordoRank
b75fa8c32d
switch to 'text:selection:changed'
2014-01-23 01:32:08 +00:00
GordoRank
f6108963b2
switch to 'text:selection:changed'
2014-01-23 01:31:20 +00:00
Juriy Zaytsev
9f0f5e6bd2
Merge pull request #1111 from GordoRank/Only-add-hidden-textarea-when-in-editing-mode
...
Prevent multiple hidden Textareas
2014-01-22 16:44:36 -08:00
Juriy Zaytsev
c9a27eb6a0
Merge pull request #1110 from GordoRank/Fix-multiple-renderAll-when-exiting-editing-mode
...
Fix multiple renderAll when exiting editing mode
2014-01-22 16:36:25 -08:00
GordoRank
4631a8929a
Update itext.class.js
2014-01-20 20:59:04 +00:00
GordoRank
ab67a7d1d6
Update itext.class.js
2014-01-20 15:28:50 +00:00
GordoRank
394732f3a3
Update renderCursor/renderSelection
...
Update renderCursor()/renderSelection() to draw to separate canvas
2014-01-20 14:54:41 +00:00
GordoRank
e3dd37ff22
remove IText _render()
...
The ```the _render()``` method for IText objects is no longer needed when since rendering cursor/selection is now handled elsewhere
2014-01-20 14:51:21 +00:00
GordoRank
40b04c7b11
Let _getWidthOfChar() return cached values
2014-01-20 11:19:01 +00:00
GordoRank
e000ed0ef0
Remove clashing 'selected' event firing
2014-01-20 09:43:36 +00:00
GordoRank
cec2a17a47
Remove clashing 'selected' event firing
2014-01-20 09:43:00 +00:00
GordoRank
8cf567522d
Update itext.class.js
2014-01-20 08:50:02 +00:00
GordoRank
72e1b91ee4
Reduce calls to fillText/fillStroke in IText
2014-01-20 08:42:24 +00:00
GordoRank
764b55ed33
Fire text:selected on selectAll
2014-01-20 08:22:02 +00:00
GordoRank
3e1433acb1
Add text:selected event
2014-01-20 08:21:00 +00:00
GordoRank
9a2d697cf2
Prevent multiple hidden Textareas
...
Currently a hidden ```TEXTAREA``` is created for every IText instance and remain in the DOM forever.
This patch creates the required textarea on demand in ```enterEditing``` and destroys it in ```exitEditing```
This prevents multiple Textareas from hanging around in the DOM which can cause slowdowns in complex scenes with lots of IText instances.
2014-01-20 08:14:31 +00:00
GordoRank
b814568294
Prevent multiple RenderAll calls on exit edit
...
This commit modifies the ```mouseUp ```handler to fix ```enterEditing``` behaviour, while maintaining the ability to fire ```enterEditing()``` programmatically
2014-01-20 07:46:59 +00:00
GordoRank
564266e3e2
Prevent multiple RenderAll calls on exit edit
...
This fix prevents ```renderAll()``` being called for each IText instance when ```exitingMode``` is exited. Only one ```renderAll()``` is necessary
2014-01-20 07:42:33 +00:00
GordoRank
d088bb1fb7
Fix IText selection with varying font widths
2014-01-20 07:28:33 +00:00
kangax
aa98c317b7
Fix keyboard appearance on Android. Closes #1070
2014-01-18 16:08:41 -05:00
kangax
f1aef7ed1a
Version 1.4.3
2014-01-18 12:01:19 -05:00
kangax
bc8acac692
Only call _renderStroke in line and circle when this.stroke exists
2014-01-17 11:57:54 -05:00
kangax
20e0712688
Avoid set in fabric.Line#_setWidthHeight
2014-01-17 11:57:31 -05:00
kangax
727a8d04b1
Move _hasITextHandlers to canvas instance
2014-01-17 11:51:36 -05:00
kangax
13fcf15b8b
Make sure compiler can inline
2014-01-17 11:51:16 -05:00
kangax
16447f9b7a
Optimize _renderObjects to take fast path if no activeGroup given
2014-01-17 11:48:17 -05:00
kangax
4761c2527c
Build distribution
2014-01-14 12:57:13 -05:00
Juriy Zaytsev
7094ec47e2
Merge pull request #1094 from anvaka/fixNodeCanvas
...
createCanvasForNode passes options to FabricCanvas
2014-01-14 09:51:55 -08:00
Juriy Zaytsev
d4ea2c6f1e
Merge pull request #1097 from GordoRank/master
...
Rewrite renderSelection to only draw once per line
2014-01-14 09:46:16 -08:00
GordoRank
0abc547d6b
Fixed formatting and cache start.lineIndex
2014-01-14 17:37:40 +00:00
kangax
166dc60716
Fix JSHint warnings, build distribution
2014-01-14 12:34:32 -05:00
GordoRank
9f2c678a66
Formatting fixed and end.lineIndex cached
2014-01-14 17:23:40 +00:00
GordoRank
350261437a
Rewrite renderSelection to only draw once per line
...
Previously RenderSelection performed a fillRect() command for every character. This resulted in poor performance on large bodies of text. This rewrite calculates the selection box for each line of text and draws a single rectangle for each line, dramatically improving performance.
2014-01-14 17:09:19 +00:00
GordoRank
90a97e6272
Fix click cursor placement on center/right text
...
This clamps the click cursor placement so that clicking to the left of a short first line of centered/right aligned text positions the cursor to the left of the first character in the line....
Previously in that instance it would move to the left boundary instead
2014-01-14 15:48:59 +00:00
GordoRank
77f304bed0
Fixes Center/Right aligned cursor placement
...
Fixes Center/Right aligned cursor placement by mouse click when the text box is scaled
2014-01-14 13:58:06 +00:00
GordoRank
272859b8f1
Formatting fixes
2014-01-14 11:03:27 +00:00
GordoRank
1e9c58ea01
formatting fixes
2014-01-14 11:00:48 +00:00
GordoRank
a7e0e681d5
Formatting fixes
2014-01-14 10:56:43 +00:00
anvaka
6486606670
createCanvasForNode passes options to FabricCanvas
...
Some options like renderOnAddRemove plays crucial role in canvas
performance. This change allows clients to use custom options for
node.js
2014-01-14 01:12:29 -08:00
GordoRank
a2cf96a020
Dblclick at end of word selects previous word
...
Fixes selectWord so that double clicking at the end of a word (just after the last character in the left half of the space) selects the previous word. Again this is MS Word behaviour.
2014-01-14 00:25:42 +00:00
GordoRank
1499baa7c3
Move enterEditing back into MouseUp
...
Oops... thats better! :)
This way we get all the responsiveness benefits of setting the cursor position on mousedown but can still actually move the objects!
2014-01-14 00:00:25 +00:00
GordoRank
ec144b773d
Set cursor restart delay to 0
...
Setting cursor restart delay to 0 improves responsiveness when beginning drag selection, works inline with my previous two commits for selectLine/selectWord
2014-01-13 23:32:22 +00:00
GordoRank
8cb74e00e2
Restart cursor on selectWord/selectLine
...
Restarting cursor rendering using initDelayedCursor(true) in selectWord and selectLine improves user perceived responsiveness and provides an accurate reproduction of MS Word behaviour
2014-01-13 23:19:18 +00:00
GordoRank
2c5c83f9da
Moved enterEditing into MouseDown
...
MS word appears to move the caret on MouseDown, not on MouseUp as I thought.
2014-01-13 23:09:12 +00:00
GordoRank
2539c68cc8
Do not rely on options object in enterEditing #2
2014-01-13 22:43:58 +00:00
GordoRank
ead81813bd
Do not rely on options object for enterEditing #1
2014-01-13 22:42:29 +00:00
GordoRank
6acb697b7a
Fix more formatting
2014-01-13 22:27:25 +00:00
GordoRank
b8c83ed242
Fix formatting
2014-01-13 22:22:40 +00:00
GordoRank
cc52bf7039
rename __lastEditing to __lastIsEditing
2014-01-13 22:19:44 +00:00
GordoRank
3510004d97
Set cursor to mouse position on editing enter
2014-01-13 12:13:19 +00:00
GordoRank
0957c9ca9f
Set cursor position to mouse click on enter
2014-01-13 12:12:12 +00:00
GordoRank
55bc6a990b
Make flashing cursor behave like MSWord
2014-01-13 12:04:46 +00:00
GordoRank
3582fd3ba9
Make flashing cursor behave like MSWord
2014-01-13 11:58:26 +00:00
GordoRank
f56be28052
Make flashing cursor behave like MSWord
2014-01-13 11:56:56 +00:00
GordoRank
f7e24da770
Click after line should set cursor to this line
...
Clicking past the end of line selects the last character of that line
2014-01-13 10:19:39 +00:00
GordoRank
b6fb6491bc
Dbl click into editing mode sets cursor position
...
Double click directly into editing mode sets cursor position rather than selects whole word
2014-01-13 09:29:56 +00:00
Juriy Zaytsev
2b74c2abc5
Merge pull request #1087 from Kienz/patch-1
...
Fix fabric.Canvas initialization for width/height attributes. Closes #1086
2014-01-12 06:38:07 -08:00
Juriy Zaytsev
bb7f52cc84
Merge pull request #1088 from Kienz/patch-2
...
Fix path regExp for compressed path commands
2014-01-12 06:37:46 -08:00
Kienz
da0866429a
Initialize fabric.IText canvas handlers only once. Closes #1076
...
Qunit additions
2014-01-12 15:32:50 +01:00
Kienz
61f65bc206
Fix path regExp for compressed path commands
...
Fix regExp for e^x numbers
Add unit test for e^x numbers
2014-01-12 13:50:03 +01:00
Kienz
50899a79ef
Fix fabric.Canvas initialization for width/height attributes. Closes #1086 .
2014-01-12 11:33:42 +01:00
kangax
c5f97d69af
Remove console.log in itext
2014-01-04 15:02:51 -05:00
kangax
92b0d5e282
Optimize rendering of 1x1 rectangles
2014-01-04 15:02:51 -05:00
kangax
d7c2076b8a
Do not call shadowColor = ... when there's no shadow
2014-01-04 15:02:51 -05:00
kangax
e0aed05c3d
Build distribution
2013-12-31 09:29:14 -05:00
kangax
ea811cbb23
Fix fabric.Path#path being "cloned" by reference
2013-12-31 09:29:14 -05:00
Stefan Kienzle
6776e62d00
Fix overlayImage / overlayColor during selection mode. Closes #1068
2013-12-27 10:19:57 +01:00
kangax
7c541da8cc
Fix double callback in loadFromJSON if objects.length == 0. Closes #1056
2013-12-21 15:17:08 +01:00
mizzack
d13a4dd273
Correcting invalid control name
2013-12-19 11:02:23 -05:00
Marco Miltenburg
b97f850bbb
Added check to make sure xml is defined and exit if undefined.
2013-12-18 13:44:04 +01:00
kangax
d478482a19
Fix number parsing in paths. Closes #961
2013-12-18 11:29:44 +01:00
kangax
ec629c6b59
Update text events
2013-12-18 11:28:06 +01:00
kangax
032cc05bd1
Fix background offset in iText. Closes #1029
2013-12-14 14:55:47 +01:00
kangax
63eb873e7f
Fix style object deletion in iText. Closes #1035
2013-12-14 12:25:04 +01:00
kangax
dbd9193703
Debounce element parsing. Thanks @biovisualize. Closes #1052
2013-12-14 12:19:54 +01:00
kangax
4a8c457680
Fix typo in _initCanvasHandlers. Closes #1048
2013-12-14 12:04:26 +01:00
kangax
79b4474e77
Mention that itext supports ctrl/cmd+a
2013-12-14 12:04:26 +01:00
kangax
db041fded5
Add note about clipTo origin. Update changelog
2013-12-11 11:09:59 +01:00
kangax
8d8cd16f6c
Add "mouse:over" and "mouse:out" events
2013-12-09 15:35:08 +01:00
Nazar Mokrynskyi
38bed8143e
New events:
...
* object:over
* object:out
* mouseover
* mouseout
Based on demo example
2013-12-08 18:01:48 +02:00
kangax
37afbc2909
Fix transformMatrix not affecting text. Closes #1031
2013-12-07 13:59:38 +01: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
Tom French
3cc191bdfb
Fixed control and group selection rendering
2013-12-06 13:40:17 +00:00
Tom French
b0e944c251
Merge branch 'master' of https://github.com/kangax/fabric.js
...
Conflicts:
dist/all.require.js
2013-12-05 19:46:47 +00:00
Tom French
ce4809d1e8
Merge branch 'master' of https://github.com/kangax/fabric.js
...
Conflicts:
dist/all.js
dist/all.require.js
src/brushes/circle_brush.class.js
src/brushes/spray_brush.class.js
src/canvas.class.js
src/mixins/canvas_events.mixin.js
src/mixins/object_interactivity.mixin.js
src/shapes/group.class.js
src/shapes/image.class.js
src/shapes/object.class.js
src/util/misc.js
2013-12-05 19:45:39 +00:00
kangax
596831b6c1
Fix itext editing exit when clicking on other objects. Closes #1019
2013-11-29 14:43:01 +01:00
kangax
56f0bfb9cc
Avoid setting crossOrigin on an image if unspecified. Closes #971
2013-11-27 20:00:33 +01:00
kangax
0f23f14a44
Add fabric.IText#caching
2013-11-27 19:48:35 +01:00
kangax
435f3933ac
Fix i-text line-through offset
2013-11-26 14:58:53 +01:00
kangax
ae11740f82
Fix i-text style copy-pasting (doesn't work with multiline yet)
2013-11-25 21:32:00 +01:00
kangax
854d428c38
Add more tests
2013-11-23 17:35:31 +01:00
kangax
82509dc8d8
More IText tests
2013-11-23 13:45:53 +01:00
kangax
673fa39eba
Start adding i-text unit tests; add additional util and color tests
2013-11-22 17:30:55 +01:00
kangax
ec8a920081
Reorganize parser.js
2013-11-21 18:00:29 +01:00
kangax
7fa80e82ba
Add @private to doc
2013-11-21 12:17:51 +01:00
kangax
9e8b6bc5f6
Exit i-text editing properly when clicking on another text
2013-11-21 12:17:39 +01:00
kangax
336528551b
Move object stacking and SVG export methods to separate files
2013-11-20 21:14:26 +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
942b5cfd8d
Add "editing:entered" and "editing:exited" events
2013-11-20 20:25:18 +01:00
kangax
70549d177c
Fix styles when removing multiple lines
2013-11-20 20:18:43 +01:00
Stefan Kienzle
2e834aa81c
Fix 1px offset of background image - Closes issue #990
2013-11-20 17:21:58 +01:00
Juriy Zaytsev
5c0d0cadda
Merge pull request #1000 from msievers/issue973
...
Move getScrollLeftTop to dom_misc.js and call it inside getElementOffset
2013-11-20 04:48:59 -08:00
Michael Sievers
13feddfa16
Call fabric.util.getScrollLeftTop inside getElementOffset
2013-11-20 13:06:28 +01:00
kangax
81e9535ef0
Small code cleanup
2013-11-20 12:47:03 +01:00
Michael Sievers
7cb161438c
Move getScrollLeftTop from dom_events.js to dom_misc.js
2013-11-20 10:42:34 +01:00
kangax
34901c12e8
More itext.class.js refactoring
2013-11-19 18:25:19 +01:00
kangax
db7036cfb5
Update docs
2013-11-19 17:41:15 +01:00
kangax
30ab19252b
Refactor itext.class.js even more
2013-11-19 17:38:58 +01:00
kangax
3509c08dd3
Move IText sag exporting logic to its own file
2013-11-19 17:24:24 +01:00
Tom French
08d575422c
Fixes to zoom for groups and brushes.
2013-11-19 16:21:29 +00:00
kangax
fa800d3c45
Refactor itext.class.js
2013-11-19 17:16:20 +01:00
kangax
967d79fba3
Break up IText behavior into click and key
2013-11-19 12:56:23 +01:00
Stefan Kienzle
bbaffd7f8e
Call activeGroup.setCoords() in mouse-up event - Fixes issue #995
2013-11-19 11:49:27 +01:00
kangax
e9af66e37b
Fix doc
2013-11-18 20:18:39 +01:00
kangax
94e83a715e
Add support for line select in IText via triple click
2013-11-18 20:06:20 +01:00
kangax
85e33c042b
Add doc info about mouse/touch combinations
2013-11-18 17:41:50 +01:00
kangax
50c5edb425
Add support for shift+click selection
2013-11-18 17:41:50 +01:00
kangax
e88c277675
Refactor canvas handlers in IText
2013-11-18 17:41:50 +01:00
Darby
54180a7665
Clear selection upon exit editing
2013-11-17 18:29:18 -06:00
kangax
17a9ba7712
Fix mouseup handling outside of itext
2013-11-17 13:28:24 +01:00
kangax
5dd4b480be
Break down getSelectionStartFromPointer even more
2013-11-17 10:45:31 +01:00
kangax
decfe15aa3
Break down getSelectionStartFromPointer
2013-11-17 10:33:20 +01:00
kangax
74ac19c7f7
More IText refactoring and minor group tweak
2013-11-17 10:16:18 +01:00
kangax
1113e20599
Do not scale cursor in width
2013-11-16 18:57:34 +01:00
kangax
df7b1f6747
Slight IText refactoring
2013-11-16 18:48:57 +01:00
kangax
604e85dcfc
Add support for forward delete
2013-11-16 18:06:04 +01:00
kangax
22200db7b3
Refactor itext_behavior
2013-11-16 15:20:41 +01:00
kangax
de7b92bda5
Some refactoring; move arc into a separate file
2013-11-16 15:20:41 +01:00
kangax
6260f55df6
Implement mouse-based selection. Woooot.
2013-11-16 15:20:41 +01:00
Darby
4479af30d0
Update itext_behavior.mixin.js
...
Ctrl + key fix
2013-11-15 16:23:51 -06:00
Darby
450837474e
Update itext_behavior.mixin.js
...
Changed document to fabric.document for node compatibility.
2013-11-15 16:12:08 -06:00
kangax
e3b0f666fb
More precise path-group check. Closes #964
2013-11-14 19:22:45 +01:00
Juriy Zaytsev
963616ec0f
Merge pull request #983 from Kienz/patch-2
...
Fix bug in selection mode, Fix drawControls for activeGroup
2013-11-14 09:49:08 -08:00
kangax
26bdd0de69
Remove setCoords in fabric.Group#render. Build distribution. Version 1.3.11. Closes #979
2013-11-14 18:47:10 +01:00
Stefan Kienzle
17053585fb
Clear selection if unselectable object is clicked - Fixes issue #976
2013-11-14 17:46:59 +01:00
Stefan Kienzle
68fbe5fe50
Fix activeGroup controls
2013-11-14 14:35:18 +01:00
Stefan Kienzle
cdc7d8a96f
Fix bug in selection mode
...
If activeGroup exists and other object is clicked and moved the same time the selection box appears
Add missing comma for previous commit
2013-11-14 13:14:38 +01:00
Stefan Kienzle
603299150c
canvas_events refactoring
...
Fix wrong cursor for clicked unselectable objects
2013-11-14 10:27:27 +01:00
kangax
04ba89b573
More group refactoring
2013-11-13 21:08:56 +01:00
kangax
483426b275
Fix group z-index. Closes #967
2013-11-13 20:52:25 +01:00
kangax
8768aa7661
Refactor static_canvas.class.js
2013-11-13 16:43:24 +01:00
kangax
7c4025841a
Refactor static_canvas.class.js, canvas_events.mixin.js, canvas.class.js
2013-11-13 16:19:44 +01:00
kangax
b6f725fc22
Combine var declarations
2013-11-13 16:01:35 +01:00
kangax
776b72d624
More canvas.class.js refactoring
2013-11-13 14:33:01 +01:00
kangax
bbd3480d50
canvas.class.js refactoring
2013-11-13 14:26:49 +01:00
kangax
779c2ef527
Move isTransparent logic to utils
2013-11-13 14:10:28 +01:00
kangax
166b16d6c2
IText refactoring
2013-11-13 12:25:50 +01:00
Stefan Kienzle
4f613f0684
Fix fabric.Image SVG output - Closes issue #977
2013-11-13 11:20:46 +01:00
kangax
2d1de62e89
Fix cursor detection in rotated text!!!!!
2013-11-11 18:35:21 +01:00
kangax
6be8697adc
Remove iOS sniff. Tsk tsk tsk
2013-11-11 18:35:04 +01:00
kangax
5fdc1dc2d1
Move getLocalPointer to fabric.Object
2013-11-11 18:34:46 +01:00
kangax
31338df54d
canvas_events refactoring
2013-11-11 16:41:13 +01:00
kangax
4f46626467
Extract method in fabric.Canvas
2013-11-11 16:20:11 +01:00
kangax
014109ced3
Move canvas grouping logic to separate mixin/file
2013-11-11 16:07:51 +01:00
kangax
15889d3677
Fix active group's originX/originY
2013-11-11 00:02:10 +01:00
kangax
d0e60d7c5a
Fix up/down selection boundaries with shift
2013-11-11 00:01:57 +01:00
kangax
f421979e80
More fabric.Group refactoring
2013-11-10 17:43:23 +01:00
kangax
1ecbf379ff
More group refactoring
2013-11-10 17:31:59 +01:00
kangax
ffa794ed54
Refactor fabric.Group
2013-11-10 17:24:32 +01:00
kangax
1183464dde
Refactor arcToSegments
2013-11-10 17:13:01 +01:00
kangax
fc3bb9fe69
Refactor getColorStop
2013-11-10 16:51:08 +01:00
kangax
db7b0b585f
Refactor _drawControls
2013-11-10 16:43:56 +01:00
kangax
a39474d5bc
Refactor __onMouseUp
2013-11-10 15:34:10 +01:00
kangax
987f165790
Remove duplication in log.js
2013-11-10 15:15:31 +01:00
kangax
4556c7bf45
Fix origins of free-drawing paths and shapes
2013-11-10 11:24:45 +01:00
kangax
cbecc7910c
Fix vertical cursor movement in center/right -aligned and styled text
2013-11-09 18:09:25 +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
Kienz
42935be697
Remove activeObject in fabric.Canvas#remove
...
Fire 'before:selection:cleared' and 'selection:cleared' if activeObject is removed from canvas
Add unit test
Fixes issue #962
2013-11-08 19:09:16 +01:00
Tom French
88b589b3d6
Implement zoom for brushes, various zoom fixes, remove canvasBorder.
2013-11-08 15:54:55 +00: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
kangax
5f643daf54
Normalize behavior of setActiveObject, setActiveGroup, discardActiveObject, discardActiveGroup. Closes #579
2013-11-06 20:58:23 +01:00
kangax
aea61aa64e
Update itext docs
2013-11-06 20:35:32 +01:00
kangax
c3fd102cdb
Fix fabric.Object#selectable. Closes #957
2013-11-06 18:41:02 +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
kangax
baf646e7a0
Support mouse and touch events simultaneously. Closes #670
2013-11-05 12:27:15 +01:00
kangax
f91dd30dc7
Better line length in parser
2013-11-05 11:59:48 +01:00
kangax
6cb941c116
Extract elements parsing into a separate object (ElementsParser)
2013-11-04 17:12:05 +01:00
kangax
ce8fe3447d
Break parseStyleAttribute apart
2013-11-04 16:41:26 +01:00
kangax
2753108028
Initial implementation of fabric.IText#toSVG (~75% complete atm)
2013-11-04 15:20:40 +01:00
kangax
59af4b7934
Add ctrl/cmd + x support
2013-11-04 12:05:29 +01:00
kangax
1c07c9600e
Fix cursor appearance in itext
2013-11-04 11:59:10 +01:00
Juriy Zaytsev
fe54615584
Merge pull request #931 from lorenzopolidori/controls-visibility
...
Added object controls visibility. Closes #552 .
2013-11-03 15:28:19 -08:00
kangax
330784ac2c
[BACK_INCOMPAT] Change default objects' originX/originY to left/top
2013-11-04 00:15:49 +01:00
Lorenzo Polidori
d1642c0729
Added object controls visibility (github issue #552 ).
2013-11-03 23:08:05 +00:00
kangax
c6c5090a20
Small tweaks in text.class.js
2013-11-03 17:38:39 +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
bdf147fbfb
Fix itext styling due to caching
2013-11-02 15:06:15 +01:00
kangax
2da3fa80b5
Slight reorganization
2013-11-02 14:41:28 +01:00
kangax
7eee6ddef0
Add caching to IText which increases performance of large text tremendously
2013-11-02 14:15:20 +01:00
kangax
9bfce93ddf
Only fire dblclick if clicked at the same location
2013-11-02 12:37:50 +01:00
kangax
c5c6474c4d
Ensure one editing text at a time
2013-11-01 22:39:28 +01:00
kangax
7235a97e91
Add basic copy/paste support in IText; fix certain char insertion.
2013-11-01 22:28:23 +01:00
Tom French
328f14f388
Add zoom
2013-10-31 17:36:18 +00:00
kangax
c6ff46269c
Preserve canvas reference in fabric.Object#toDataURL. Closes #938
2013-10-31 16:00:31 +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
7ff0ae826f
Refactor _renderViaNative a bit more
2013-10-30 17:35:20 +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
3b3b478e77
Refactor _setObjectScale
2013-10-30 17:15:53 +01:00
kangax
7022cd4a9b
Even more canvas_events refactoring
2013-10-30 17:05:11 +01:00
kangax
171cfc1a05
More canvas_events refactoring
2013-10-30 16:58:47 +01:00
kangax
cd66612aa3
More canvas_events refactoring
2013-10-30 16:34:57 +01:00
kangax
61a3fb5123
Refactor __onMouseDown
2013-10-30 15:32:04 +01:00
kangax
10a3319ed1
Refactor _restoreObjectState
2013-10-30 15:09:02 +01:00
kangax
8ad5e7e511
IText doc fixes
2013-10-30 14:55:02 +01:00
kangax
f53559773f
Prevent errors in FF when rendering non-ready patterns
2013-10-29 21:14:20 +01:00
Alex Chuchunkov
a6f8e16c81
stopObserving w/o arguments removes all event - handler pairs. Closes issue #936
2013-10-29 22:47:29 +04:00
kangax
167f2fa089
Move shared attributes out of parser since it's needed by many "classes"
2013-10-28 14:01:44 +01:00
kangax
dd11dc7e87
Resize canvas back only after data url is retrieved. Closes #924
2013-10-28 08:02:58 +01:00
kangax
6892783156
Refactor fabric.Text#toSVG
2013-10-27 19:20:46 +01:00
kangax
eee0c9416b
Refactor canvas event handling
2013-10-27 19:05:04 +01:00
kangax
fb05e13c69
Return early
2013-10-27 18:40:53 +01:00
kangax
8d2d6dabad
De-duplicate cursor moving methods even more
2013-10-27 18:39:22 +01:00
kangax
b02c444b3f
Move regex into instance property
2013-10-27 14:35:25 +01:00
kangax
b8b3403b0d
Move line shifting into a separate method
2013-10-27 14:32:33 +01:00
kangax
b6ceb0a87d
Refactor key movement handlers in IText
2013-10-27 14:26:17 +01:00
kangax
733eccb00c
Separate IText behavior into a separate "module"
2013-10-27 14:05:35 +01:00
kangax
803ad572d4
draw -> render, for consistency
2013-10-27 13:27:05 +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
4ecef881fe
Move out event binding
2013-10-26 19:16:44 +02:00
kangax
0aad996dc9
Refactor _scaleObject more
2013-10-26 19:06:48 +02:00
kangax
aa75b47506
Refactor _scaleObject
2013-10-26 18:59:36 +02:00
kangax
d803f9aa64
Refactor _findSelectedObjects
2013-10-26 18:54:29 +02:00
kangax
715f5bd245
Refactor iText a bit more
2013-10-26 18:45:17 +02:00
kangax
bd79c10987
Refactor _getSVGTextAndBg
2013-10-26 11:24:18 +02:00
kangax
9b841f9362
Refactor renderViaNative
2013-10-25 21:50:58 +02:00
kangax
86d8df6c8e
Refactor duplication in gradient class
2013-10-25 20:27:02 +02:00
kangax
ce33c3cd3e
Fix missing argument
2013-10-25 20:20:29 +02:00
kangax
46c5d9073c
Refactor fabric.StaticCanvas#renderAll
2013-10-25 20:13:54 +02:00
kangax
c0effef9e1
Refactor fabric.StaticCanvas#toSVG more
2013-10-25 20:05:18 +02:00
kangax
df1125e0b9
Refactor fabric.StaticCanvas#toSVG
2013-10-25 19:57:31 +02:00
kangax
244d01879f
Refactor long methods in iText
2013-10-25 19:42:17 +02:00
kangax
1cf94af014
Remove duplication in anim_ease.js
2013-10-25 12:15:26 +02:00
kangax
9e6fc35ffe
Refactor fill setting into a separate method
2013-10-25 11:49:47 +02:00
kangax
ffe45dc702
Refactor stroke setting into a separate method
2013-10-25 11:34:47 +02:00
kangax
93d2ab3400
Refactor _getCoordsFromCommand
2013-10-25 11:23:24 +02:00
kangax
f67b78a984
Refactor _parseDimensions
2013-10-25 11:18:44 +02:00
kangax
3e75f63c7b
Refactor iText again
2013-10-25 11:06:58 +02:00
kangax
c9e819ea8e
Refactor IText
2013-10-25 10:56:24 +02:00
kangax
c42d857b14
Refactor _handleGroupLogic even more
2013-10-25 10:43:42 +02:00
kangax
c0c222f672
Refactor _handleGroupLogic
2013-10-25 10:38:32 +02:00
kangax
58f30be963
Add iText
2013-10-25 10:28:30 +02:00
kangax
c2edbf003a
Refactor _setupCurrentTransform
2013-10-25 10:20:55 +02:00
kangax
ae5973676a
Support includeDefaultValues in shadow serialization
2013-10-25 09:05:39 +02:00
kangax
e34fb6a256
More specific documentation
2013-10-25 09:05:39 +02:00
kangax
f6a6ea68b7
Avoid width=0 for text objects
2013-10-25 09:05:39 +02:00
kangax
476da71e92
Doc changes
2013-10-25 09:05:39 +02:00
Stefan Kienzle
9c6565491b
Don't fire 'selection:created' if only one object exists
2013-10-23 09:18:07 +02:00
Kienz
0f9612b69f
Fix object selection with shift key - Closes issue #912
2013-10-22 20:33:20 +02:00
Jason Gauci
6bbc1798f1
Do not name the requirejs module (see http://requirejs.org/docs/api.html#modulename )
2013-10-20 21:10:19 -07:00
Kienz
3b0b9b7d80
Doc additions. Add examples to fabric.Image.filters
2013-10-13 18:46:51 +02:00
Juriy Zaytsev
b92e9575e0
Merge pull request #866 from rykerwilliams/master
...
Update Events / Gestures modules with event.js 1.1.3
2013-10-12 14:13:02 -07:00
Kienz
5adf772a64
Invisible objects are no longer selectable with "selection-mode" (canvas.selection = true) - Closes issue #891
2013-10-09 20:57:41 +02:00
rykerwilliams
5bf42c099f
Add custom object properties to clone function.
2013-10-06 17:02:36 -04:00
rykerwilliams
d40509d688
Remove diff tool change.
2013-10-06 16:41:27 -04:00
rykerwilliams
5445f52db3
Remove canvas_wheel_event.mixin.js. Change wrapping to bind.
2013-10-06 16:35:09 -04:00
rykerwilliams
8fafe15649
Merge branch 'master' of https://github.com/kangax/fabric.js
2013-10-05 21:02:45 -04:00
kangax
5608e17b1a
Add fabric.Polyline example and an inline link to constructor
2013-10-05 12:50:29 +02:00
kangax
eef047a5b3
Add check for skipTextAlign in fabric.Text
2013-10-05 12:50:29 +02:00
kangax
a0c508c1d5
Fix selectable=false objects getting incorrectly selected. Closes #880
2013-10-01 16:52:11 +02:00
kangax
82d9a15fee
Fix left aligning in Node. Version 1.3.7
2013-09-30 18:37:45 +02:00
kangax
f93a0e4313
Fix text rendering offsets on Node by simplifying things
2013-09-30 16:15:00 +02:00
kangax
6cd767c479
Fix offsets of underline/line-through/overline text decoration and line sharpness
2013-09-30 13:38:12 +02:00
kangax
4b65f9f682
Fix removal of default values in fabric.Text#toObject
2013-09-30 13:38:12 +02:00
Juriy Zaytsev
bfcd95b7a4
Merge pull request #878 from Kienz/patch-1
...
Add reviver function to `fabric.Canvas.toSVG` - Closes #690
2013-09-29 04:04:37 -07:00
Kienz
922e7ab159
Include sourcePath in fabric.PathGroup only if its defined
...
Doc additions
2013-09-29 09:56:29 +02:00
Kienz
61835602f9
Remove toGrayscale from fabric.PathGroup and fabric.Collection
2013-09-29 09:49:41 +02:00
Kienz
e94eb59012
Add @example for toSVG with reviver function
2013-09-29 09:28:27 +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
f5775eb2f4
Add rectangles optimization to Spray brush
2013-09-28 23:47:53 +02:00
kangax
4b78a2d819
Fix includeDefaultValues to account for stateProperties of specific objects
2013-09-28 23:47:53 +02:00
kangax
ec120452c5
Add x/y in fabric.Rect#stateProperties. Make toObject remove them when includeDefaultValues=false.
2013-09-28 23:47:53 +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
Kienz
fa2f18a77a
Add more docs.
...
Examples, tutorial and demo links.
2013-09-28 12:31:32 +02:00
kangax
bbb73dcde3
Add more docs
2013-09-27 22:22:28 +02:00
kangax
485b3569d3
Add docs
2013-09-27 22:22:28 +02:00
kangax
bd2857e49a
Add link for mask filter
2013-09-27 22:22:28 +02:00
Juriy Zaytsev
3345156793
Merge pull request #873 from Kienz/docAddtions
...
Doc additions
2013-09-26 12:12:28 -07:00
Kienz
7792b1274b
Doc additions
...
Add example and jsfiddle link to `canvas.loadFromJSON`
2013-09-26 21:04:10 +02:00
Kienz
9de6c9a473
Doc additions
...
Add examples and links to jsfiddle to `fabric.Object.setGradient`, `fabric.Object.setPatternFill`, `fabric.Object.setShadow` and `fabric.Canvas.toDataURL
2013-09-26 20:17:53 +02:00
kangax
db8f0515f1
Add docs for object accessors. Build distribution.
2013-09-26 19:55:17 +02:00
Kienz
30ffd894d6
Add missing doc additions of previous commit from kangax
2013-09-26 18:43:13 +02:00
Kienz
5f9edecd18
[BACK_INCOMPAT] Split fabric.Object.centerTransform and fabric.Canvas.centerTransform into the properties centeredScaling and centeredRotation
...
centeredScaling: Define if object scaling should be centered (true). Default = false.
centeredRotation: Define if object rotates around center (true) or around origin (originX/originY) point (false). Default = false.
Pressed altKey negates the behavior.
2013-09-26 18:19:17 +02:00
kangax
365b2dc0a9
Doc additions
2013-09-26 17:50:28 +02:00
Juriy Zaytsev
aeaa5fcb00
Merge pull request #857 from briefbanane/master
...
Allow toggling of flipX/Y to flip the whole group
2013-09-26 06:04:11 -07:00
kangax
41ab3a0064
Doc additions
2013-09-26 14:12:02 +02:00
Fabian Ebner
44756d4a57
Handle addWithUpdate removeWithUpdate and destroy differently
2013-09-25 22:42:13 +02:00
Fabian Ebner
61fff6b8c6
Clean up code and fix rotation issue
2013-09-25 21:50:09 +02:00
kangax
812717b207
Add fabric.Object#evented. fabric.Object#selectable now fires events again, but can not be selected. However, evented=false does not receive events at all.
2013-09-25 19:05:57 +02:00
Fabian Ebner
5576759eb4
Preserve rotation after flipping when group isn't selected anymore
2013-09-25 15:34:30 +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
Fabian Ebner
f02c657f84
If group was flipped and is destroyed always re-flip children
2013-09-24 12:47:39 +02:00
Fabian Ebner
6e96b3f1fb
Allow flipping in fabric.Group to change the object positions permanently
2013-09-24 12:38:11 +02:00
Stefan Kienzle
0a4bbfb4bb
Remove check for fabric.Color because only string values are allowed for color parameter. Otherwise initialization breaks if opacity is not defined.
2013-09-23 17:56:07 +02:00
rykerwilliams
f083a3dabb
Forgot __onShake method.
2013-09-23 10:55:00 -04:00
rykerwilliams
88aa0df407
Added new custom version of event.js. Added event listeners for shake, drag and orientation change.
...
Custom version available: https://github.com/rykerwilliams/Event.js
2013-09-23 10:10:40 -04:00
rykerwilliams
888f324e46
Casing Issue. Remove unneed variables.
2013-09-21 17:51:51 -04:00
rykerwilliams
9283530837
Add wheel event mixin.
2013-09-21 17:41:06 -04:00
Stefan Kienzle
60e9d0f144
[BACK_INCOMPAT] Initialization of fabric.Image.filters.Tint is now different - options.color: color string value, options.opacity: 0..1
...
Now you can define opacity of the tint filter (by rgba/hsla colors or with opacity attribute)
Doc additions
2013-09-20 19:51:55 +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
kangax
d29a1d9ccd
Uncomment fabric.Object#getPointByOrigin
2013-09-19 19:49:51 +02:00
Juriy Zaytsev
e627c8804a
Merge pull request #856 from Kienz/patch-2
...
Fix wrong object order in `fabric.Group.toSVG`
2013-09-18 13:34:29 -07:00
Kienz
cb510b9ef3
Fixed fabric.Group.toSVG- object order was wrong
2013-09-18 19:17:50 +02:00
Kienz
815ca4ec70
Fixed fabric.Tectvertical position
2013-09-18 17:28:36 +02:00
Juriy Zaytsev
3c50e72548
Merge pull request #853 from Kienz/patch-1
...
Avoid unnecessary `renderAll` calls in mousedown and mouseup events
2013-09-18 06:17:51 -07:00
Kienz
516fa76b68
Fix jshint error
2013-09-18 08:23:36 +02:00
Kienz
721ac7a8c2
Doc additions - document object parameter
2013-09-17 22:42:58 +02:00
Stefan Kienzle
23a4685d22
Avoid unnecessary renderAll calls in mousedown and mouseup events.
...
Tested it with `canvas.selection = true/false`.
2013-09-17 18:45:54 +02:00
Kienz
ba2a0e6dff
Fixed fabric.PatternBrush- brush style was not applied during the drawing mode
2013-09-16 19:05:23 +02:00
kangax
dbc96349ce
Refactoring
2013-09-15 20:29:20 +02:00
Kienz
e69c19029a
Fixed object.toDataURL if object's originX/originY != 'center'
...
Add documentation to object.toDataURL for options object
Alias "jpg" format to "jpeg". Closes #806
2013-09-15 18:02:15 +02:00
kangax
b077905781
Avoid creation of exports global var as this messes up QUnit (and probably something else)
2013-09-14 20:40:40 +02:00
kangax
408a8b9de6
Alias "jpg" format to "jpeg". Closes #806
2013-09-14 18:44:44 +02:00
Kienz
26e784aede
Move setColorfrom fabric.Text to fabric.Object
...
Fixed "enum" notation
`fabric.Object.setGradient` is now chainable
Doc additions
Add `fabric.Object.setPatternFill`unit test
Add chainable tests to some methods
2013-09-14 17:10:49 +02:00
kangax
f5f29a3925
Create group of circles in CircleBrush for better performance. Closes #530
2013-09-14 13:59:10 +02:00
kangax
44265e3c97
Create group of rectangles in spray brush for better performance
2013-09-14 13:55:21 +02:00
kangax
eeb0f72bd4
Move fabric.Rect's stateProperties to prototype for more efficient memory usage
2013-09-14 13:54:18 +02:00
kangax
c1a818ac33
Add support for cropping in toDataURL. Closes #449 . Version 1.2.14
2013-09-14 12:42:25 +02:00
kangax
40e27b7392
Document text accessors
2013-09-13 19:03:05 +02:00
Stefan Kienzle
539afb8d97
Some small changes in fabric.Observable
2013-09-13 16:18:18 +02:00
Juriy Zaytsev
a7489774fd
Merge pull request #840 from Kienz/patch-2
...
`fabric.Observable.on` and `fabric.Observable.off` can add/remove multiple handlers (object with key/value pairs). Closes #838
2013-09-12 14:49:31 -07:00
Kienz
1e1adc7831
fabric.Observable.on and fabric.Observable.off can add/remove multiple handlers (object with key/value pairs)
...
Update jsdoc
Add unit tests
2013-09-12 20:43:31 +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
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
kangax
95c97f5447
[BACK_INCOMPAT] Object rotation now happens around originX/originY point UNLESS centerTransform=true. Version 1.2.12. Closes #439
2013-09-09 16:39:39 +02:00
kangax
bec5787267
Update docs
2013-09-09 02:42:16 +02:00
kangax
36cd31b7a3
Fix object:modified firing incorrectly with groups. Closes #717
2013-09-09 02:27:19 +02:00
kangax
0fc54d4f7f
Fix Point and Intersection docs. Build distribution.
2013-09-06 19:12:57 +02:00
Juriy Zaytsev
62740ff27b
Merge pull request #828 from bernardofd/master
...
Replace the Streams interface with FS.readFile() in asset loading on Node.js
2013-09-06 10:04:55 -07:00
Bernardo F. Domingues
806a44e3c3
Renaming "url" to "path" for clarity reasons
2013-09-06 11:39:28 -03:00
Bernardo Figuerêdo Domingues
67d1a4732c
Replacing Streams interface for FS.readFile to load assets in the Node.js module
2013-09-06 11:36:09 -03:00
Stefan Kienzle
d190c31e8b
Renamed fabric.Shadow.getShadow to fabric.Shadow.toString
2013-09-05 18:09:34 +02:00
Juriy Zaytsev
ed1c116793
Merge pull request #823 from Kienz/patch-1
...
[BACK_INCOMPAT] `fabric.Text.textShadow`was removed and `fabric.BaseBrush` shadow properties removed (new `fabric.BaseBrush.shadow`)
2013-09-03 12:27:13 -07:00
kangax
70213ea92f
Tweak build.js; build distribution
2013-09-03 21:23:35 +02:00
kangax
4559918688
Resolve conflicts
2013-09-03 21:18:29 +02:00
kangax
fc3bc45920
Fix text decoration offset for text with originY=top
2013-09-03 21:17:00 +02:00
Drew Lustro
1f993e92b8
requirejs support added via "requirejs" build.sh option
...
$ node build modules=ALL requirejs
- dist/all* is clean of changes
- fixed bug in build.sh that would prevent dist/all.require.js from compiling properly
- Updated test.js to include test_script.js fixtures
- NOTE: Qunit tests largely incompatible with requirejs version... need more
insight on how Qunit works to get fabric in the namespace since it is
no longer a global when built as an AMD module.
2013-09-03 14:15:12 -04:00
Kienz
b638487686
Performance optimization - removed senseless code
2013-09-03 19:18:16 +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
kangax
d7469c6a93
Make selectable=false objects propagate events through
2013-09-03 12:01:26 +02:00
kangax
ec32a3c399
Make on/off/trigger chainable
2013-09-03 11:52:10 +02:00
kangax
c262cd306d
When firing event, call handler in context of object firing event
2013-09-03 11:43:46 +02:00
kangax
28fa7a8b3f
Add fabric.Object#hoverCursor; just like fabric.Canvas#hoverCursor but on object level
2013-09-03 11:43:10 +02:00
kangax
e1df87c64c
Some (non-breaking) text changes to allow for more granular line height
2013-09-01 00:10:12 +02:00
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