mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-19 21:45:10 +00:00
finish gradients refactor
This commit is contained in:
@@ -55,10 +55,12 @@ const RenderableOnlyAttributes = {
|
||||
fill: {
|
||||
diff: arrayDiffer
|
||||
},
|
||||
fillOpacity: true,
|
||||
fillRule: true,
|
||||
stroke: {
|
||||
diff: arrayDiffer
|
||||
},
|
||||
fillRule: true,
|
||||
strokeOpacity: true,
|
||||
strokeWidth: true,
|
||||
strokeLinecap: true,
|
||||
strokeLinejoin: true,
|
||||
@@ -109,6 +111,30 @@ const ClipPathAttributes = {
|
||||
name: true
|
||||
};
|
||||
|
||||
const LinearGradientAttributes = merge({
|
||||
x1: true,
|
||||
y1: true,
|
||||
x2: true,
|
||||
y2: true,
|
||||
gradient: {
|
||||
diff: arrayDiffer
|
||||
}
|
||||
}, ClipPathAttributes);
|
||||
|
||||
const RadialGradientAttributes = merge({
|
||||
fx: true,
|
||||
fy: true,
|
||||
rx: true,
|
||||
ry: true,
|
||||
cx: true,
|
||||
cy: true,
|
||||
r: true,
|
||||
gradient: {
|
||||
diff: arrayDiffer
|
||||
}
|
||||
}, ClipPathAttributes);
|
||||
|
||||
|
||||
const CircleAttributes = merge({
|
||||
cx: true,
|
||||
cy: true,
|
||||
@@ -146,7 +172,6 @@ const RectAttributes = merge({
|
||||
ry: true
|
||||
}, RenderableAttributes);
|
||||
|
||||
|
||||
export {
|
||||
PathAttributes,
|
||||
TextAttributes,
|
||||
@@ -158,5 +183,7 @@ export {
|
||||
LineAttributes,
|
||||
RectAttributes,
|
||||
UseAttributes,
|
||||
RenderableOnlyAttributes
|
||||
RenderableOnlyAttributes,
|
||||
LinearGradientAttributes,
|
||||
RadialGradientAttributes
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user