Skip to content

Commit 6bcc35d

Browse files
committed
Remove animateBounce and some coding style changes
1 parent 42f4481 commit 6bcc35d

1 file changed

Lines changed: 7 additions & 17 deletions

File tree

library/transform/ViewTransformer.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,11 @@ export default class ViewTransformer extends React.Component {
134134

135135
onLayout(e) {
136136
const {width, height} = e.nativeEvent.layout;
137-
if(width !== this.state.width || height !== this.state.height) {
137+
if (width !== this.state.width || height !== this.state.height) {
138138
this.setState({width, height});
139139
}
140140
this.measureLayout();
141141

142-
if (this.props.enableLimits) {
143-
setTimeout(() => this.animateBounce(), 1);
144-
}
145-
146142
this.props.onLayout && this.props.onLayout(e);
147143
}
148144

@@ -194,13 +190,12 @@ export default class ViewTransformer extends React.Component {
194190
let pivotY = gestureState.moveY - this.state.pageY;
195191

196192

197-
let rect = transformedRect(transformedRect(this.contentRect(), this.currentTransform()), new Transform(
198-
scaleBy, dx, dy,
199-
{
200-
x: pivotX,
201-
y: pivotY
202-
}
203-
));
193+
let rect = transformedRect(
194+
transformedRect(this.contentRect(), this.currentTransform()),
195+
new Transform(
196+
scaleBy, dx, dy, { x: pivotX, y: pivotY }
197+
)
198+
);
204199
transform = getTransform(this.contentRect(), rect);
205200
} else {
206201
if (Math.abs(dx) > 2 * Math.abs(dy)) {
@@ -251,11 +246,6 @@ export default class ViewTransformer extends React.Component {
251246
}
252247
}
253248

254-
255-
256-
257-
258-
259249
performFling(vx, vy) {
260250
let startX = 0;
261251
let startY = 0;

0 commit comments

Comments
 (0)