mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
Use eslint, add travis-ci
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import Transform from '../Transform';
|
||||
let pooledTransform = new Transform;
|
||||
import _ from 'lodash';
|
||||
let pooledTransform = new Transform();
|
||||
|
||||
function transformToMatrix(props) {
|
||||
let scaleX = props.scaleX != null ? props.scaleX :
|
||||
props.scale != null ? props.scale : 1;
|
||||
let scaleY = props.scaleY != null ? props.scaleY :
|
||||
props.scale != null ? props.scale : 1;
|
||||
let scaleX = !_.isNil(props.scaleX) ? props.scaleX :
|
||||
!_.isNil(props.scale) ? props.scale : 1;
|
||||
let scaleY = !_.isNil(props.scaleY) ? props.scaleY :
|
||||
!_.isNil(props.scale) ? props.scale : 1;
|
||||
|
||||
pooledTransform
|
||||
.transformTo(1, 0, 0, 1, 0, 0)
|
||||
@@ -13,7 +14,7 @@ function transformToMatrix(props) {
|
||||
.rotate(props.rotation || 0, props.originX, props.originY)
|
||||
.scale(scaleX, scaleY, props.originX, props.originY);
|
||||
|
||||
if (props.transform != null) {
|
||||
if (!_.isNil(props.transform)) {
|
||||
pooledTransform.transform(props.transform);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user