forked from ipython-contrib/jupyter_contrib_nbextensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jürgen Hasch
committed
Apr 30, 2017
1 parent
b7d065d
commit 3c772a2
Showing
4 changed files
with
460 additions
and
254 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/jupyter_contrib_nbextensions/nbextensions/runtools/cellstate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
}); |
6 changes: 2 additions & 4 deletions
6
src/jupyter_contrib_nbextensions/nbextensions/runtools/gutter.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.CodeMirror-foldgutter { | ||
width: .9em; | ||
.CodeMirror-cellstate { | ||
width: 0.2em; | ||
} | ||
|
||
|
Oops, something went wrong.