Skip to content

Commit

Permalink
#14 bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoqiang committed Oct 22, 2014
1 parent 25fd1dd commit 587181e
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ public void onDraw(Canvas canvas) {
// We'll need this later
int oldCanvasSize = canvasSize;

// Compare canvas sizes
canvasSize = canvas.getWidth();
if(canvas.getHeight() < canvasSize)
canvasSize = canvas.getHeight();
canvasSize = getWidth() < getHeight() ? getWidth() : getHeight();

// Reinitialize shader, if necessary
if(oldCanvasSize != canvasSize)
Expand Down Expand Up @@ -400,4 +397,4 @@ public void refreshBitmapShader() {
public boolean isSelected() {
return this.isSelected;
}
}
}

0 comments on commit 587181e

Please sign in to comment.