Current set of must-have SVG attributes / tag
The current set of SVG attributes / tag I felt like I needed them absolutely for my React/SVG editor app.
Sven Helmberger committed
Feb 6, 2014 at 05:18 UTC
0f0328f0930d7fcf0b92cde40b1d6966cd747054
2 files changed
+6
-1
src/browser/ReactDOM.js
+2
-1
@@ -184,7 +184,8 @@ var ReactDOM = mapObject({
184
rect: false,
185
stop: false,
186
svg: false,
187
- text: false
187
+ text: false,
188
+ tspan: false
189
}, createDOMComponentClass);
190
191
var injection = {
src/browser/ui/dom/SVGDOMPropertyConfig.js
+4
@@ -38,6 +38,7 @@ var SVGDOMPropertyConfig = {
38
gradientUnits: MUST_USE_ATTRIBUTE,
39
offset: MUST_USE_ATTRIBUTE,
40
points: MUST_USE_ATTRIBUTE,
41
+ preserveAspectRatio: MUST_USE_ATTRIBUTE,
42
r: MUST_USE_ATTRIBUTE,
43
rx: MUST_USE_ATTRIBUTE,
44
ry: MUST_USE_ATTRIBUTE,
@@ -45,6 +46,7 @@ var SVGDOMPropertyConfig = {
46
stopColor: MUST_USE_ATTRIBUTE,
47
stopOpacity: MUST_USE_ATTRIBUTE,
48
stroke: MUST_USE_ATTRIBUTE,
49
+ strokeDasharray: MUST_USE_ATTRIBUTE,
50
strokeLinecap: MUST_USE_ATTRIBUTE,
51
strokeWidth: MUST_USE_ATTRIBUTE,
52
textAnchor: MUST_USE_ATTRIBUTE,
@@ -61,9 +63,11 @@ var SVGDOMPropertyConfig = {
63
DOMAttributeNames: {
64
gradientTransform: 'gradientTransform',
65
gradientUnits: 'gradientUnits',
66
+ preserveAspectRatio: 'preserveAspectRatio',
67
spreadMethod: 'spreadMethod',
68
stopColor: 'stop-color',
69
stopOpacity: 'stop-opacity',
70
+ strokeDasharray: 'stroke-dasharray',
71
strokeLinecap: 'stroke-linecap',
72
strokeWidth: 'stroke-width',
73
textAnchor: 'text-anchor',