@@ -54,14 +54,14 @@ const RADIALG_ATTS = CIRCLE_ATTS.concat(['id', 'gradientUnits']);
54
54
const STOP_ATTS = [ 'offset' ] ;
55
55
const ELLIPSE_ATTS = [ 'cx' , 'cy' , 'rx' , 'ry' ] ;
56
56
57
- const TEXT_ATTS = [ 'fontFamily' , 'fontSize' , 'fontWeight' ]
57
+ const TEXT_ATTS = [ 'fontFamily' , 'fontSize' , 'fontWeight' , 'textAnchor' ]
58
58
59
59
const POLYGON_ATTS = [ 'points' ] ;
60
60
const POLYLINE_ATTS = [ 'points' ] ;
61
61
62
62
const COMMON_ATTS = [ 'fill' , 'fillOpacity' , 'stroke' , 'strokeWidth' , 'strokeOpacity' , 'opacity' ,
63
63
'strokeLinecap' , 'strokeLinejoin' ,
64
- 'strokeDasharray' , 'strokeDashoffset' , 'x' , 'y' , 'rotate' , 'scale' , 'origin' , 'originX' , 'originY' ] ;
64
+ 'strokeDasharray' , 'strokeDashoffset' , 'x' , 'y' , 'rotate' , 'scale' , 'origin' , 'originX' , 'originY' , 'transform' , 'clipPath' ] ;
65
65
66
66
let ind = 0 ;
67
67
@@ -150,8 +150,8 @@ class SvgUri extends Component{
150
150
// Remove empty strings from children array
151
151
trimElementChilden ( children ) {
152
152
for ( child of children ) {
153
- if ( typeof child === 'string' ) {
154
- if ( child . trim . length === 0 )
153
+ if ( typeof child === 'string' ) {
154
+ if ( child . trim ( ) . length === 0 )
155
155
children . splice ( children . indexOf ( child ) , 1 ) ;
156
156
}
157
157
}
@@ -209,9 +209,6 @@ class SvgUri extends Component{
209
209
return < Polyline key = { i } { ...componentAtts } > { childs } </ Polyline > ;
210
210
case 'text' :
211
211
componentAtts = this . obtainComponentAtts ( node , TEXT_ATTS ) ;
212
- if ( componentAtts . y ) {
213
- componentAtts . y = fixYPosition ( componentAtts . y , node )
214
- }
215
212
return < Text key = { i } { ...componentAtts } > { childs } </ Text > ;
216
213
case 'tspan' :
217
214
componentAtts = this . obtainComponentAtts ( node , TEXT_ATTS ) ;
0 commit comments