You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the full saga, see this comment thread: #743 (comment)
The confusion comes from chaco defining its own AbstractOverlay which ends up calling the normal _draw method if its component is None. ie, chaco AbstractOverlays can be drawn standalone like any other component.
See:
The real question is, do all overlays in chaco need the ability to be drawn standalone? Some definitely do need to keep the _draw_overlay method as they do their own special things, eg Tooltip and its subclass DataLabel. However, it is unclear to me if PlotAxis or Grid actually need it. AFAICT, PlotAxis will always have its component set when used inside the chaco code base. I think its _draw_overlay method could be removed.
Note, this is overall probably low priority / the removals would only be to simplify code / make it more obvious what methods are for. Even if a method is unused, it isn't causing to much trouble. It may just be some added confusion for developers trying to distinguish which method does what / why both exist, etc.
More thorough documentation may be the simpler / less risky solution here.
The text was updated successfully, but these errors were encountered:
For the full saga, see this comment thread: #743 (comment)
The confusion comes from chaco defining its own
AbstractOverlay
which ends up calling the normal_draw
method if itscomponent
isNone
. ie, chacoAbstractOverlays
can be drawn standalone like any other component.See:
chaco/chaco/abstract_overlay.py
Lines 52 to 62 in 5d692b3
Conversely in enable:
https://github.com/enthought/enable/blob/6e1c93e9df2a6e37eb79b92a81696ac757392dce/enable/abstract_overlay.py#L84-L90
that is not the case, so it would not be necessary to have a
_draw_component
method on the class (since there is no code path where it would be called)The real question is, do all overlays in chaco need the ability to be drawn standalone? Some definitely do need to keep the
_draw_overlay
method as they do their own special things, egTooltip
and its subclassDataLabel
. However, it is unclear to me ifPlotAxis
orGrid
actually need it. AFAICT,PlotAxis
will always have itscomponent
set when used inside the chaco code base. I think its_draw_overlay
method could be removed.Note, this is overall probably low priority / the removals would only be to simplify code / make it more obvious what methods are for. Even if a method is unused, it isn't causing to much trouble. It may just be some added confusion for developers trying to distinguish which method does what / why both exist, etc.
More thorough documentation may be the simpler / less risky solution here.
The text was updated successfully, but these errors were encountered: