Skip to content

Commit

Permalink
fix button definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Jürgen Hasch committed Apr 30, 2017
1 parent b7d065d commit 3c772a2
Show file tree
Hide file tree
Showing 4 changed files with 460 additions and 254 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


CodeMirror.defineOption("cellstate", false, function(cm, val, old) {
if (old && old != CodeMirror.Init) {
cm.clearGutter(cm.state.cellState.options.gutter);
cm.state.cellState = null;
cm.off("gutterClick", onGutterClick);
cm.off("change", onChange);
cm.off("viewportChange", onViewportChange);
cm.off("swapDoc", onChange);
}
if (val) {
cm.state.cellState = new State(parseOptions(val));
updateInViewport(cm);
cm.on("gutterClick", onGutterClick);
cm.on("change", onChange);
cm.on("viewportChange", onViewportChange);
cm.on("swapDoc", onChange);
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.CodeMirror-foldgutter {
width: .9em;
.CodeMirror-cellstate {
width: 0.2em;
}


0 comments on commit 3c772a2

Please sign in to comment.