Commit c0639c0a by Lee Jaebin

#33088 3Dアクションを実行したが、メモのポップアップが表示される問題対応

parent 032eb0d4
......@@ -92,78 +92,76 @@ public class Action3DImageView extends ImageView implements OnTouchListener {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (mEventFlg == false) {
((ZoomRelativeLayout)v.getParent()).onTouchEvent(event);
} else {
if (((ZoomRelativeLayout)v.getParent()).isZooming() == false) {
if (mEventFlg) {
if (((ZoomRelativeLayout) v.getParent()).isZooming() == false) {
v.getParent().requestDisallowInterceptTouchEvent(true);
int x = (int) event.getRawX();
int y = (int) event.getRawY();
if (getTop() > y || getLeft() > x || (getLeft() + getWidth()) < x || (getTop() + getHeight()) < y) {
setEvent(false, img3dIcon);
return true;
}
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
mOffsetX = x;
mOffsetY = y;
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
setEvent(false, img3dIcon);
break;
case MotionEvent.ACTION_MOVE:
int diffX = mOffsetX - x;
int diffY = mOffsetY - y;
if (Math.abs(diffX) > MOVE_RANGE_X) {
if (diffX < 0) {
if (mCurrentJ < (maxJ - 1)) {
mCurrentJ++;
} else {
mCurrentJ = 0;
}
} else {
if (mCurrentJ > 0) {
mCurrentJ--;
case MotionEvent.ACTION_DOWN:
mOffsetX = x;
mOffsetY = y;
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
setEvent(false, img3dIcon);
break;
case MotionEvent.ACTION_MOVE:
int diffX = mOffsetX - x;
int diffY = mOffsetY - y;
if (Math.abs(diffX) > MOVE_RANGE_X) {
if (diffX < 0) {
if (mCurrentJ < (maxJ - 1)) {
mCurrentJ++;
} else {
mCurrentJ = 0;
}
} else {
mCurrentJ = maxJ - 1;
if (mCurrentJ > 0) {
mCurrentJ--;
} else {
mCurrentJ = maxJ - 1;
}
}
mOffsetX = x;
}
mOffsetX = x;
}
if (Math.abs(diffY) > MOVE_RANGE_Y) {
if (diffY < 0) {
if (mCurrentI < (maxI - 1)) {
mCurrentI++;
if (Math.abs(diffY) > MOVE_RANGE_Y) {
if (diffY < 0) {
if (mCurrentI < (maxI - 1)) {
mCurrentI++;
} else {
mCurrentI = 0;
}
} else {
mCurrentI = 0;
if (mCurrentI > 0) {
mCurrentI--;
} else {
mCurrentI = maxI - 1;
}
}
} else {
if (mCurrentI > 0) {
mCurrentI--;
} else {
mCurrentI = maxI - 1;
mOffsetY = y;
}
if (!(mCurrentI == mCurrentIBK && mCurrentJ == mCurrentJBK)) {
MeetingManager meetingManager = MeetingManager.getInstance();
if (meetingManager.isSendable()) {
JSONObject json = new JSONObject();
json.put(MeetingManager.FILE_NAME, FileUtil.getFileName(arrayImagePath[mCurrentI][mCurrentJ]));
meetingManager.sendWs(MeetingManager.CMD_3DVIEWACTION, mContentId, mPage, mObjectId, json);
}
setCurrentImagePath(arrayImagePath[mCurrentI][mCurrentJ]);
mCurrentIBK = mCurrentI;
mCurrentJBK = mCurrentJ;
}
mOffsetY = y;
}
if (!(mCurrentI == mCurrentIBK && mCurrentJ == mCurrentJBK)) {
MeetingManager meetingManager = MeetingManager.getInstance();
if (meetingManager.isSendable()) {
JSONObject json = new JSONObject();
json.put(MeetingManager.FILE_NAME, FileUtil.getFileName(arrayImagePath[mCurrentI][mCurrentJ]));
meetingManager.sendWs(MeetingManager.CMD_3DVIEWACTION, mContentId, mPage, mObjectId, json);
}
setCurrentImagePath(arrayImagePath[mCurrentI][mCurrentJ]);
mCurrentIBK = mCurrentI;
mCurrentJBK = mCurrentJ;
}
break;
break;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment