Commit graph

98 commits

Author SHA1 Message Date
Andrea Bogazzi
0e261137ca
fixing path exports to SVG (#5438)
* fixing path exports to SVG

* extend svg import tests

* added a failing test for the SVG export

* more tests for polygons
2018-12-25 21:58:13 +01:00
Andrea Bogazzi
aadfea00fa
various small svg fixes (#5424)
* various small svg fixes

* no debugger

* fontsize parsing fix - again

* added a visual test

* use min 9px

* added comment
2018-12-09 23:13:27 +01:00
Andrea Bogazzi
a7ff2bfb10
Rework SVG code to have clipPath friendly transformations (#5284)
* so far i think i broke everything

* halp super hard

* this is what i wanted

* fixed error

* some fixes

* svg-working

* less code

* fixed shadow for text and groups

* fixed tests

* one file test more

* fixed lint

* works

* ok more tests

* remove a lint issue

* removed unused method
2018-10-07 15:43:37 -04:00
Andrea Bogazzi
2a476e4277
Clip path parsing (#4786)
* first pass done

* restarted-clippaths

* some changes to element parser

* shared attribute

* done one piece

* cleaned

* mmm going there

* so far so good

* a very first draft

* removed dist

* sovled conflict

* now solved

* now solved

* some improvements

* toObject and fromObject added

* toObject and fromObject added

* more small changes

* added simple tests

* bumpedup qunit

* a test for svg export

* no ist

* more svg exporpt

* fix lint

* make possible to clip canvas

* improved JSOCS

* no builds

* invalidate cache anyway

* changes

* changes

* changes

* mmm working
2018-08-23 01:06:07 +02:00
Andrea Bogazzi
c975247db8
removed array reference for _dimensionsAffectingProps (#4465)
* removed array reference

* better to concat

* better visibility
2017-11-17 19:45:48 +01:00
Stefan Hayden
0fc71349a6 Paint order (#4303)
* makes fabric aware of the paint-order svg2 spec to swap the paint order of stroke and fill
2017-09-17 22:47:35 +02:00
Andrea Bogazzi
c03111824c Update deps (#4315)
* try replace tests
* modified tests for new qunit
* lint tests
2017-09-17 11:44:57 +02:00
Andrea Bogazzi
77632c6e0e fixed svg import again (#4196) 2017-08-14 09:35:19 +02:00
Andrea Bogazzi
5a791a8291 fixed origins (#4170)
* fixed origins

* fixed origins
2017-08-04 11:20:50 +02:00
Andrea Bogazzi
5367cfa8e3 Add tests for sourcePath changes (#4108)
* modified path
* added tests
2017-07-18 08:38:19 +02:00
Justin Parker
6702fe6dc6 Use generic setter for sourcePath (#4093) 2017-07-15 13:37:36 +02:00
Andrea Bogazzi
7a88afb2d3 Fix some caching in group issues related to deep checks (#4032)
* backport
* better fix
2017-06-24 23:10:55 +02:00
Stefan Hayden
a1ccf7155b path is the only object that inherits from Object but does not call super. it should also call super for consistancey and to allow overriding of the object initialize prototype (#4005) 2017-06-14 18:31:42 +02:00
Andrea Bogazzi
145bd3b03f Force async (#3996)
* removed forced async
* tests
* fixed lint
2017-06-11 21:36:51 +02:00
Andrea Bogazzi
69f37b0a4f restored path restore from string 2017-06-11 18:15:29 +02:00
Andrea Bogazzi
cd18c1501f removed extra creations (#3985) 2017-06-07 14:19:46 +02:00
Andrea Bogazzi
7517b951ab Remove PathGroups for Groups. (#3969)
* removed pathGroups
2017-06-01 11:02:32 +02:00
Andrea Bogazzi
ff2909ebf8 fixed cache for first draw (#3870)
* fixed cache for first draw

* fixed tests
2017-04-23 13:44:22 +02:00
by12
a7ff845165 Update path.class.js (#3774) 2017-03-14 21:42:07 +01:00
Andrea Bogazzi
f85bdc75c6 Update path.class.js (#3713) 2017-02-19 17:29:03 -05:00
Andrea Bogazzi
5cd1111195 fix reload from json (#3691)
* fix reload from json

* fix just on path
2017-02-14 00:40:02 -05:00
Andrea Bogazzi
edb90be547 WIP Patternload (#3598)
* make pattern load async
* made all object loadable asyncronously ( filters )
2016-12-30 22:41:16 +01:00
Andrea Bogazzi
3c0fe81b77 be more strict on when not to re render (#3594)
* add more check to first return false

* fix ;

* fix ; in tests

* fix test
2016-12-28 13:22:23 +01:00
Andrea Bogazzi
81609a85fb Fixestocachepolygon (#3490)
* fixes polygon and other subclasses
* fixed polygon fill
2016-12-03 22:53:51 +01:00
Andrea Bogazzi
9422fd39be Objectcaching (#3317) 2016-11-13 21:00:10 +01:00
Andrea Bogazzi
c5f60743f5 To object origin (#3416)
* deleted double default cleaning
* rework object export
* fixed tests
* fix fabric2 api change.
* removed unused var
2016-11-12 23:54:42 +01:00
Andrea Bogazzi
876c9ca91f Uniform clone and fromObject behaviour (#3212) 2016-09-10 16:09:17 +02:00
Andrea Bogazzi
08f60adbea switch to eslint (#3229)
* switch to eslint 2.x
* fix src
* fix tests
2016-09-10 15:14:23 +02:00
Andrea Bogazzi
9980c83fb9 move the pathCommands out of render
makes easier to override, extend the class.
2016-07-22 11:10:30 +02:00
Andrea Bogazzi
eb9b7f45b9 Add ID to svg export (#2993) 2016-05-21 15:07:04 +02:00
Andrea Bogazzi
f88711a526 Docs links, remove last forward slash (#2917) 2016-04-28 23:33:40 +02:00
Andrea Bogazzi
d36945f6e2 Update path.class.js 2015-07-15 16:50:25 +02:00
sapics
d922771915 Add @param comment 2015-04-16 18:47:04 +09:00
sapics
64529b4562 fix of @asturur suggestion 2015-04-16 18:31:52 +09:00
sapics
05316fc0f9 fix path initialize function for option left=0 or top=0 2015-04-16 17:11:06 +09:00
Andrea Bogazzi
d593d209aa Update path.class.js 2015-04-08 08:20:49 +02:00
Andrea Bogazzi
a7271aaf9f Update path.class.js 2015-04-04 13:50:39 +02:00
kangax
db8aa87dae Extract method from fabric.Path#initialize 2015-02-07 13:47:08 +01:00
Juriy Zaytsev
49d68723cb Merge pull request #1935 from asturur/shoadow2
Missing space was breaking path single shape export.
2015-01-20 01:51:41 +01:00
Andrea Bogazzi
79d9618352 Fix single path toSVG export. 2015-01-20 01:49:16 +01:00
Jim Rodovich
c71b1378df Make corresponding fixes for relative curve bounding box calculations. 2015-01-08 09:46:10 -06:00
Jim Rodovich
e83816446c Fix else style. 2015-01-07 18:34:56 -06:00
Jim Rodovich
cf344c2ba7 Fix reflecting relative quadratic curves after absolute quadratic curves. 2015-01-07 17:36:43 -06:00
Jim Rodovich
aee62cb047 Don't let cubic or distant-past curves infect reflected quadratic curves. 2015-01-07 17:34:30 -06:00
Jim Rodovich
c96c6b27f7 Don't let quadratic curves infect reflected cubic curves. 2015-01-07 17:34:30 -06:00
Andrea Bogazzi
cf3bd70479 Update path.class.js 2014-11-05 19:56:12 +01:00
Andrea Bogazzi
f8e6ae9461 Update parser.js
Allow first example of stroke svg import to work properly
2014-09-26 09:52:33 +02:00
Andrea Bogazzi
71aea4db4d Update path.class.js 2014-09-18 14:51:46 +02:00
Andrea Bogazzi
4e737abcde Update path.class.js
Fixes == with ===
2014-09-13 14:05:12 +02:00
Andrea Bogazzi
28784dc9b3 Update path.class.js
Like any other shape in fabric, when exported to svg, the shape has to be translated around origin.
This additional translation brings it there.

Fixes svg export of paths OUTSIDE of path-gropus. Inside was already ok.
2014-09-13 13:14:58 +02:00