Fix expandAfter(), add workaround for first lines
Previously the method was missing the "replacedWith" workaround for first lines. Added a LoadHandler to make the table cell containing the avatar visible only when the avatar is loaded. Change-Id: Ie0c69e1e70f3e1c5f0b4347e003ba68263140a0a
This commit is contained in:
@@ -153,12 +153,22 @@ class SkipBar extends Composite {
|
||||
|
||||
private void expandAfter() {
|
||||
FromTo fromTo = marker.find();
|
||||
int start = fromTo.getFrom().getLine();
|
||||
int oldEnd = fromTo.getTo().getLine();
|
||||
int newEnd = oldEnd - NUM_ROWS_TO_EXPAND;
|
||||
marker.clear();
|
||||
marker = cm.markText(CodeMirror.pos(fromTo.getFrom().getLine()),
|
||||
CodeMirror.pos(newEnd),
|
||||
COLLAPSED);
|
||||
if (widget == null) { // First line workaround
|
||||
marker = cm.markText(CodeMirror.pos(-1),
|
||||
CodeMirror.pos(newEnd),
|
||||
Configuration.create()
|
||||
.set("inclusiveLeft", true)
|
||||
.set("inclusiveRight", true)
|
||||
.set("replacedWith", getElement()));
|
||||
} else {
|
||||
marker = cm.markText(CodeMirror.pos(start),
|
||||
CodeMirror.pos(newEnd),
|
||||
COLLAPSED);
|
||||
}
|
||||
updateSkipNum();
|
||||
cm.focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user