|
|
@@ -172,8 +172,8 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
if (x > -maskWidth && x < screenWidth) { // holder 가 표시되는 부분에서만 계산
|
|
|
|
|
|
// modify itemView x -------------------------------------------------
|
|
|
- cx = x;
|
|
|
- ratio = (float) -cx / maskWidth;
|
|
|
+ cx = x + (maskWidth >> 1);
|
|
|
+ ratio = (float) -cx / (maskWidth >> 1);
|
|
|
|
|
|
if (ratio > 1) {
|
|
|
ratio = 1;
|
|
|
@@ -198,7 +198,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
*/
|
|
|
// x = 0 ~ screen.w - mask.w
|
|
|
ratio = (float) x / (screenWidth - maskWidth);
|
|
|
- tx = -((int) ((imageWidth - maskWidth) * ratio)); // image 이동 구간 0 ~ -image.w-mask.w
|
|
|
+ tx = -((int) ((imageWidth - maskWidth) * ratio)) - tx; // image 이동 구간 0 ~ -image.w-mask.w, 이미지 view 이동 구간 반영
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
@@ -207,7 +207,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
*/
|
|
|
// x = 0 ~ image.w - screen.w
|
|
|
ratio = (float) (maskWidth + x) / (maskWidth + screenWidth);
|
|
|
- tx = -((int) ((imageWidth + maskWidth) * ratio)) + maskWidth; // image 이동 구간 -image.w ~ mask.w
|
|
|
+ tx = -((int) ((imageWidth + maskWidth) * ratio)) + maskWidth - tx; // image 이동 구간 -image.w ~ mask.w, 이미지 view 이동 구간 반영
|
|
|
}
|
|
|
|
|
|
cx = (int) values[2];
|