Ignore:
Timestamp:
Feb 9, 2016 10:23:21 PM (8 years ago)
Author:
dkearney
Message:

merging in placard configuration updates, placard example, feature select example, and add-remove layer example from geomap branch r5971,r5990,r5991,r5993

Location:
branches/blt4_geovis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4_geovis

  • branches/blt4_geovis/gui/scripts/mapviewer.tcl

    r5964 r5994  
    14271427
    14281428itcl::body Rappture::MapViewer::EnablePanningMouseBindings {} {
    1429     if {$_useServerManip} {
     1429    if {1 || $_useServerManip} {
    14301430        bind $itk_component(view) <ButtonPress-1> \
    14311431            [itcl::code $this MouseClick 1 %x %y]
     
    14511451
    14521452itcl::body Rappture::MapViewer::EnableRotationMouseBindings {} {
    1453     if {$_useServerManip} {
    1454         bind $itk_component(view) <ButtonPress-2> \
    1455             [itcl::code $this Rotate click %x %y]
    1456         bind $itk_component(view) <B2-Motion> \
    1457             [itcl::code $this Rotate drag %x %y]
    1458         bind $itk_component(view) <ButtonRelease-2> \
    1459             [itcl::code $this Rotate release %x %y]
    1460     } else {
     1453    if {1 || $_useServerManip} {
    14611454        # Bindings for rotation via mouse
    14621455        bind $itk_component(view) <ButtonPress-2> \
     
    14661459        bind $itk_component(view) <ButtonRelease-2> \
    14671460            [itcl::code $this MouseRelease 2 %x %y]
     1461    } else {
     1462        bind $itk_component(view) <ButtonPress-2> \
     1463            [itcl::code $this Rotate click %x %y]
     1464        bind $itk_component(view) <B2-Motion> \
     1465            [itcl::code $this Rotate drag %x %y]
     1466        bind $itk_component(view) <ButtonRelease-2> \
     1467            [itcl::code $this Rotate release %x %y]
    14681468    }
    14691469}
     
    14761476
    14771477itcl::body Rappture::MapViewer::EnableZoomMouseBindings {} {
    1478     if {$_useServerManip} {
     1478    if {1 || $_useServerManip} {
    14791479        bind $itk_component(view) <ButtonPress-3> \
    14801480            [itcl::code $this MouseClick 3 %x %y]
     
    17701770itcl::body Rappture::MapViewer::Pan {option x y} {
    17711771    switch -- $option {
    1772         "set" {
    1773             set w [winfo width $itk_component(view)]
    1774             set h [winfo height $itk_component(view)]
    1775             set x [expr $x / double($w)]
    1776             set y [expr $y / double($h)]
    1777             if {[expr (abs($x) > 0.0 || abs($y) > 0.0)]} {
    1778                 SendCmd "camera pan $x $y"
    1779             }
    1780             return
    1781         }
    17821772        "click" {
    17831773            set _click(x) $x
     
    18131803            $itk_component(view) configure -cursor ""
    18141804            set _b1mode ""
     1805        }
     1806        "set" {
     1807            set w [winfo width $itk_component(view)]
     1808            set h [winfo height $itk_component(view)]
     1809            set x [expr $x / double($w)]
     1810            set y [expr $y / double($h)]
     1811            if {[expr (abs($x) > 0.0 || abs($y) > 0.0)]} {
     1812                SendCmd "camera pan $x $y"
     1813            }
     1814            return
    18151815        }
    18161816        default {
     
    28842884            SendCmd "map layer opacity $style(-opacity) $layer"
    28852885        }
     2886    }
     2887
     2888    if {[info exists info(placard)]} {
     2889        array set placard [$dataobj getPlacardConfig $layer]
     2890        SendCmd [list placard config $placard(attrlist) $placard(style) $placard(padding) $layer]
    28862891    }
    28872892
Note: See TracChangeset for help on using the changeset viewer.