refactor shape elements add responder system.

refactor shape elements add responder system.
Just iOS.
This commit is contained in:
Horcrux
2016-05-15 00:40:43 +08:00
parent 1f7a908406
commit 8d01e8eccb
65 changed files with 2354 additions and 213 deletions

View File

@@ -2,14 +2,16 @@ import extractFill from './extractFill';
import extractStroke from './extractStroke';
import extractTransform from './extractTransform';
import extractClipping from './extractClipping';
import extractResponder from './extractResponder';
import _ from 'lodash';
export default function(props, options = {stroke: true, transform: true, fill: true}) {
export default function(props, options = {stroke: true, transform: true, fill: true, responder: true}) {
if (props.visible === false) {
return {
opacity: 0
};
}
let extractedProps = {
opacity: +props.opacity || 1
};
@@ -30,5 +32,9 @@ export default function(props, options = {stroke: true, transform: true, fill: t
extractedProps.transform = extractTransform(props);
}
if (options.responder) {
_.assign(extractedProps, extractResponder(props));
}
return extractedProps;
}