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

Commit 4d5db5b

Browse files
committed
Fix logging for codelens by creating an instance of RunestoneBase
1 parent bfc725a commit 4d5db5b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

runestone/codelens/js/codelens.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@
1212
return the buttons, but I'm having a hard time thinking of any other use for that besides mine.
1313
*/
1414
function attachLoggers(codelens, divid) {
15+
rb = new RunestoneBase();
1516
codelens.domRoot.find("#jmpFirstInstr").click(function () {
16-
logBookEvent({'event': 'codelens', 'act': 'first', 'div_id': divid});
17+
rb.logBookEvent({'event': 'codelens', 'act': 'first', 'div_id': divid});
1718
});
1819
codelens.domRoot.find("#jmpLastInstr").click(function () {
19-
logBookEvent({'event': 'codelens', 'act': 'last', 'div_id': divid});
20+
rb.logBookEvent({'event': 'codelens', 'act': 'last', 'div_id': divid});
2021
});
2122
codelens.domRoot.find("#jmpStepBack").click(function () {
22-
logBookEvent({'event': 'codelens', 'act': 'back', 'div_id': divid});
23+
rb.logBookEvent({'event': 'codelens', 'act': 'back', 'div_id': divid});
2324
});
2425
codelens.domRoot.find("#jmpStepFwd").click(function () {
25-
logBookEvent({'event': 'codelens', 'act': 'fwd', 'div_id': divid});
26+
rb.logBookEvent({'event': 'codelens', 'act': 'fwd', 'div_id': divid});
2627
});
2728
codelens.domRoot.find("#executionSlider").bind('slide', function (evt, ui) {
28-
logBookEvent({'event': 'codelens', 'act': 'slide', 'div_id': divid});
29+
rb.logBookEvent({'event': 'codelens', 'act': 'slide', 'div_id': divid});
2930
});
3031

3132
}

0 commit comments

Comments
 (0)