Skip to content

Commit

Permalink
margin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
milindrc committed Dec 30, 2019
1 parent 7157724 commit 5c66bbc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mosaic/src/main/java/com/matrixdev/mosaic/MosaicView.java
Original file line number Diff line number Diff line change
Expand Up @@ -475,21 +475,21 @@ private void addViewAt(int offSetX, int offSetY, Canvas canvas) {
}

private int getMargin(int offSet) {
if (offSet % 50 == 0) {
if (offSet % fullOffset == 0) {
if (offSet > 0) {
return 30 * (Math.abs(offSet) / fullOffset);
return 40 * (Math.abs(offSet) / fullOffset);
} else if (offSet == 0) {
return 0;
} else {
return -30 * (Math.abs(offSet) / fullOffset);
return -40 * (Math.abs(offSet) / fullOffset);
}
} else {
if (offSet > 0) {
return 15 * (Math.abs(offSet) / halfOffset);
return 20 * (Math.abs(offSet) / halfOffset);
} else if (offSet == 0) {
return 0;
} else {
return -15 * (Math.abs(offSet) / halfOffset);
return -20 * (Math.abs(offSet) / halfOffset);
}
}
}
Expand Down

0 comments on commit 5c66bbc

Please sign in to comment.