Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangesetList.js
| Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | _getSelectionState: function() { | ||||
| return { | return { | ||||
| cursor: cursor, | cursor: cursor, | ||||
| items: items | items: items | ||||
| }; | }; | ||||
| }, | }, | ||||
| _setSelectionState: function(item, manager) { | _setSelectionState: function(item, manager) { | ||||
| this._cursorItem = item; | // If we had an inline selected before, we need to update it after | ||||
| // changing our selection to clear the selected state. Then, update the | |||||
| // new one to add the selected state. | |||||
| var old_inline = this.getSelectedInline(); | |||||
| this._cursorItem = item; | |||||
| this._redrawSelection(manager, true); | this._redrawSelection(manager, true); | ||||
| var new_inline = this.getSelectedInline(); | |||||
| if (old_inline) { | |||||
| old_inline.updateObjective(); | |||||
| } | |||||
| if (new_inline) { | |||||
| new_inline.updateObjective(); | |||||
| } | |||||
| return this; | return this; | ||||
| }, | }, | ||||
| _redrawSelection: function(manager, scroll) { | _redrawSelection: function(manager, scroll) { | ||||
| var cursor = this._cursorItem; | var cursor = this._cursorItem; | ||||
| if (!cursor) { | if (!cursor) { | ||||
| this.setFocus(null); | this.setFocus(null); | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 840 Lines • Show Last 20 Lines | |||||