Changeset 3534


Ignore:
Timestamp:
Mar 19, 2013, 1:00:50 AM (12 years ago)
Author:
ldelgass
Message:

Reset zoom/pan when clicking canonical view buttons in streamlines and vtk
drawing viewers. Isosurfaces and heightmaps will get the same behavior pending
some other fixes.

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkstreamlinesviewer.tcl

    r3517 r3534  
    18791879
    18801880    blt::table $inner \
    1881             0,0 $inner.view_l -anchor e -pady 2 \
    1882             0,1 $inner.view -anchor w -pady 2
     1881        0,0 $inner.view_l -anchor e -pady 2 \
     1882        0,1 $inner.view -anchor w -pady 2
    18831883
    18841884    set labels { qx qy qz qw xpan ypan zoom }
     
    24772477    $_arcball quaternion $q
    24782478    SendCmd "camera orient $q"
    2479 }
    2480 
     2479    SendCmd "camera reset"
     2480    set _view(xpan) 0
     2481    set _view(ypan) 0
     2482    set _view(zoom) 1.0
     2483}
     2484
  • trunk/gui/scripts/vtkviewer.tcl

    r3523 r3534  
    18201820
    18211821    blt::table $inner \
    1822             0,0 $inner.view_l -anchor e -pady 2 \
    1823             0,1 $inner.view -anchor w -pady 2
     1822        0,0 $inner.view_l -anchor e -pady 2 \
     1823        0,1 $inner.view -anchor w -pady 2
    18241824
    18251825    set labels { qx qy qz qw xpan ypan zoom }
     
    25002500    set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    25012501    $_arcball quaternion $q
    2502     SendCmd "camera orient $q"
    2503 }
    2504 
     2502    SendCmd "camera orient $q"
     2503    SendCmd "camera reset"
     2504    set _view(xpan) 0
     2505    set _view(ypan) 0
     2506    set _view(zoom) 1.0
     2507}
     2508
Note: See TracChangeset for help on using the changeset viewer.