Skip to content

Commit

Permalink
边移动限制
Browse files Browse the repository at this point in the history
  • Loading branch information
bingming.yu committed Aug 16, 2018
1 parent 1b3fb81 commit b98b26a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ private void movePoint(Point point, int xoff, int yoff){
if (point == null) return;
int x = point.x + xoff;
int y = point.y + yoff;
if (x < 0 || x > getDrawable().getIntrinsicWidth()) return;
if (y < 0 || y > getDrawable().getIntrinsicHeight()) return;
point.x = x;
point.y = y;
}
Expand Down

0 comments on commit b98b26a

Please sign in to comment.