提交 7bf38194 编写于 作者: J Jason Park

add dp

上级 0a03a153
......@@ -136,6 +136,7 @@ section {
bottom: 50%;
left: 0;
right: 0;
overflow: scroll;
}
.tab_container {
......
......@@ -163,8 +163,18 @@ Array2DTracer.prototype.refresh = function () {
Tracer.prototype.refresh.call(this);
var $parent = $table.parent();
$table.css('margin-top', $parent.height() / 2 - $table.height() / 2);
$table.css('margin-left', $parent.width() / 2 - $table.width() / 2);
var top = $parent.height() / 2 - $table.height() / 2;
var left = $parent.width() / 2 - $table.width() / 2;
if (top < 0) {
$table.css('margin-top', 0);
$parent.scrollTop(-top);
}
else $table.css('margin-top', top);
if (left < 0) {
$table.css('margin-left', 0);
$parent.scrollLeft(-left);
}
else $table.css('margin-left', left);
};
// Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册