Added support for SVG clipPath element and clip-path attribute

This commit is contained in:
codesuki
2015-04-27 15:37:23 -07:00
committed by Ben Alpert
parent d359319073
commit e3cf48cd7f
4 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ thead time title tr track u ul var video wbr
The following SVG elements are supported:
```
circle defs ellipse g line linearGradient mask path pattern polygon polyline
circle clipPath defs ellipse g line linearGradient mask path pattern polygon polyline
radialGradient rect stop svg text tspan
```
@@ -77,7 +77,7 @@ There is also the React-specific attribute `dangerouslySetInnerHTML` ([more here
### SVG Attributes
```
cx cy d dx dy fill fillOpacity fontFamily fontSize fx fy gradientTransform
clip-path cx cy d dx dy fill fillOpacity fontFamily fontSize fx fy gradientTransform
gradientUnits markerEnd markerMid markerStart offset opacity
patternContentUnits patternUnits points preserveAspectRatio r rx ry
spreadMethod stopColor stopOpacity stroke strokeDasharray strokeLinecap
+1
View File
@@ -153,6 +153,7 @@ var ReactDOM = mapObject({
// SVG
circle: 'circle',
clipPath: 'clipPath',
defs: 'defs',
ellipse: 'ellipse',
g: 'g',
@@ -19,6 +19,7 @@ var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
var SVGDOMPropertyConfig = {
Properties: {
clipPath: MUST_USE_ATTRIBUTE,
cx: MUST_USE_ATTRIBUTE,
cy: MUST_USE_ATTRIBUTE,
d: MUST_USE_ATTRIBUTE,
@@ -64,6 +65,7 @@ var SVGDOMPropertyConfig = {
y: MUST_USE_ATTRIBUTE
},
DOMAttributeNames: {
clipPath: 'clip-path',
fillOpacity: 'fill-opacity',
fontFamily: 'font-family',
fontSize: 'font-size',
+1
View File
@@ -29,6 +29,7 @@ var shouldWrap = {
// Force wrapping for SVG elements because if they get created inside a <div>,
// they will be initialized in the wrong namespace (and will not display).
'circle': true,
'clipPath': true,
'defs': true,
'ellipse': true,
'g': true,