Changeset 646 for trunk


Ignore:
Timestamp:
Mar 28, 2007, 2:04:44 PM (17 years ago)
Author:
mmc
Message:

Fixed a problem with zooming and dragging, when length scales of the
data were much larger or smaller than 1.

File:
1 edited

Legend:

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

    r645 r646  
    10221022                set w [winfo width $itk_component(plot)]
    10231023                set h [winfo height $itk_component(plot)]
    1024                 set dx [expr {double($x-$_click(x))/$w}]
    1025                 set dy [expr {double($y-$_click(y))/$h}]
     1024                set scalex [expr {$_limits(xmax)-$_limits(xmin)}]
     1025                set scaley [expr {$_limits(ymax)-$_limits(ymin)}]
     1026                set dx [expr {double($x-$_click(x))/$w*$scalex}]
     1027                set dy [expr {double($y-$_click(y))/$h*$scaley}]
    10261028
    10271029                if {$_dims == "2D"} {
Note: See TracChangeset for help on using the changeset viewer.