Skip to content

Use stacked layout utils from enable#673

Closed
rahulporuri wants to merge 1 commit into
masterfrom
ref/use-enable-layout-utils
Closed

Use stacked layout utils from enable#673
rahulporuri wants to merge 1 commit into
masterfrom
ref/use-enable-layout-utils

Conversation

@rahulporuri
Copy link
Copy Markdown
Contributor

This PR updates the stacked plot containers in chaco to use utils from enable. The utils seem to have been moved to enable a long time back but we just werent using them in chaco.

the utils seem to have been moved to enable a long time back but we dont
seem to be using them in chaco

note that there in one case the usage is slightly non-trivial because
the enable util wasnt handling all of the cases in chaco

	modified:   chaco/plot_containers.py
Comment thread chaco/plot_containers.py
)

return self._cached_preferred_size
return stacked_preferred_size(self, components=components)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there is some duplication here.

stacked_preferred_size does not handle the case where resizable="" - and we might want to update the underlying enable util to handle this case - but until then, we will have to explicitly handle the if self.fixed_preferred_size is not None: case AND the if self.resizable == "": case - and implicitly handle the if self.fixed_preferred_size is not None: case again inside the enable util, which will not do anything. under the circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant