diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-08 12:08:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-08 12:08:40 +0300 |
commit | 33882b0ed118afb7239b76a074f9ab7cf90558f3 (patch) | |
tree | 7637ebe087cb94c9d2b59b62af7ccbe45c9f191d /app/assets/javascripts/design_management/pages | |
parent | 028d8ac9fdde17782cc002563ecd7c5f77ea699f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/design_management/pages')
-rw-r--r-- | app/assets/javascripts/design_management/pages/design/index.vue | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/design_management/pages/design/index.vue b/app/assets/javascripts/design_management/pages/design/index.vue index c6225c516e2..705bc6fa528 100644 --- a/app/assets/javascripts/design_management/pages/design/index.vue +++ b/app/assets/javascripts/design_management/pages/design/index.vue @@ -40,6 +40,8 @@ import { trackDesignDetailView } from '../../utils/tracking'; import { DESIGNS_ROUTE_NAME } from '../../router/constants'; import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../../constants'; +const DEFAULT_SCALE = 1; + export default { components: { ApolloMutation, @@ -65,7 +67,7 @@ export default { comment: '', annotationCoordinates: null, errorMessage: '', - scale: 1, + scale: DEFAULT_SCALE, resolvedDiscussionsExpanded: false, }; }, @@ -157,6 +159,11 @@ export default { beforeDestroy() { Mousetrap.unbind('esc', this.closeDesign); }, + beforeRouteUpdate(to, from, next) { + // reset scale when the active design changes + this.scale = DEFAULT_SCALE; + next(); + }, methods: { addImageDiffNoteToStore( store, |