Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence #17

Merged
merged 4 commits into from
Jun 13, 2018
Merged

Persistence #17

merged 4 commits into from
Jun 13, 2018

Conversation

Rich-Harris
Copy link
Member

This PR exposes a layout property on the Subdivide component, which makes it possible to save and restore layouts (e.g. by persisting to localStorage).

Individual panes need to implement their own init/restore logic, using the provided pane.id. Currently, these IDs are sequential, which is likely to cause confusion and bugs; it would be better if they were random.

Follow-ups to this PR:

  • Update the README
  • Generate random IDs (not sequential)
  • Simplify layout logic. There's no real reason for each pane to have x, y, w and h — it could just have e.g. pos and size.

@Rich-Harris Rich-Harris merged commit b6eee44 into master Jun 13, 2018
@Rich-Harris Rich-Harris deleted the persistence branch June 13, 2018 19:48
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