Commit graph

160 commits

Author SHA1 Message Date
Andrea Bogazzi
7dad30c156 support style merging from css (#3114)
* supportstylemerging
* added test
2016-07-18 08:56:40 +02:00
Andrea Bogazzi
98f2d1b3dd ignore svg namespace (#3081)
* ignore svg namespace
2016-07-03 23:52:25 +02:00
Andrea Bogazzi
489230bdf5 add callback with null argument to failed xml load (#2994) 2016-05-21 14:34:17 +02:00
Andrea Bogazzi
c4911406ac Fix createSVGFontFacesMarkup (#2935)
* Update parser.js
2016-05-03 14:05:17 +02:00
Andrea Bogazzi
a5192e487f Fix svg parsing/rendering regressions (#2887)
* fix regression in svg parsing
* Added tests to  catch regression

* Update parser.js

* Update parser.js
2016-04-13 01:44:15 +02:00
Andrea Bogazzi
ac92abc3fb Add font face markup for styles and all text classes 2016-02-18 11:10:24 +01:00
Juriy Zaytsev
9dfa164c16 Merge pull request #2738 from asturur/svg-pars
Svg pars
2016-02-01 01:43:13 -05:00
Todd Christensen
0cdd9416b6 Fallback to styleElement.text for IE9.
IE9 doesn't provide a `textContent` property on this object.  This caused
errors when trying to import SVG files with `<style>` inside them.
2016-01-26 10:51:14 -08:00
Andrea Bogazzi
55a106ea58 add optional space between transform list 2016-01-17 16:13:46 +01:00
Andrea Bogazzi
280746592c check for default color property if attribute is not present 2015-12-22 01:29:11 +01:00
Jim Rodovich
17c4962e19 Fix importing paths with rotate transforms with anchor coordinates. 2015-11-23 13:25:04 -06:00
Andrea Bogazzi
3520a51d21 Fix getElementByID polyfill and added failing test for it 2015-08-21 14:44:23 +02:00
Juriy Zaytsev
7c81f464b8 Merge pull request #2399 from asturur/parse-x-y-svg-atttrs
Parse x y svg attributes
2015-08-09 19:29:59 -04:00
Andrea Bogazzi
cf19c6f6cc Update parser.js 2015-08-10 01:21:56 +02:00
Andrea Bogazzi
0edd147b0e Update group.class.js 2015-08-08 14:30:24 +02:00
Andrea Bogazzi
f519bd422a Update parser.js 2015-07-17 11:36:41 +02:00
Andrea Bogazzi
d9d8c715fd Update parser.js 2015-07-17 09:48:46 +02:00
Andrea Bogazzi
2315fafde1 Update parser.js 2015-06-26 12:07:03 +02:00
sapics
7e9f17186f just code simpler 2015-06-11 11:16:41 +09:00
Andrea Bogazzi
3b460d9034 Fix fore removing last ; followed by spaces 2015-06-02 22:31:54 +02:00
Andrea Bogazzi
734cea4780 Update parser.js 2015-05-13 08:27:23 +02:00
Andrea Bogazzi
de4449231d Add alternative to get elementById 2015-05-13 07:53:13 +02:00
Paul Kaplan
34d490c1a0 Don't import elements declared within <metadata>
Some SVG files declare elements inside of the metadata block. Don’t
import them.
2015-04-28 16:12:50 -05:00
sapics
563ec42196 fix space and linebreak 2015-04-20 09:51:32 +09:00
Juriy Zaytsev
506f4dfa47 Merge pull request #2069 from asturur/svgParsing
Parse svg with 100% dimension or missing dimensions
2015-04-06 21:24:47 +02:00
Andrea Bogazzi
48e83f4a7a Update parser.js 2015-04-06 01:36:00 +02:00
Juriy Zaytsev
ebe2f687c1 Merge pull request #2075 from asturur/fixSVGimpor
Fix transform matrix of particular complex situation
2015-04-01 01:16:01 +02:00
Andrea Bogazzi
950fdbd89e Fix transform matrix of particular complex situation 2015-03-31 23:59:18 +02:00
Andrea Bogazzi
568e2ed2c0 attemp to fix jscs crash 2015-03-31 01:46:38 +02:00
kangax
220256c267 Extract regex out of method 2015-02-07 14:14:32 +01:00
Andrea Bogazzi
552c6a833c Update text.js 2014-10-28 17:12:10 +01:00
Andrea Bogazzi
c25a152bf9 Update parser.js 2014-10-20 00:51:50 +02:00
Andrea Bogazzi
30eaf11872 Update parser.js 2014-10-03 08:36:30 +02:00
Andrea Bogazzi
b2e2767053 Update getCssRule to exit on empty styles tag.
Test unit added.
2014-09-27 20:05:39 +02: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
Juriy Zaytsev
ec1db65110 Merge pull request #1694 from asturur/FillRule-misunderstanding
Fill rule misunderstanding
2014-09-23 11:32:06 +02:00
Andrea Bogazzi
af1138a686 Divided FillRule from globalCompositeOperation 2014-09-23 08:53:56 +02:00
kangax
0c41880e97 Add maximumLineLength restriction of 120 chars and space after comma 2014-09-22 20:40:39 +02:00
Andrea Bogazzi
eef80ebaf2 Update parser.js 2014-09-21 01:16:25 +02:00
Andrea Bogazzi
b43492554a Update parser.js
Added comment for future reference
2014-08-28 00:04:07 +02:00
Andrea Bogazzi
4c4ba5bfe0 Update parser.js
Added comment for future reference
2014-08-27 23:09:31 +02:00
Andrea Bogazzi
cd7bea6183 Update parser.js
Better than getting 0px width and height.
Specs say that when they are missing we should consider 100%, in our case 100% will be 100px because we don't have anything to compare the SVG to before adding the SVG into a canvas.
Otherwise we could take canvas widht and height.
2014-08-27 14:17:33 +02:00
Andrea Bogazzi
2fe200e178 Update parser.js
Forgot one variable.
2014-08-16 16:26:08 +02:00
Andrea Bogazzi
74a9ac9d48 Update parser.js
Changed variable names, For loop in While loop and typing error.
2014-08-16 16:18:48 +02:00
Andrea Bogazzi
78db91225f Update parser.js
Changed parsegradient to consider href element
2014-08-16 08:15:07 +02:00
Juriy Zaytsev
2cc901f2f7 Merge pull request #1595 from asturur/Load-Gradient-before-reviver
Load gradient before reviver
2014-08-13 19:14:48 +02:00
Andrea Bogazzi
e157437476 Update parser.js
Delete function from parser. moved in element parser.
2014-08-13 11:40:20 +02:00
Juriy Zaytsev
5e65dd54b2 Merge pull request #1574 from asturur/tag-symbol
Tag symbol
2014-08-09 00:31:17 +02:00
Andrea Bogazzi
ea942e3580 Update parser.js
This was missing.
Now if width and height get parse correctly.
They were even before but if it was  width 18pt ( so 18 * 1.33 pixels ) and wievbox was 18, before no scaling was calculated.
2014-08-07 16:23:09 +02:00
Andrea Bogazzi
8eaba61b17 Update parser.js
Add support to catch attributes from symbol nodes.
This is a quick hack.
To have full support symbol should managed as defs and then copied as g, without display attribute.
But before adding tons of code, let's just make it work.
2014-08-07 16:11:31 +02:00