Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 267dc40

Browse files
committed
Fix: only log slidechange
We need to handle the slide event for smooth changes but they don’t need to be logged until the sliding is over. At this point a slidechange will be generated
1 parent a3716a9 commit 267dc40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

runestone/activecode/js/activecode.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,9 @@ export class ActiveCode extends RunestoneBase {
639639
let pos = $(scrubber).slider("value");
640640
let outOf = this.history.length;
641641
$(this.timestampP).text(`${curVal} - ${pos + 1} of ${outOf}`);
642-
if (ev !== null ) {
642+
// a slide will also result in a slidechange event we don't want to double
643+
// log these events. So do not log the slide until it stops and creates the changed
644+
if (ev !== null && ev.type != "slide") {
643645
this.logBookEvent({
644646
event: "activecode",
645647
act: "slide:" + curVal,

0 commit comments

Comments
 (0)