From b8bf8fbc183095dfe839b495b9eca0d96b011254 Mon Sep 17 00:00:00 2001 From: jaknapper Date: Mon, 28 Jul 2025 12:21:47 +0100 Subject: [PATCH 1/2] Log display pauses on hover --- .../labThingsComponents/actionLogDisplay.vue | 57 ++++++++++++++++++- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/webapp/src/components/labThingsComponents/actionLogDisplay.vue b/webapp/src/components/labThingsComponents/actionLogDisplay.vue index db8d4535..de02fcaa 100644 --- a/webapp/src/components/labThingsComponents/actionLogDisplay.vue +++ b/webapp/src/components/labThingsComponents/actionLogDisplay.vue @@ -1,4 +1,9 @@ @@ -35,6 +46,12 @@ export default { } }, + data() { + return { + userIsHovering: false, + }; + }, + watch: { log: function() { this.scrollToBottom(); @@ -45,9 +62,18 @@ export default { }, methods: { + onMouseEnter() { + this.userIsHovering = true; + }, + onMouseLeave() { + this.userIsHovering = false; + }, + scrollToBottom() { - this.$nextTick(function() { - let viewer = this.$refs.logContainer; + this.$nextTick(() => { + if (this.userIsHovering) return; + + const viewer = this.$refs.logContainer; viewer.scrollTop = viewer.scrollHeight; }); } @@ -56,13 +82,38 @@ export default { From a8137fc6a06545de2d2b28d067fa47f5180d326e Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Mon, 28 Jul 2025 12:03:21 +0000 Subject: [PATCH 2/2] Apply suggestions from code review of branch pause-logger Co-authored-by: Julian Stirling --- webapp/src/components/labThingsComponents/actionLogDisplay.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/src/components/labThingsComponents/actionLogDisplay.vue b/webapp/src/components/labThingsComponents/actionLogDisplay.vue index de02fcaa..1d111287 100644 --- a/webapp/src/components/labThingsComponents/actionLogDisplay.vue +++ b/webapp/src/components/labThingsComponents/actionLogDisplay.vue @@ -70,6 +70,7 @@ export default { }, scrollToBottom() { + /*Scroll to bottom of log unless the user is hovering over the log.*/ this.$nextTick(() => { if (this.userIsHovering) return;