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

Interaction handler keyboard handlers fix #3881

Merged
merged 9 commits into from
Nov 15, 2021

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Nov 8, 2021

Motivation and context

Resolved #3536
The problem was caused by creating new Canvas() instance on each GET_JOB_SUCCESS action. Keyboard handlers are registered in constructor, so each new Canvas produces new handler.
It was solved by additional destroy() canvas method which emits canvas.destroy and svgjs destroy events. Interacton hanlder keyboard handlers are removed in case of such events.

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

Copy link
Contributor

@ActiveChooN ActiveChooN left a comment

Choose a reason for hiding this comment

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

Please, add the canvas method to the README.md file and adjust package versions.

cvat-ui/src/reducers/annotation-reducer.ts Show resolved Hide resolved
ActiveChooN
ActiveChooN previously approved these changes Nov 11, 2021
@bsekachev bsekachev self-assigned this Nov 12, 2021
cvat-canvas/src/typescript/canvasView.ts Outdated Show resolved Hide resolved
cvat-canvas/src/typescript/interactionHandler.ts Outdated Show resolved Hide resolved
cvat-canvas/src/typescript/interactionHandler.ts Outdated Show resolved Hide resolved
cvat-canvas3d/src/typescript/canvas3dView.ts Outdated Show resolved Hide resolved
cvat-ui/src/actions/annotation-actions.ts Outdated Show resolved Hide resolved
cvat-ui/src/actions/boundaries-actions.ts Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@bsekachev bsekachev merged commit 14262fa into develop Nov 15, 2021
@bsekachev bsekachev deleted the kl/interaction-handler-listeners branch November 16, 2021 06:42
@nmanovic nmanovic mentioned this pull request Mar 4, 2022
7 tasks
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.

Interaction handler keyboard events are registered twice
3 participants