From 1241f2d671cd03d8f5f011fbc6859dc2a335630e Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Thu, 17 Dec 2015 12:53:22 -0500 Subject: [PATCH] Last selected styling --- notebook/static/notebook/js/notebook.js | 2 +- notebook/static/notebook/less/cell.less | 9 +++------ notebook/tests/notebook/multiselect.js | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index 250db8bf8e..ac019b3358 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -690,7 +690,7 @@ define(function (require) { var low = Math.min(i1, i2); var high = Math.max(i1, i2); this.get_cells().map(function(cell, index, all){ - if( low <= index && index <= high && low !== high){ + if( low <= index && index <= high ){ cell.element.addClass(_SOFT_SELECTION_CLASS); } else { cell.element.removeClass(_SOFT_SELECTION_CLASS); diff --git a/notebook/static/notebook/less/cell.less b/notebook/static/notebook/less/cell.less index 76fcb7ad65..974d99bc03 100644 --- a/notebook/static/notebook/less/cell.less +++ b/notebook/static/notebook/less/cell.less @@ -11,13 +11,14 @@ div.cell { .vbox(); .corner-all(); .border-box-sizing(); - + border-width: @cell_border_width; border-style: solid; border-color: transparent; width: 100%; padding: @_cell_padding_minus_border; + /* This acts as a spacer between cells, that is outside the border */ margin: 0px; outline: none; @@ -47,10 +48,6 @@ div.cell { } } - &.selected.jupyter-soft-selected { - ._selected_style(@selected_border_color, @soft_select_color, 7px, 0); - } - .edit_mode &.selected { border-color: @edit_mode_border_color; ._selected_style(@edit_mode_border_color, transparent, 5px, 0px); @@ -122,7 +119,7 @@ div.unrecognized_cell { // from text_cell padding: 5px @_cell_padding_minus_border 5px 0px; .hbox(); - + .inner_cell { .border-radius(@border-radius-base); padding: @_cell_padding_minus_border; diff --git a/notebook/tests/notebook/multiselect.js b/notebook/tests/notebook/multiselect.js index 2a7e48eed8..edc2dd4c11 100644 --- a/notebook/tests/notebook/multiselect.js +++ b/notebook/tests/notebook/multiselect.js @@ -23,7 +23,7 @@ casper.notebook_test(function () { }), 1, 'only one cell is selected programmatically'); this.test.assertEquals(this.evaluate(function() { - return $('.cell.jupyter-soft-selected, .cell.selected').length; + return $('.cell.jupyter-soft-selected').length; }), 1, 'one cell is selected'); this.test.assertEquals(this.evaluate(function() {