Menu

#119 zoomTo, moveTo improvement

closed
None
5
2007-05-02
2007-03-08
friedar
No

It would be great if zoomTo and moveTo would

1 - check to see if they are already in the desired position before taking the time to make the move. IOW, if they are already at the desired zoom and center (for zoomTo) or already at the desired orientation etc. (for moveTo), then the command would be ignored. This would prevent the delay that currently occurs when a script calls for a smooth transition to a position that the molecule currently is in.

2- check to see if spin is on; if it is, stop spin, execute the command, and then resume the spin. An example of what happens currently with spin on when a zoomTo command is issued can be seen at:

http://moleculesinmotion.com/eric_jmol_tutorials/hemoglobin/hbsstruc.htm

by clicking on any button twice in a row. You will see that the structure wiggles around - this is because it is already at the desired zoom level. To see why I build in the zoomTo command, click any of buttons 1-4, then click any of buttons 5-8, or 10. The zoomTo is really meant for the transitions between those two groups of buttons, but leads to wiggling if you click the buttons in the same group consecutively.

To see the desired effect, click any of 5-8, then click 9 - an instant transition, no hesitation, no wiggling. (This script is not a solution to the problem - it has no zoomTo, so if it is clicked after any of buttons 1-4, the structure remains too zoomed out).

Discussion

  • Nobody/Anonymous

    Logged In: NO

    you should be able to check if spin is on using a script. I have to think if that is really possible -- it might not be, but in any case, it doesn't hurt to add "spin off" to any command on a page where spinning might be turned on. I think this is a web designer's responsibility -- if you make spinning readily available, make sure you supply code that turns it off when appropriate. The business with the molecule being in the correct position already, thus not appearing to respond but still setting the delay is an interesting problem. There might be something that can be done about that.

     
  • Bob Hanson

    Bob Hanson - 2007-05-01

    Logged In: YES
    user_id=1082841
    Originator: NO

    #1 is possible. I have to think of a measure that defines the scalar difference between two transformation matrices. Anyone?

    #2 is daunting -- they are different threads. Ah, but the spin thread might be able to pause if it detects that a zoomto operation is occurring. Let's try that.

     
  • Bob Hanson

    Bob Hanson - 2007-05-02

    Logged In: YES
    user_id=1082841
    Originator: NO

    I'm getting a broken gzip file for that molecule at

    http://moleculesinmotion.com/eric_jmol_tutorials/hemoglobin/hbsstruc.htm

    7zip can't extract the model either, so I think you just need to make that file again.

     
  • Bob Hanson

    Bob Hanson - 2007-05-02

    Logged In: YES
    user_id=1082841
    Originator: NO

    11.1.30 has all these features, including:

    zoomTo, moveTo no longer try to go to where the model already is. Actually, the move is made, but the
    number of seconds is set to 0, so it's instantaneous and not noticed.

    1-second delay for resume spinning after user drags model or zoomTo/moveTo is completed

    _spinning global variable:

    if(_spinning);do this;endif

     
  • Bob Hanson

    Bob Hanson - 2007-05-02
    • assigned_to: nobody --> hansonr
    • status: open --> closed
     
  • friedar

    friedar - 2007-05-02

    Logged In: YES
    user_id=1190355
    Originator: YES

    Sorry about the problem, please use this URL instead.
    http://www.umass.edu/molvis/tutorials/hemoglobin/hbsstruc.htm

     

Log in to post a comment.