Remove attributes already specified in the HTML config
Paul O’Shannessy committed
Mar 10, 2016 at 16:24 UTC
48a1cc52d72c13dc5312f5e4730fbfa6597db8d4
1 file changed
+15
-15
src/renderers/dom/shared/SVGDOMPropertyConfig.js
+15
-15
@@ -18,7 +18,21 @@ var NS = {
18
19
// We use attributes for everything SVG so let's avoid some duplication and run
20
// code instead.
21
-
21
+// The following are all specified in the HTML config already so we exclude here.
22
+// - class (as className)
23
+// - color
24
+// - height
25
+// - id
26
+// - lang
27
+// - max
28
+// - media
29
+// - method
30
+// - min
31
+// - name
32
+// - style
33
+// - target
34
+// - type
35
+// - width
36
var ATTRS = {
37
accentHeight: 'accent-height',
38
accumulate: 0,
@@ -42,12 +56,10 @@ var ATTRS = {
56
by: 0,
57
calcMode: 'calcMode',
58
capHeight: 'cap-height',
45
- class: 0,
59
clip: 0,
60
clipPath: 'clip-path',
61
clipRule: 'clip-rule',
62
clipPathUnits: 'clipPathUnits',
50
- color: 0,
63
colorInterpolation: 'color-interpolation',
64
colorInterpolationFilters: 'color-interpolation-filters',
65
colorProfile: 'color-profile',
@@ -102,10 +114,8 @@ var ATTRS = {
114
gradientTransform: 'gradientTransform',
115
gradientUnits: 'gradientUnits',
116
hanging: 0,
105
- height: 0,
117
horizAdvX: 'horiz-adv-x',
118
horizOriginX: 'horiz-origin-x',
108
- id: 0,
119
ideographic: 0,
120
imageRendering: 'image-rendering',
121
in: 0,
@@ -122,7 +132,6 @@ var ATTRS = {
132
keyPoints: 'keyPoints',
133
keySplines: 'keySplines',
134
keyTimes: 'keyTimes',
125
- lang: 0,
135
lengthAdjust: 'lengthAdjust',
136
letterSpacing: 'letter-spacing',
137
lightingColor: 'lighting-color',
@@ -138,12 +147,7 @@ var ATTRS = {
147
maskContentUnits: 'maskContentUnits',
148
maskUnits: 'maskUnits',
149
mathematical: 0,
141
- max: 0,
142
- media: 0,
143
- method: 0,
144
- min: 0,
150
mode: 0,
146
- name: 0,
151
numOctaves: 'numOctaves',
152
offset: 0,
153
opacity: 0,
@@ -210,11 +214,9 @@ var ATTRS = {
214
strokeMiterlimit: 'stroke-miterlimit',
215
strokeOpacity: 'stroke-opacity',
216
strokeWidth: 'stroke-width',
213
- style: 0,
217
surfaceScale: 'surfaceScale',
218
systemLanguage: 'systemLanguage',
219
tableValues: 'tableValues',
217
- target: 0,
220
targetX: 'targetX',
221
targetY: 'targetY',
222
textAnchor: 'text-anchor',
@@ -223,7 +225,6 @@ var ATTRS = {
225
textLength: 'textLength',
226
to: 0,
227
transform: 0,
226
- type: 0,
228
u1: 0,
229
u2: 0,
230
underlinePosition: 'underline-position',
@@ -244,7 +245,6 @@ var ATTRS = {
245
viewBox: 'viewBox',
246
viewTarget: 'viewTarget',
247
visibility: 0,
247
- width: 0,
248
widths: 0,
249
wordSpacing: 'word-spacing',
250
writingMode: 'writing-mode',