##// 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 230 * Show/Hide CodeMirror LineNumber
231 * @method show_line_number
231 * @method show_line_numbers
232 232 *
233 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 242 * @method toggle_line_numbers
243 243 **/
244 244 Cell.prototype.toggle_line_numbers = function () {
245 if (this.code_mirror.getOption('lineNumbers') == false) {
246 this.code_mirror.setOption('lineNumbers', true);
247 } else {
248 this.code_mirror.setOption('lineNumbers', false);
249 }
250 this.code_mirror.refresh();
245 var val = this.code_mirror.getOption('lineNumbers');
246 this.show_line_numbers(!val);
251 247 };
252 248
253 249 /**
General Comments 0
You need to be logged in to leave comments. Login now