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);
@@ -427,6 +443,8 @@ export default {
setAnnotation,
tags,
setTags,
+ rightPanelElement,
+ scrollToTop,
connectionStore,
hasChanges,
hasInvalidConnections,
@@ -914,9 +932,6 @@ export default {
this.setCreator(creator);
}
},
- onActiveNode(nodeId) {
- this.$refs["right-panel"].scrollTop = 0;
- },
onInsertedStateMessages(insertedStateMessages) {
this.insertedStateMessages = insertedStateMessages;
this.hideModal();