Changeset 6124 for trunk/gui/scripts
- Timestamp:
- Mar 15, 2016, 2:21:58 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r6106 r6124 57 57 public method get {args} 58 58 public method isconnected {} 59 public method parameters {title args} { 60 # do nothing 61 } 59 public method parameters {title args} { # do nothing } 62 60 public method scale {args} 63 61 public method select {option {args ""}} … … 730 728 # USAGE: get ?-visible? 731 729 # USAGE: get ?-image view? 730 # USAGE: get ?-image legend <dataobj> <layer>? 732 731 # 733 732 # Clients use this to query the list of objects being plotted, in … … 800 799 } 801 800 -image { 802 if {[llength $args] != 2} { 803 error "wrong # args: should be \"get -image view\"" 804 } 805 switch -- [lindex $args end] { 801 if {[llength $args] < 2} { 802 error "wrong # args: should be \"get -image view|legend\"" 803 } 804 switch -- [lindex $args 1] { 805 legend { 806 if {[llength $args] < 4} { 807 error "wrong # args: should be \"get -image legend <dataobj> <layer>\"" 808 } 809 set dataobj [lindex $args 2] 810 set layer [lindex $args 3] 811 set colormap $layer 812 if {![$dataobj layer $layer shared]} { 813 set colormap $dataobj-$layer 814 set colormap "[regsub -all {::} ${colormap} {}]" 815 } 816 return $_image(legend-$colormap) 817 } 806 818 view { 807 819 return $_image(plot) 808 820 } 809 821 default { 810 error "bad image name \"[lindex $args end]\": should be view"822 error "bad image name \"[lindex $args 1]\": should be view|legend" 811 823 } 812 824 } 813 825 } 814 826 default { 815 error "bad option \"$op\": should be -objects or -image"827 error "bad option \"$op\": should be -objects, -hidden, -visible or -image" 816 828 } 817 829 }
Note: See TracChangeset
for help on using the changeset viewer.