Skip to content

Commit

Permalink
Merge branch 'release_24.0' into release_24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Jun 13, 2024
2 parents 5c68108 + d0ebd5a commit beb2820
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
@onUpgrade="onUpgrade" />
</div>
</div>
<div ref="right-panel" class="unified-panel-body workflow-right p-2">
<div ref="rightPanelElement" class="unified-panel-body workflow-right p-2">
<div v-if="!initialLoading">
<FormTool
v-if="hasActiveNodeTool"
Expand Down Expand Up @@ -184,7 +184,7 @@ import { useMagicKeys, whenever } from "@vueuse/core";
import { logicAnd, logicNot, logicOr } from "@vueuse/math";
import { Toast } from "composables/toast";
import { storeToRefs } from "pinia";
import Vue, { computed, nextTick, onUnmounted, ref, unref } from "vue";
import Vue, { computed, nextTick, onUnmounted, ref, unref, watch } from "vue";
import { getUntypedWorkflowParameters } from "@/components/Workflow/Editor/modules/parameters";
import { ConfirmDialog } from "@/composables/confirmDialog";
Expand Down Expand Up @@ -366,6 +366,22 @@ export default {
setTagsHandler.set(tags.value, newTags);
}
watch(
() => stateStore.activeNodeId,
() => {
scrollToTop();
}
);
const rightPanelElement = ref(null);
function scrollToTop() {
rightPanelElement.value?.scrollTo({
top: 0,
behavior: "instant",
});
}
const { comments } = storeToRefs(commentStore);
const { getStepIndex, steps } = storeToRefs(stepStore);
const { activeNodeId } = storeToRefs(stateStore);
Expand Down Expand Up @@ -427,6 +443,8 @@ export default {
setAnnotation,
tags,
setTags,
rightPanelElement,
scrollToTop,
connectionStore,
hasChanges,
hasInvalidConnections,
Expand Down Expand Up @@ -914,9 +932,6 @@ export default {
this.setCreator(creator);
}
},
onActiveNode(nodeId) {
this.$refs["right-panel"].scrollTop = 0;
},
onInsertedStateMessages(insertedStateMessages) {
this.insertedStateMessages = insertedStateMessages;
this.hideModal();
Expand Down

0 comments on commit beb2820

Please sign in to comment.