Skip to content

Conversation

@jkrumbiegel
Copy link
Member

@jkrumbiegel jkrumbiegel commented Jun 27, 2021

FigurePosition and FigureSubposition were mirroring GridPosition and GridSubposition from GridLayoutBase, with the only difference that they stored a Figure reference so they could be used in commands like Axis(f[1, 1]). What didn't work was plotting into similar looking GridPositions:

f = Figure()
f[1, 1] = gl = GridLayout()
Axis(gl[1, 1]) # would error because gl had no reference to f

This works now because GridLayouts have a parent field which can optionally be set to some parent object (usually a Figure) so that it's known who the GridLayout belongs to. I could delete all the mirrored code and gain some functionality, but it's of course slightly breaking, in case people were writing functions with FigurePosition or FigureSubposition arguments. These would need to be changed to GridPosition and GridSubposition. All other syntax stayed the same.

@jkrumbiegel jkrumbiegel merged commit 385358c into master Jul 5, 2021
@jkrumbiegel jkrumbiegel deleted the jk/remove-figureposition branch July 5, 2021 14:56
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.

2 participants