Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit a850de3

Browse files
committed
Fix opener positioning
1 parent db31374 commit a850de3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/plugins/editor.diaporama/class.Diaporama.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,13 @@ Class.create("Diaporama", AbstractEditor, {
798798
});
799799
}
800800
var off = theImage.positionedOffset();
801+
var marginTop = (theImage.getStyle('marginTop')) ? parseInt(theImage.getStyle('marginTop')) : 0;
801802
var realLeftOffset = Math.max(off.left, theImage.parentNode.positionedOffset().left);
802803
theImage.previewOpener.setStyle({
803804
display:'block',
804805
left: (realLeftOffset + 1) + 'px',
805806
width: (theImage.getWidth() - 2) + "px",
806-
top: (off.top + theImage.getHeight() - theImage.previewOpener.getHeight() -1 ) + "px"
807+
top: (off.top + theImage.getHeight() - theImage.previewOpener.getHeight() + marginTop) + "px"
807808
});
808809
});
809810
img.observe("mouseout", function(event){

core/src/plugins/editor.imagick/class.IMagickPreviewer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,13 @@ Class.create("IMagickPreviewer", Diaporama, {
144144
});
145145
}
146146
var off = theImage.positionedOffset();
147+
var marginTop = (theImage.getStyle('marginTop')) ? parseInt(theImage.getStyle('marginTop')) : 0;
147148
var realLeftOffset = Math.max(off.left, theImage.parentNode.positionedOffset().left);
148149
theImage.previewOpener.setStyle({
149150
display:'block',
150151
left: realLeftOffset + 'px',
151152
width:theImage.getWidth() + "px",
152-
top: (off.top + theImage.getHeight() - theImage.previewOpener.getHeight()) + "px"
153+
top: (off.top + theImage.getHeight() - theImage.previewOpener.getHeight() + marginTop) + "px"
153154
});
154155
});
155156
img.observe("mouseout", function(event){

0 commit comments

Comments
 (0)