提交 3f9402d9 编写于 作者: O Oliver Gondža

Merge pull request #959 from sghill/JENKINS-19803

...@@ -1187,6 +1187,7 @@ var jenkinsRules = { ...@@ -1187,6 +1187,7 @@ var jenkinsRules = {
edge.className = "top-sticker-edge"; edge.className = "top-sticker-edge";
sticker.insertBefore(edge,sticker.firstChild); sticker.insertBefore(edge,sticker.firstChild);
var initialBreadcrumbPosition = DOM.getRegion(shadow);
function adjustSticker() { function adjustSticker() {
shadow.style.height = sticker.offsetHeight + "px"; shadow.style.height = sticker.offsetHeight + "px";
...@@ -1194,7 +1195,9 @@ var jenkinsRules = { ...@@ -1194,7 +1195,9 @@ var jenkinsRules = {
var pos = DOM.getRegion(shadow); var pos = DOM.getRegion(shadow);
sticker.style.position = "fixed"; sticker.style.position = "fixed";
sticker.style.top = Math.max(0, pos.top-viewport.top) + "px" if(pos.top <= initialBreadcrumbPosition.top) {
sticker.style.top = Math.max(0, pos.top-viewport.top) + "px"
}
sticker.style.left = Math.max(0,pos.left-viewport.left) + "px" sticker.style.left = Math.max(0,pos.left-viewport.left) + "px"
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册