mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-22 23:25:20 +00:00
refactor Use and Defs element with native code support(iOS)
This commit is contained in:
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
const merge = _.assign;
|
||||
|
||||
function arrayDiffer(a, b) {
|
||||
if (a == null || b == null) {
|
||||
if (_.isNil(a) || _.isNil(b) ) {
|
||||
return true;
|
||||
}
|
||||
if (a.length !== b.length) {
|
||||
@@ -79,6 +79,10 @@ const GroupAttributes = merge(NodeAttributes, {
|
||||
clipRule: true
|
||||
});
|
||||
|
||||
const UseAttributes = merge(RenderableAttributes, {
|
||||
href: true
|
||||
});
|
||||
|
||||
const PathAttributes = merge(RenderableAttributes, {
|
||||
d: {
|
||||
diff: arrayDiffer
|
||||
@@ -146,5 +150,6 @@ export {
|
||||
EllipseAttributes,
|
||||
ImageAttributes,
|
||||
LineAttributes,
|
||||
RectAttributes
|
||||
RectAttributes,
|
||||
UseAttributes
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user