Skip to content

Commit

Permalink
Enumerate bubbles
Browse files Browse the repository at this point in the history
Print the step number for each event in the bubble.
  • Loading branch information
bruntib committed Jun 7, 2017
1 parent fb12cea commit 875a2e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions www/scripts/codecheckerviewer/BugViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,14 @@ function (declare, dom, style, on, query, Memory, Observable, topic, entities,
addBubbles : function (bubbles) {
var that = this;

bubbles.forEach(function (bubble) {
bubbles.forEach(function (bubble, i) {
var left = that.codeMirror.defaultCharWidth() * bubble.startCol + 'px';
var enumeration = '<span class="enum">(' + (i + 1) + ')</span> ';

var element = dom.create('div', {
style : 'margin-left: ' + left,
class : 'checkMsg',
innerHTML : entities.encode(bubble.msg)
innerHTML : enumeration + entities.encode(bubble.msg)
});

that._lineWidgets.push(that.codeMirror.addLineWidget(
Expand Down
6 changes: 5 additions & 1 deletion www/style/codecheckerviewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ html, body {
border-radius: 5px;
}

.checkMsg .enum {
color: gray;
}

.editorHeader {
padding: 4px;
border-bottom: 1px solid lightgrey;
Expand Down Expand Up @@ -322,4 +326,4 @@ span[class*="severity-"]::before {

.customIcon.assume_switch {
color: #7f410c;
}
}

0 comments on commit 875a2e2

Please sign in to comment.