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
Andrea Bogazzi
5e0dc2211b
Update parser.js
...
Adding scaling of translating that was wiped by some commit
2014-08-05 12:42:58 +02:00
kangax
818ab118b3
JSCS changes; Prepare for JSCS ignore support; down to 51 failures
2014-08-03 16:47:27 +02:00
Andrea Bogazzi
221dc595a5
Update parser.js
2014-07-27 16:58:54 +02:00
Andrea Bogazzi
ce2530661c
Update parser.js
2014-07-26 19:19:22 +02:00
asturur
cf1aa0049a
Update parser.js
...
if we delete it , it won't pass to child graphic elements.
if this fillopacity is specified on a container element, it will change color of container element and then disappear. Color would then go to child element.
But if fill is specified on child element and fillopacity on parent element, this has to stay.
2014-07-21 06:47:40 +02:00
asturur
d78451a6b9
Update parser.js
...
Don't miss A tags, they behave like g tags.
2014-07-20 14:38:22 +02:00
asturur
85ba574458
Update parser.js
...
Restored parseUseDirectives functionality, maintaining getElementsByTagName and changing logic of running trought the list.
2014-07-20 13:44:44 +02:00
asturur
481b40549e
Update parser.js
...
I should not multiply the translating values.
Fixes mathformla that was still outside the screen
2014-07-20 13:36:52 +02:00
asturur
21591588d5
Update parser.js
...
remove statements (2?) for travis
2014-07-19 10:23:06 +02:00
asturur
12f5c6356e
Update parser.js
2014-07-18 20:42:21 +02:00
asturur
a52e081c25
Update parser.js
...
I forgot to delete one piece.
2014-07-18 20:07:24 +02:00
asturur
56b4caebbe
Update parser.js
2014-07-18 16:37:55 +02:00
kangax
3df3c396a2
Fix unit tests
2014-07-18 13:11:18 +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
5ca64ad636
Update parser.js
2014-07-17 16:25:59 +02:00
Stefan Kienzle
b34387d10e
JSDoc + JSCS tweaks - Part 1
2014-07-17 16:18:57 +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
kangax
69fdc220e1
Add JSDoc validation in JSCS. Few style/doc fixes.
2014-07-16 11:45:50 +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
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
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
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
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
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
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
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
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
kangax
c8164959c8
Add support for SVG "visibility: hidden"
2014-04-16 14:05:34 -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