Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

feat: added zoom and pan for viewstate #73

Merged
merged 6 commits into from
Feb 18, 2020
Merged

Conversation

niekvanstaveren
Copy link
Collaborator

@niekvanstaveren niekvanstaveren commented Feb 17, 2020

When switching between edit and analysis mode everything will re-render now. Tried to keep the state but that did not really work for zooming/panning.

We might have another try later, but wanted to get the viewstate in for download/export at least

EDIT: We do keep the zoom pan state between edit and analysis mode now

src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated
@@ -48,7 +48,13 @@ export default function supernova(env) {
const [opts] = useState(options);
const selectionsAPI = useSelections();
const constraints = useConstraints();
const [selectionsAndTransform] = useState({ api: selectionsAPI, setState: setSelectionState, linked: false, transform: {} });
const [selectionsAndTransform] = useState({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes we would probably have to rename this one again! Any suggestions are welcome of course

Copy link
Collaborator

Choose a reason for hiding this comment

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

selectionAndTransformAndConstraints

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't think of anything on top of my head. Maybe something to indicate that is persisted and stuff can be update updated without reseting the entire object.

@niekvanstaveren niekvanstaveren merged commit ffb3905 into master Feb 18, 2020
@niekvanstaveren niekvanstaveren deleted the dvr/export-zoomstate branch February 18, 2020 12:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants