mirror of
https://github.com/dart-lang/sdk
synced 2024-10-05 02:29:56 +00:00
Fix links to script + line.
R=johnmccutchan@google.com Review URL: https://codereview.chromium.org//1286943005 .
This commit is contained in:
parent
62dbce8555
commit
919f79e044
|
@ -332,7 +332,7 @@ class ScriptInsetElement extends ObservatoryElement {
|
|||
}
|
||||
|
||||
void _scrollToCurrentPos() {
|
||||
var line = querySelector('#${makeLineId(_currentLine)}');
|
||||
var line = shadowRoot.getElementById(makeLineId(_currentLine));
|
||||
if (line != null) {
|
||||
line.scrollIntoView();
|
||||
}
|
||||
|
@ -411,14 +411,19 @@ class ScriptInsetElement extends ObservatoryElement {
|
|||
computeAnnotations();
|
||||
|
||||
var table = linesTable();
|
||||
var firstBuild = false;
|
||||
if (container == null) {
|
||||
// Indirect to avoid deleting the style element.
|
||||
container = new DivElement();
|
||||
shadowRoot.append(container);
|
||||
firstBuild = true;
|
||||
}
|
||||
container.children.clear();
|
||||
container.children.add(table);
|
||||
makeCssClassUncopyable(table, "noCopy");
|
||||
if (firstBuild) {
|
||||
_scrollToCurrentPos();
|
||||
}
|
||||
}
|
||||
|
||||
void computeAnnotations() {
|
||||
|
|
Loading…
Reference in a new issue