We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee956fb commit 6ebc5f0Copy full SHA for 6ebc5f0
src/resource-manager/resource_service.js
@@ -276,7 +276,18 @@ cls.ResourceInspector = function(network_logger)
276
if (e)
277
{
278
e.addClass(HIGHLIGHT_CLASSNAME);
279
- // todo: scroll into view
+
280
+ // scroll into view
281
+ var container = this.tree_view.get_container().firstChild;
282
+ var e_top = e.offsetTop;
283
+ var e_bottom = e_top + e.offsetHeight;
284
+ var container_top = container.scrollTop;
285
+ var container_height = container.offsetHeight;
286
287
+ if (e_top < container_top)
288
+ container.scrollTop = e_top;
289
+ else if (e_bottom > container_top + container_height)
290
+ container.scrollTop = e_bottom - container_height;
291
}
292
}.bind(this);
293
0 commit comments