##// END OF EJS Templates
use show method in toggle method
Matthias BUSSONNIER -
Show More
@@ -228,7 +228,7 b' var IPython = (function (IPython) {'
228
228
229 /**
229 /**
230 * Show/Hide CodeMirror LineNumber
230 * Show/Hide CodeMirror LineNumber
231 * @method show_line_number
231 * @method show_line_numbers
232 *
232 *
233 * @param value {Bool} show (true), or hide (false) the line number in CodeMirror
233 * @param value {Bool} show (true), or hide (false) the line number in CodeMirror
234 **/
234 **/
@@ -242,12 +242,8 b' var IPython = (function (IPython) {'
242 * @method toggle_line_numbers
242 * @method toggle_line_numbers
243 **/
243 **/
244 Cell.prototype.toggle_line_numbers = function () {
244 Cell.prototype.toggle_line_numbers = function () {
245 if (this.code_mirror.getOption('lineNumbers') == false) {
245 var val = this.code_mirror.getOption('lineNumbers');
246 this.code_mirror.setOption('lineNumbers', true);
246 this.show_line_numbers(!val);
247 } else {
248 this.code_mirror.setOption('lineNumbers', false);
249 }
250 this.code_mirror.refresh();
251 };
247 };
252
248
253 /**
249 /**
General Comments 0
You need to be logged in to leave comments. Login now