- int maxwidth = av.getAlignment().getWidth();
- int alheight = av.getAlignment().getHeight();
-
- if (av.hasHiddenColumns())
- {
- maxwidth = av.getAlignment().getHiddenColumns()
- .absoluteToVisibleColumn(maxwidth) - 1;
- }
+ int alignmentWidth = alignViewport.getAlignment().getWidth();
+ final int alheight = alignViewport.getAlignment().getHeight();
+
+
+// int annotationHeight = 0;
+
+ /* (former)
+ * assumption: SeqCanvas.calculateWrappedGeometry has been called
+ *
+ * was based on the fact that SeqCanvas was added as a child prior to IdCanvas,
+ * and children are processed in order of addition.
+ *
+ * It's probably fine. But...
+ *
+ */
+ SeqCanvas seqCanvas = alignViewport.getAlignPanel()
+ .getSeqPanel().seqCanvas;
+ // ...better: let's call it now
+ seqCanvas.calculateWrappedGeometry();