From 0a6dc56b68eb9a19be4a671f2f5a47076003de0a Mon Sep 17 00:00:00 2001 From: Horcrux Date: Fri, 6 Jan 2017 14:57:06 +0800 Subject: [PATCH] Move serialize path to native side --- elements/Path.js | 4 +--- lib/attributes.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/elements/Path.js b/elements/Path.js index 85f72361..d8ff1678 100644 --- a/elements/Path.js +++ b/elements/Path.js @@ -1,5 +1,4 @@ import React, {PropTypes} from 'react'; -import SerializablePath from '../lib/SerializablePath'; import createReactNativeComponentClass from 'react-native/Libraries/Renderer/src/renderers/native/createReactNativeComponentClass'; import {PathAttributes} from '../lib/attributes'; import Shape from './Shape'; @@ -20,12 +19,11 @@ class Path extends Shape { render() { let props = this.props; - let d = new SerializablePath(props.d).toJSON(); return ( {this.root = ele;}} {...this.extractProps(props)} - d={d} + d={props.d} /> ); } diff --git a/lib/attributes.js b/lib/attributes.js index a74fd36f..90f5b039 100644 --- a/lib/attributes.js +++ b/lib/attributes.js @@ -99,9 +99,7 @@ const UseAttributes = merge({ }, RenderableAttributes); const PathAttributes = merge({ - d: { - diff: arrayDiffer - } + d: true }, RenderableAttributes); const TextAttributes = merge({