summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-04-20 18:53:50 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-04-20 18:53:50 (GMT)
commit9447de912a7fc53ff78c6cb625cca037b41deb15 (patch)
tree0eb0d7fddc3274b9048988173fe60b6ab1ec243d /ds9
parent4e5a28bfee5ca393e23ca0e3dc30082e5880333d (diff)
downloadblt-9447de912a7fc53ff78c6cb625cca037b41deb15.zip
blt-9447de912a7fc53ff78c6cb625cca037b41deb15.tar.gz
blt-9447de912a7fc53ff78c6cb625cca037b41deb15.tar.bz2
enhance graphs
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/frame.tcl9
-rw-r--r--ds9/library/graph.tcl24
-rw-r--r--ds9/library/ime.tcl2
-rw-r--r--ds9/library/layout.tcl3
-rw-r--r--ds9/library/panner.tcl7
-rw-r--r--ds9/library/util.tcl2
6 files changed, 32 insertions, 15 deletions
diff --git a/ds9/library/frame.tcl b/ds9/library/frame.tcl
index 8cc24b9..8091c9e 100644
--- a/ds9/library/frame.tcl
+++ b/ds9/library/frame.tcl
@@ -578,8 +578,9 @@ proc EnterFrame {which x y} {
EnterInfoBox $which
UpdateInfoBox $which $x $y canvas
UpdatePixelTableDialog $which $x $y canvas
- UpdateGraphData $which $x $y canvas
+ UpdateGraphLayout $which
UpdateGraphAxis $which
+ UpdateGraphData $which $x $y canvas
UpdateMagnifier $which $x $y
if {$view(magnifier)} {
@@ -752,6 +753,8 @@ proc Button1Frame {which x y} {
UpdateColormapLevelMosaic $which $x $y canvas
UpdateInfoBox $which $x $y canvas
UpdatePixelTableDialog $which $x $y canvas
+ UpdateGraphLayout $which
+ UpdateGraphAxis $which
UpdateGraphData $which $x $y canvas
UpdateMagnifier $which $x $y
}
@@ -791,6 +794,8 @@ proc Button1Frame {which x y} {
UpdateColormapLevelMosaic $which $x $y canvas
UpdateInfoBox $which $x $y canvas
UpdatePixelTableDialog $which $x $y canvas
+ UpdateGraphLayout $which
+ UpdateGraphAxis $which
UpdateGraphData $which $x $y canvas
UpdateMagnifier $which $x $y
}
@@ -1922,6 +1927,8 @@ proc FrameToFront {} {
$which panner on
}
+ UpdateGraphLayout $which
+
UpdateDS9
}
diff --git a/ds9/library/graph.tcl b/ds9/library/graph.tcl
index 11e1fa1..f5795c1 100644
--- a/ds9/library/graph.tcl
+++ b/ds9/library/graph.tcl
@@ -348,7 +348,7 @@ proc ArrowKeyGraph {which x y horz} {
MotionGraph $which $cx $cy $horz
}
-proc LayoutGraphs {} {
+proc UpdateGraphLayout {which} {
global igraph
global ds9
@@ -357,6 +357,18 @@ proc LayoutGraphs {} {
global colorbar
global icolorbar
+ if {$which != {}} {
+ set frww [$ds9(canvas) itemcget $which -width]
+ set frhh [$ds9(canvas) itemcget $which -height]
+ set frxx [$ds9(canvas) itemcget $which -x]
+ set fryy [$ds9(canvas) itemcget $which -y]
+ } else {
+ set frww $canvas(width)
+ set frhh $canvas(height)
+ set frxx 0
+ set fryy 0
+ }
+
set cbh [expr $view(colorbar) && \
[string equal $colorbar(orientation) {horizontal}]]
set cbv [expr $view(colorbar) && \
@@ -365,8 +377,9 @@ proc LayoutGraphs {} {
set grv [expr $view(graph,vert)]
if {$grh} {
- set xx 0
+ set xx $frxx
set yy [expr $canvas(height) + $canvas(gap)]
+
if {$cbh} {
incr yy $icolorbar(horizontal,height)
}
@@ -381,7 +394,7 @@ proc LayoutGraphs {} {
$ds9(canvas) coords $igraph(horz,id) $xx $yy
}
- set ww [expr $canvas(width)+$igraph(gap,x)]
+ set ww [expr $frww+$igraph(gap,x)]
$ds9(graph,horz) configure -width $ww
} else {
if {$igraph(horz,id)>0} {
@@ -391,8 +404,9 @@ proc LayoutGraphs {} {
}
if {$grv} {
- set yy 0
+ set yy $fryy
set xx [expr $canvas(width) + $canvas(gap)]
+
if {$cbv} {
incr xx $icolorbar(vertical,width)
}
@@ -407,7 +421,7 @@ proc LayoutGraphs {} {
$ds9(canvas) coords $igraph(vert,id) $xx $yy
}
- set hh [expr $canvas(height)+$igraph(gap,y)]
+ set hh [expr $frhh+$igraph(gap,y)]
$ds9(graph,vert) configure -height $hh
} else {
diff --git a/ds9/library/ime.tcl b/ds9/library/ime.tcl
index d9c8870..0a2aabc 100644
--- a/ds9/library/ime.tcl
+++ b/ds9/library/ime.tcl
@@ -217,6 +217,8 @@ proc IMEKeyTask {which xx yy} {
UpdateColormapLevelMosaic $which $xx $yy canvas
UpdateInfoBox $which $xx $yy canvas
UpdatePixelTableDialog $which $xx $yy canvas
+ UpdateGraphLayout $which
+ UpdateGraphAxis $which
UpdateGraphData $which $xx $yy canvas
}
diff --git a/ds9/library/layout.tcl b/ds9/library/layout.tcl
index 4282a97..8421b5b 100644
--- a/ds9/library/layout.tcl
+++ b/ds9/library/layout.tcl
@@ -333,7 +333,8 @@ proc LayoutView {} {
LayoutButtons
LayoutFrames
LayoutColorbar
- LayoutGraphs
+
+ UpdateGraphLayout {}
}
proc LayoutViewAdjust {varname} {
diff --git a/ds9/library/panner.tcl b/ds9/library/panner.tcl
index 9c05da5..25a9324 100644
--- a/ds9/library/panner.tcl
+++ b/ds9/library/panner.tcl
@@ -137,7 +137,6 @@ proc EnterPanner {x y} {
EnterInfoBox $current(frame)
UpdateInfoBox $current(frame) $x $y panner
UpdatePixelTableDialog $current(frame) $x $y panner
- UpdateGraphData $current(frame) $x $y panner
}
}
@@ -177,7 +176,6 @@ proc MotionPanner {x y} {
UpdateColormapLevelMosaic $current(frame) $x $y panner
UpdateInfoBox $current(frame) $x $y panner
UpdatePixelTableDialog $current(frame) $x $y panner
- UpdateGraphData $current(frame) $x $y panner
}
}
@@ -206,7 +204,6 @@ proc Motion1Panner {x y} {
UpdateColormapLevelMosaic $current(frame) $x $y panner
UpdateInfoBox $current(frame) $x $y panner
UpdatePixelTableDialog $current(frame) $x $y panner
- UpdateGraphData $current(frame) $x $y panner
}
}
@@ -226,10 +223,8 @@ proc Release1Panner {x y} {
UpdateColormapLevelMosaic $current(frame) $x $y panner
UpdateInfoBox $current(frame) $x $y panner
UpdatePixelTableDialog $current(frame) $x $y panner
- UpdateGraphData $current(frame) $x $y panner
LockFrameCurrent
- UpdateGraphAxis $current(frame)
UpdatePanZoomDialog
SAMPSendCoordPointAtSkyCmd $current(frame)
}
@@ -246,10 +241,8 @@ proc Release2Panner {x y} {
UpdateColormapLevelMosaic $current(frame) $x $y panner
UpdateInfoBox $current(frame) $x $y panner
UpdatePixelTableDialog $current(frame) $x $y panner
- UpdateGraphData $current(frame) $x $y panner
LockFrameCurrent
- UpdateGraphAxis $current(frame)
UpdatePanZoomDialog
SAMPSendCoordPointAtSkyCmd $current(frame)
}
diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl
index 66c4a83..199b106 100644
--- a/ds9/library/util.tcl
+++ b/ds9/library/util.tcl
@@ -165,7 +165,7 @@ proc UpdateMain {} {
set x [lindex $coord 0]
set y [lindex $coord 1]
- # just in case we hae a mosaic
+ # just in case we have a mosaic
UpdateColormapLevelMosaic $current(frame) $x $y canvas
UpdatePixelTableDialog $current(frame) $x $y canvas
UpdateGraphData $current(frame) $x $y canvas