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

Turning off recording when leaving arbitrary modes #4211

Merged
merged 8 commits into from
Aug 12, 2019

Conversation

MichaelBuessemeyer
Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer commented Jul 29, 2019

This PR automatically turns off recording when switching from arbitrary mode to orthogonal mode.
This solves the issue when having recording enabled and then switching to orthogonal, moving around and then switching back to any arbitrary view mode a new node is created instantly.
Now the user has to turn on the recording on changing back to any arbitrary mode.

URL of deployed dev instance (used for testing):

Steps to test:

  1. Set some nodes in flight mode. (Recording = True)
  2. Switch to orthogonal mode.
  3. Move viewport some nanometers away from the original point.
  4. Switch back to orthogonal mode. --> a new node appears in the middle of the viewport.
    If this procedure is done while flight mode is in watching mode (not recording), then no new nodes are created.

Issues:


@MichaelBuessemeyer MichaelBuessemeyer changed the title turning off recording when leaving arbitrary modes Turning off recording when leaving arbitrary modes Jul 29, 2019
Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

Nice fix 👍

class ViewModesView extends PureComponent<Props, {}> {
blurElement = (event: SyntheticInputEvent<>) => {
event.target.blur();
};

handleChange = (mode: ViewMode) => {
// If we switch back from any arbitrary mode we stop recording.
// This prevents that when the user switches back to any flightmode,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// This prevents that when the user switches back to any flightmode,
// This prevents that when the user switches back to any arbitrary mode,

class ViewModesView extends PureComponent<Props, {}> {
blurElement = (event: SyntheticInputEvent<>) => {
event.target.blur();
};

handleChange = (mode: ViewMode) => {
// If we switch back from any arbitrary mode we stop recording.
// This prevents that when the user switches back to any flightmode,
// a new node is instantly created at the screens center.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// a new node is instantly created at the screens center.
// a new node is instantly created at the screen's center.

CHANGELOG.md Outdated
@@ -17,6 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
### Changed
- Volume project download zips are reorganized to contain a zipfile for each annotation (that in turn contains a data.zip and an nml file). [#4167](https://github.com/scalableminds/webknossos/pull/4167)
- Team managers and admins can now get tasks that they had previously cancelled. [#4088](https://github.com/scalableminds/webknossos/pull/4088)
- Automatically turning off recording for arbitrary modes when switching to orthogonal mode to prevent accidental creation of nodes when switching back to any arbitrary mode. [#4211](https://github.com/scalableminds/webknossos/pull/4211)
Copy link
Member

Choose a reason for hiding this comment

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

Arbitrary mode is probably hard to understand for our users, let's use the terms they know from the UI :)

Suggested change
- Automatically turning off recording for arbitrary modes when switching to orthogonal mode to prevent accidental creation of nodes when switching back to any arbitrary mode. [#4211](https://github.com/scalableminds/webknossos/pull/4211)
- Recording is now automatically turned off when switching from flight/oblique to orthogonal mode to prevent accidental node creation when switching back later. [#4211](https://github.com/scalableminds/webknossos/pull/4211)

@MichaelBuessemeyer MichaelBuessemeyer merged commit edb6087 into master Aug 12, 2019
@philippotto philippotto deleted the turnoff-recording-in-orthogonal branch June 14, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG Flight Mode not resetting to "Watching"
2 participants