Commit c0639c0a by Lee Jaebin

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

parent 032eb0d4
...@@ -92,78 +92,76 @@ public class Action3DImageView extends ImageView implements OnTouchListener { ...@@ -92,78 +92,76 @@ public class Action3DImageView extends ImageView implements OnTouchListener {
@Override @Override
public boolean onTouch(View v, MotionEvent event) { public boolean onTouch(View v, MotionEvent event) {
if (mEventFlg == false) { if (mEventFlg) {
((ZoomRelativeLayout)v.getParent()).onTouchEvent(event); if (((ZoomRelativeLayout) v.getParent()).isZooming() == false) {
} else {
if (((ZoomRelativeLayout)v.getParent()).isZooming() == false) {
v.getParent().requestDisallowInterceptTouchEvent(true); v.getParent().requestDisallowInterceptTouchEvent(true);
int x = (int) event.getRawX(); int x = (int) event.getRawX();
int y = (int) event.getRawY(); int y = (int) event.getRawY();
if (getTop() > y || getLeft() > x || (getLeft() + getWidth()) < x || (getTop() + getHeight()) < y) { if (getTop() > y || getLeft() > x || (getLeft() + getWidth()) < x || (getTop() + getHeight()) < y) {
setEvent(false, img3dIcon); setEvent(false, img3dIcon);
return true; return true;
} }
switch (event.getAction()) { switch (event.getAction()) {
case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_DOWN:
mOffsetX = x; mOffsetX = x;
mOffsetY = y; mOffsetY = y;
break; break;
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_CANCEL:
setEvent(false, img3dIcon); setEvent(false, img3dIcon);
break; break;
case MotionEvent.ACTION_MOVE: case MotionEvent.ACTION_MOVE:
int diffX = mOffsetX - x; int diffX = mOffsetX - x;
int diffY = mOffsetY - y; int diffY = mOffsetY - y;
if (Math.abs(diffX) > MOVE_RANGE_X) { if (Math.abs(diffX) > MOVE_RANGE_X) {
if (diffX < 0) { if (diffX < 0) {
if (mCurrentJ < (maxJ - 1)) { if (mCurrentJ < (maxJ - 1)) {
mCurrentJ++; mCurrentJ++;
} else { } else {
mCurrentJ = 0; mCurrentJ = 0;
} }
} else {
if (mCurrentJ > 0) {
mCurrentJ--;
} else { } 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 (Math.abs(diffY) > MOVE_RANGE_Y) { if (mCurrentI < (maxI - 1)) {
if (diffY < 0) { mCurrentI++;
if (mCurrentI < (maxI - 1)) { } else {
mCurrentI++; mCurrentI = 0;
}
} else { } else {
mCurrentI = 0; if (mCurrentI > 0) {
mCurrentI--;
} else {
mCurrentI = maxI - 1;
}
} }
} else { mOffsetY = y;
if (mCurrentI > 0) { }
mCurrentI--; if (!(mCurrentI == mCurrentIBK && mCurrentJ == mCurrentJBK)) {
} else { MeetingManager meetingManager = MeetingManager.getInstance();
mCurrentI = maxI - 1; 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; break;
}
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;
} }
} }
} }
......
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