Tk Library Source Code

View Ticket
Login
Ticket UUID: 4e6715533c15534e6a9ed31321f18123ed12fc9b
Title: Arrow not drawn correctly in diagrams
Type: Bug Version: 1
Submitter: anonymous Created on: 2015-11-19 10:18:31
Subsystem: tklib :: diagrams Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2015-11-19 10:18:31
Resolution: None Closed By: nobody
    Closed on:
Description:
The following code produces a simple diagram with two boxes and two arrows. While superficially the arrows are created with a very similar command, the second one is drawn incorrectly:

package require diagram

pack [canvas .c -width 750 -height 800]

::diagram d .c {
   move to [350 20]

   set HYDRO [box "Hydrodynamic\nmodel"  width 200  justify center]

   set WQ    [box "Water quality\nmodel"  width 200  justify center  with north  at [[$HYDRO south] - [0 -100]]  ]
   arrow from [$HYDRO south] to [$WQ north]  text "Flow field"  textfont "Helvetica 12 italic"  rjust south

   set NEWPOS [[$WQ south] + [0 70]]
   arrow from [$WQ south] to $NEWPOS  text "Results"  textfont "Helvetica 12 italic"  rjust south
}