Skip to content

Commit

Permalink
Playground: hightlight line of sidebar inspector on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Cardiff committed Mar 31, 2016
1 parent ddd9105 commit fea2915
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/crystal/tools/playground/public/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ h4 {
width: 29px;
}

.CodeMirror .inspector-hover {
background-color: #eee;
}

.card-plain {
background: transparent;
box-shadow: none;
Expand Down
7 changes: 7 additions & 0 deletions src/compiler/crystal/tools/playground/public/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ Playground.Inspector = function(session, line) {
.css("cursor", "pointer");
session.sidebarDom.append(this.lineDom);

var INSPECTOR_HOVER_CLASS = "inspector-hover";
this.lineDom.hover(function(){
session.editor.addLineClass(line-1, "wrap", INSPECTOR_HOVER_CLASS);
}.bind(this), function(){
session.editor.removeLineClass(line-1, "wrap", INSPECTOR_HOVER_CLASS);
}.bind(this));

this.messages = [];
this.value_type = null; // null if mismatch. keep value if always the same.

Expand Down

0 comments on commit fea2915

Please sign in to comment.