Changeset 6258 for branches/blt4_trunk


Ignore:
Timestamp:
Apr 7, 2016 1:57:05 PM (8 years ago)
Author:
ldelgass
Message:

merge r6252:6257 from trunk (placard enable)

Location:
branches/blt4_trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4_trunk

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

    r6252 r6258  
    5555    public method disconnect {}
    5656    public method download {option args}
     57    public method placard {option args}
    5758    public method get {args}
    5859    public method isconnected {}
     
    989990
    990991# ----------------------------------------------------------------------
     992# USAGE: placard enable <state> <layerName>
     993#
     994# Clients use this method to enable/disable display of a feature placard
     995# when a feature is clicked/selected.
     996# ----------------------------------------------------------------------
     997itcl::body Rappture::MapViewer::placard {option args} {
     998    switch $option {
     999        enable {
     1000            if {[llength $args] != 2} {
     1001                error "wrong $ args: should be \"enable <boolean> <layerName>\""
     1002            }
     1003            set state [lindex $args 0]
     1004            set layerName [lindex $args 1]
     1005            if {![info exists _layers($layerName)]} {
     1006                error "Unknown layer \"$layerName\""
     1007            }
     1008            if {![string is boolean $state]} {
     1009                error "argument to placard enable must be boolean"
     1010            }
     1011            SendCmd "placard enable $state $layerName"
     1012        }
     1013        default {
     1014            error "bad option \"$option\": should be enable"
     1015        }
     1016    }
     1017}
     1018
     1019# ----------------------------------------------------------------------
    9911020# USAGE: download coming
    9921021# USAGE: download controls <downloadCommand>
Note: See TracChangeset for help on using the changeset viewer.