Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#11 mouse shift-drag enhancement

closed
nobody
None
5
2008-08-14
2004-10-02
Won Kyu Park
No

mouse drag with a shiftkey enhancement

---------
Index:
src/org/openscience/jmol/viewer/managers/MouseManager.java
===================================================================
RCS file:
/cvsroot/jmol/Jmol/src/org/openscience/jmol/viewer/managers/MouseManager.java,v
retrieving revision 1.36
diff -u -r1.36 MouseManager.java
---
src/org/openscience/jmol/viewer/managers/MouseManager.java
19 Sep 2004 00:45:50 -0000 1.36
+++
src/org/openscience/jmol/viewer/managers/MouseManager.java
2 Oct 2004 19:53:07 -0000
@@ -298,6 +298,8 @@
viewer.zoomBy(deltaY);
// fall into
case SHIFT_RIGHT: // the one-button Mac folks
won't get this gesture
+ if (yCurrent > viewer.getScreenHeight() / 2)
+ deltaX*=-1;
viewer.rotateZBy(-deltaX);
break;
}
--------
mouse drag action to Zoom or Rotate is common action

people may drag down to zoom up and rotate it.
* drag down: updown gesture
* rotate: downside left right gesture
but, with left-right gesture it rotate counterclock wise.
clockwise is more intuitive action.

this patch fix like following:
upside gesture with viewer.rotateZBy(-deltaX)
downside gesiture with viewer.rotateZBy(deltaX)

Discussion

  • Miguel
    Miguel
    2004-10-02

    Logged In: YES
    user_id=1050060

    I am not convinced that this is a good change.

    It means that the meaning of the mouse gesture changes depending upon
    where the mouse is located.

    I suggest that you post a message to the jmol-users mailing list and ask
    people what they think.

     
  • Won Kyu Park
    Won Kyu Park
    2004-10-02

    Logged In: YES
    user_id=76597

    > It means that the meaning of the mouse gesture changes
    > depending upon where the mouse is located.

    Yes. but It is more confuse for people with *downside*
    left-right or right-left action. molecular expected to
    rotate along the mouse cursor movement but now, molecular
    rotate reversly

     
  • Won Kyu Park
    Won Kyu Park
    2004-10-02

    Logged In: YES
    user_id=76597

    you can test above simple patch at the following link:

    http://chemie.skku.ac.kr/wiki/jmol.html

     
  • Won Kyu Park
    Won Kyu Park
    2007-11-12

    Logged In: YES
    user_id=76597
    Originator: YES

    It also related with PR #1830041 :)

     
  • Bob Hanson
    Bob Hanson
    2007-11-12

    Logged In: YES
    user_id=1082841
    Originator: NO

    I've incorporated the equivalent of this in Jmol 11.3.44. It works perfectly, Miguel.

    Bob

     
  • Bob Hanson
    Bob Hanson
    2007-11-12

    Logged In: YES
    user_id=1082841
    Originator: NO

    My mistake -- thought this was 1039141. No action taken yet. Will review.

    Bob

     
  • Won Kyu Park
    Won Kyu Park
    2007-11-12

    Logged In: YES
    user_id=76597
    Originator: YES

    hmm...

    original post was not correct... :<

    I mean.. like as SHIFT-RIGHT action (PR #1830041), SHFIT-LEFT(*-LEFT click and drag) have to be fixed.

    ------------
    case SHIFT_LEFT:
    case ALT_SHIFT_LEFT:
    if (drawMode) {
    viewer.checkObjectDragged(previousDragX, previousDragY, deltaX, deltaY,
    modifiers);
    break;
    }
    case MIDDLE:
    // if (deltaY < 0 && deltaX > deltaY || deltaY > 0 && deltaX < deltaY)
    if (Math.abs(deltaY) > 5 * Math.abs(deltaX))
    viewer.zoomBy(deltaY);
    // if (deltaX < 0 && deltaY > deltaX || deltaX > 0 && deltaY < deltaX)
    if (Math.abs(deltaX) > 5 * Math.abs(deltaY)) {
    + if (yCurrent > viewer.getScreenHeight()/2) deltaX*=-1;
    viewer.rotateZBy(-deltaX);
    }
    break;
    case SHIFT_RIGHT:
    ----------

     
  • Bob Hanson
    Bob Hanson
    2008-08-14

    Logged In: YES
    user_id=1082841
    Originator: NO

    not implemented

     
  • Bob Hanson
    Bob Hanson
    2008-08-14

    • status: open --> closed