mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
Shrink indent_size / tabWidth
This commit is contained in:
@@ -8,6 +8,6 @@ root = true
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"trailingComma": "all",
|
||||
"tabWidth": 4
|
||||
"tabWidth": 2
|
||||
}
|
||||
|
||||
@@ -32,10 +32,7 @@ export default class SvgImage extends Shape {
|
||||
return (
|
||||
<RNSVGImage
|
||||
ref={this.refMethod}
|
||||
{...extractProps(
|
||||
{ ...propsAndStyles(props), x: null, y: null },
|
||||
this,
|
||||
)}
|
||||
{...extractProps({ ...propsAndStyles(props), x: null, y: null }, this)}
|
||||
x={x}
|
||||
y={y}
|
||||
width={width}
|
||||
|
||||
@@ -31,17 +31,12 @@ export default class Mask extends Shape {
|
||||
return (
|
||||
<RNSVGMask
|
||||
ref={this.refMethod}
|
||||
{...extractProps(
|
||||
{ ...propsAndStyles(props), x: null, y: null },
|
||||
this,
|
||||
)}
|
||||
{...extractProps({ ...propsAndStyles(props), x: null, y: null }, this)}
|
||||
x={x}
|
||||
y={y}
|
||||
width={width}
|
||||
height={height}
|
||||
maskTransform={extractTransform(
|
||||
maskTransform || transform || props,
|
||||
)}
|
||||
maskTransform={extractTransform(maskTransform || transform || props)}
|
||||
maskUnits={maskUnits !== undefined ? units[maskUnits] : 0}
|
||||
maskContentUnits={
|
||||
maskContentUnits !== undefined ? units[maskContentUnits] : 1
|
||||
|
||||
@@ -41,10 +41,7 @@ export default class Use extends Shape {
|
||||
return (
|
||||
<RNSVGUse
|
||||
ref={this.refMethod}
|
||||
{...extractProps(
|
||||
{ ...propsAndStyles(props), x: null, y: null },
|
||||
this,
|
||||
)}
|
||||
{...extractProps({ ...propsAndStyles(props), x: null, y: null }, this)}
|
||||
href={match}
|
||||
x={x}
|
||||
y={y}
|
||||
|
||||
@@ -46,10 +46,7 @@ export default {
|
||||
if (this.props.onResponderRelease) {
|
||||
return this.props.onResponderRelease(e);
|
||||
} else {
|
||||
return Touchable.Mixin.touchableHandleResponderRelease.call(
|
||||
this,
|
||||
e,
|
||||
);
|
||||
return Touchable.Mixin.touchableHandleResponderRelease.call(this, e);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -57,10 +54,7 @@ export default {
|
||||
if (this.props.onResponderTerminate) {
|
||||
return this.props.onResponderTerminate(e);
|
||||
} else {
|
||||
return Touchable.Mixin.touchableHandleResponderTerminate.call(
|
||||
this,
|
||||
e,
|
||||
);
|
||||
return Touchable.Mixin.touchableHandleResponderTerminate.call(this, e);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ function percentToFloat(percent) {
|
||||
}
|
||||
const matched = percent.match(percentReg);
|
||||
if (!matched) {
|
||||
console.warn(
|
||||
`"${percent}" is not a valid number or percentage string.`,
|
||||
);
|
||||
console.warn(`"${percent}" is not a valid number or percentage string.`);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ export default function extractResponder(props, ref) {
|
||||
if (hasTouchableProperty(props)) {
|
||||
responsible = true;
|
||||
Object.assign(extractedProps, {
|
||||
onStartShouldSetResponder:
|
||||
ref.touchableHandleStartShouldSetResponder,
|
||||
onStartShouldSetResponder: ref.touchableHandleStartShouldSetResponder,
|
||||
onResponderTerminationRequest:
|
||||
ref.touchableHandleResponderTerminationRequest,
|
||||
onResponderGrant: ref.touchableHandleResponderGrant,
|
||||
|
||||
Reference in New Issue
Block a user