Fix algorithm menu. Offset it if need.

This commit is contained in:
Unick Soft
2018-12-29 19:14:28 +02:00
parent d114ab6fa9
commit 4f8af5b4e7
3 changed files with 23 additions and 3 deletions

View File

@@ -484,7 +484,27 @@ function postLoadPage()
}
}
document.getElementById('openAlgorithmList').onclick = function()
{
// Show menu first
setTimeout(function()
{
var button = document.getElementById('openAlgorithmList');
var buttonRect = button.getBoundingClientRect();
var algorithmList = document.getElementById('algorithmList');
var delta = buttonRect.right - algorithmList.offsetWidth;
if (delta < 0)
{
var value = (delta - 4) + "px";
algorithmList.style.right = value;
}
else
{
algorithmList.style.right = "0";
}
}, 1);
}
if (document.getElementById('VoteButton') !== null)
document.getElementById('VoteButton').onclick = function ()