Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Do not invoke the tracking callback while the crosshairs are out of bounds. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | crosshair-bboxes-3603562 |
Files: | files | file ages | folders |
SHA1: | 9804fb212fc6a35c5d8e35bae67baa18ee0ff505 |
User & Date: | andreask 2013-02-25 20:13:56 |
Context
2013-03-11
| ||
20:05 | Merged latest crosshair work to the pending release. check-in: 22070c5233 user: andreask tags: tklib-0-6-rc | |
2013-02-25
| ||
20:13 | Do not invoke the tracking callback while the crosshairs are out of bounds. Closed-Leaf check-in: 9804fb212f user: andreask tags: crosshair-bboxes-3603562 | |
19:59 | Accepted changes by Frank Gover for robustness of bbox handles. Accepted plotchart based examples for multiple bounded crosshairs. check-in: 6548d8e6e5 user: andreask tags: crosshair-bboxes-3603562 | |
Changes
Changes to modules/crosshair/crosshair.tcl.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
array set opts $config($w) set x [$w canvasx $x] set y [$w canvasy $y] set opts(x) $x set opts(y) $y if {[GetBoundaries $w $x $y opts(x0) opts(y0) opts(x1) opts(y1)]} { # In bounds, create or move. Place $w opts } else { # We are out of bounds. Kill the crosshair. Kill $w opts } # Store changes back. set config($w) [array get opts] # And run the tracking callback, if active. if {![info exists opts(track)]} return uplevel \#0 [linsert $opts(track) end \ |
| < < < | > > > | > > > > > > > |
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
array set opts $config($w) set x [$w canvasx $x] set y [$w canvasy $y] set opts(x) $x set opts(y) $y if {![GetBoundaries $w $x $y opts(x0) opts(y0) opts(x1) opts(y1)]} { # We are out of bounds. Kill the crosshair, store changes, and # return. This last disables the use of the tracking # callback. The crosshairs track only inside the allowed # boxes. Kill $w opts # Store changes back. set config($w) [array get opts] return } # Inside the boundaries, create or move. Place $w opts # Store changes back. set config($w) [array get opts] # And run the tracking callback, if active. if {![info exists opts(track)]} return uplevel \#0 [linsert $opts(track) end \ |