Ignore:
Timestamp:
Nov 4, 2013, 10:49:37 AM (11 years ago)
Author:
ldelgass
Message:

Don't hard code map now that loading works. Send raw mouse coords instead of
normalized, since server is using a different event queue now.

File:
1 edited

Legend:

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

    r4020 r4031  
    716716        }
    717717
    718         SendCmd "renderer load /usr/share/osgearth/maps/gdal_tiff.earth"
    719 
    720718        set w [winfo width $itk_component(view)]
    721719        set h [winfo height $itk_component(view)]
     
    991989
    992990itcl::body Rappture::GeoViewer::MouseClick {button x y} {
     991    if {0} {
    993992    set w [winfo width $itk_component(view)]
    994993    set h [winfo height $itk_component(view)]
    995994    set x [expr {(2.0 * double($x)/$w) - 1.0}]
    996995    set y [expr {(2.0 * double($y)/$h) - 1.0}]
     996    }
    997997    SendCmd "mouse click $button $x $y"
    998998}
    999999
    10001000itcl::body Rappture::GeoViewer::MouseDoubleClick {button x y} {
     1001    if {0} {
    10011002    set w [winfo width $itk_component(view)]
    10021003    set h [winfo height $itk_component(view)]
    10031004    set x [expr {(2.0 * double($x)/$w) - 1.0}]
    10041005    set y [expr {(2.0 * double($y)/$h) - 1.0}]
     1006    }
    10051007    SendCmd "mouse dblclick $button $x $y"
    10061008}
    10071009
    10081010itcl::body Rappture::GeoViewer::MouseDrag {button x y} {
     1011    if {0} {
    10091012    set w [winfo width $itk_component(view)]
    10101013    set h [winfo height $itk_component(view)]
    10111014    set x [expr {(2.0 * double($x)/$w) - 1.0}]
    10121015    set y [expr {(2.0 * double($y)/$h) - 1.0}]
     1016    }
    10131017    SendCmd "mouse drag $button $x $y"
    10141018}
    10151019
    10161020itcl::body Rappture::GeoViewer::MouseRelease {button x y} {
     1021    if {0} {
    10171022    set w [winfo width $itk_component(view)]
    10181023    set h [winfo height $itk_component(view)]
    10191024    set x [expr {(2.0 * double($x)/$w) - 1.0}]
    10201025    set y [expr {(2.0 * double($y)/$h) - 1.0}]
     1026    }
    10211027    SendCmd "mouse release $button $x $y"
    10221028}
    10231029
    10241030itcl::body Rappture::GeoViewer::MouseMotion {x y} {
     1031    if {0} {
    10251032    set w [winfo width $itk_component(view)]
    10261033    set h [winfo height $itk_component(view)]
    10271034    set x [expr {(2.0 * double($x)/$w) - 1.0}]
    10281035    set y [expr {(2.0 * double($y)/$h) - 1.0}]
     1036    }
    10291037    SendCmd "mouse motion $x $y"
    10301038}
Note: See TracChangeset for help on using the changeset viewer.