Number: 228
Title: dotty do not show changes in node attrs
Submitter: Salvador Cavadini
Date: 30/11/2002
Subsys: Dotty/Lneato/Lefty
Version: 1.8.10
System: Windows 9x
Severity: minor
when some nodes' properties are changes using "set attr" popup menu option, the changes are not visible until a "do layout" option execution. For example, if we set "shape=circle" for a ellipse shaped node, the node becomes a circle only after a "do layout".
[erg] To do a circle correctly, the graph needs to be laid out again, to get the correct node size and allow for adjacent ranks to move. Since dotty relies on the batch program dot for layout, it only does a layout when the user asks for it. Presumably, the dotty scripts could be changed to do a layout whenever an attribute change occurs.

Alternatively, the file dotty_draw.lefty in lib/lefty can be changed as shown. This may produce, however, a circle too large (or if '>' is changed to ',', a circle too small).

*** 295,300 ****
--- 295,304 ----
      pos = node.pos;
      size.x = node.size.x / 2;
      size.y = node.size.y / 2;
+     if ((node.attr.shape == 'circle') | (node.attr.shape == 'doublecircle')) {
+       if (size.x > size.y) size.y = size.x;
+         else size.x = size.y;
+     }
      if (~(label = node.attr.label) | label == 'N')
          label =;
      if ( == 'filled') {

Owner: *
Status: *