fix scrollToSelectedEmbed
This commit is contained in:
parent
32ec8c3f2b
commit
3774eb1ef7
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ pandora.ui.textPanel = function() {
|
||||||
function scrollToSelectedEmbed() {
|
function scrollToSelectedEmbed() {
|
||||||
var scrollTop = Math.max(pandora.$ui.text[0].scrollTop + $('#embed' + selected).offset().top - 48, 0),
|
var scrollTop = Math.max(pandora.$ui.text[0].scrollTop + $('#embed' + selected).offset().top - 48, 0),
|
||||||
position = 100 * scrollTop / Math.max(1,
|
position = 100 * scrollTop / Math.max(1,
|
||||||
pandora.$ui.text[0].scrollHeight - pandora.$ui.text.height());
|
pandora.$ui.text[0].scrollHeight);
|
||||||
pandora.$ui.text.scrollTo(position);
|
pandora.$ui.text.scrollTo(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue