Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangesetList.js
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | members: { | ||||
_cursorItem: null, | _cursorItem: null, | ||||
_focusNode: null, | _focusNode: null, | ||||
_focusStart: null, | _focusStart: null, | ||||
_focusEnd: null, | _focusEnd: null, | ||||
sleep: function() { | sleep: function() { | ||||
this._asleep = true; | this._asleep = true; | ||||
this._redrawFocus(); | |||||
}, | }, | ||||
wake: function() { | wake: function() { | ||||
this._asleep = false; | this._asleep = false; | ||||
this._redrawFocus(); | |||||
if (this._initialized) { | if (this._initialized) { | ||||
return; | return; | ||||
} | } | ||||
this._initialized = true; | this._initialized = true; | ||||
var pht = this.getTranslations(); | var pht = this.getTranslations(); | ||||
var label; | var label; | ||||
▲ Show 20 Lines • Show All 562 Lines • ▼ Show 20 Lines | setFocus: function(node, extended_node) { | ||||
this._redrawFocus(); | this._redrawFocus(); | ||||
}, | }, | ||||
_redrawFocus: function() { | _redrawFocus: function() { | ||||
var node = this._focusStart; | var node = this._focusStart; | ||||
var extended_node = this._focusEnd || node; | var extended_node = this._focusEnd || node; | ||||
var reticle = this._getFocusNode(); | var reticle = this._getFocusNode(); | ||||
if (!node) { | if (!node || this.isAsleep()) { | ||||
JX.DOM.remove(reticle); | JX.DOM.remove(reticle); | ||||
return; | return; | ||||
} | } | ||||
// Outset the reticle some pixels away from the element, so there's some | // Outset the reticle some pixels away from the element, so there's some | ||||
// space between the focused element and the outline. | // space between the focused element and the outline. | ||||
var p = JX.Vector.getPos(node); | var p = JX.Vector.getPos(node); | ||||
var s = JX.Vector.getAggregateScrollForNode(node); | var s = JX.Vector.getAggregateScrollForNode(node); | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |