Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Chansuk Yang authored and Chansuk Yang committed Aug 23, 2012
1 parent 50cbf35 commit 1135c57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PZSGalleryLib/src/com/huewu/lib/view/PZSImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected void initGestureAction(float x, float y) {
protected void handleScale(MotionEvent event){
float newDist = spacing(event);
if( mOldDist == 0.f ){
//scale gesture action is just started.
//init values. scale gesture action is just started.
mOldDist = newDist;
midPoint(mMidPoint, event);
return;
Expand All @@ -194,6 +194,8 @@ protected void handleScale(MotionEvent event){
mCurrentMatrix.set(mSavedMatrix);
float scale = newDist / mOldDist;
mCurrentMatrix.postScale(scale, scale, mMidPoint.x, mMidPoint.y);

//should check zoom limitation.
setImageMatrix(mCurrentMatrix);
}
}
Expand Down

0 comments on commit 1135c57

Please sign in to comment.