blob: abf71efe33471fa8af0ac1d3060c04268bd24a47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# this plugin adds arrowheads to the ends of cords when in editmode in
# order to show the direction that the messages are flowing
proc add_arrows_to_cords {mytoplevel} {
if { ! [winfo exists $mytoplevel] } {return}
if {$mytoplevel eq ".pdwindow"} {return}
set tkcanvas [tkcanvas_name $mytoplevel]
if {$::editmode($mytoplevel) == 1} {
$tkcanvas itemconfigure cord -arrow last
} else {
$tkcanvas itemconfigure cord -arrow none
}
}
bind all <<EditMode>> {+add_arrows_to_cords %W}
|