Changeset 6365


Ignore:
Timestamp:
May 27, 2016, 12:52:40 AM (8 years ago)
Author:
ldelgass
Message:

Add -map option to MapViewer to replace view with a Map object. For use with a
forthcoming input map widget.

File:
1 edited

Legend:

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

    r6353 r6365  
    3636    inherit Rappture::VisViewer
    3737
     38    itk_option define -map map Map ""
    3839    itk_option define -plotforeground plotForeground Foreground ""
    3940    itk_option define -plotbackground plotBackground Background ""
     
    32933294    }
    32943295}
     3296
     3297# ----------------------------------------------------------------------
     3298# OPTION: -map
     3299# ----------------------------------------------------------------------
     3300itcl::configbody Rappture::MapViewer::map {
     3301    if {$itk_option(-map) != "" } {
     3302        if {[catch {$itk_option(-map) isa Rappture::Map} valid] != 0 || !$valid} {
     3303            error "bad value \"$itk_option(-map)\": should be Rappture::Map object"
     3304        }
     3305        $this clear
     3306        $this add $itk_option(-map)
     3307        $this scale $itk_option(-map)
     3308    } else {
     3309        $this clear
     3310    }
     3311
     3312    if { [isconnected] } {
     3313        $_dispatcher event -idle !rebuild
     3314    }
     3315}
Note: See TracChangeset for help on using the changeset viewer.