Correctly position tooltips relative to parent element.
This commit is contained in:
parent
c198dd381f
commit
9fc7435ea2
3 changed files with 11 additions and 11 deletions
|
@ -66,7 +66,7 @@ module.exports = React.createClass({
|
||||||
// positioned, also taking into account any window zoom
|
// positioned, also taking into account any window zoom
|
||||||
// NOTE: The additional 6 pixels for the left position, is to take account of the
|
// NOTE: The additional 6 pixels for the left position, is to take account of the
|
||||||
// tooltips chevron
|
// tooltips chevron
|
||||||
var parent = ReactDOM.findDOMNode(this);
|
var parent = ReactDOM.findDOMNode(this).parentNode;
|
||||||
var style = {};
|
var style = {};
|
||||||
style.top = parent.getBoundingClientRect().top + window.pageYOffset;
|
style.top = parent.getBoundingClientRect().top + window.pageYOffset;
|
||||||
style.left = 6 + parent.getBoundingClientRect().right + window.pageXOffset;
|
style.left = 6 + parent.getBoundingClientRect().right + window.pageXOffset;
|
||||||
|
|
|
@ -19,11 +19,10 @@ limitations under the License.
|
||||||
margin-right: 34px;
|
margin-right: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MImageBody_thumbnail {
|
.mx_MImageBody_thumbnail_container {
|
||||||
max-width: 100%;
|
display: inline-block;
|
||||||
/*
|
}
|
||||||
background-color: $primary-bg-color;
|
|
||||||
border: 2px solid $primary-bg-color;
|
img.mx_MImageBody_thumbnail {
|
||||||
border-radius: 1px;
|
max-width: 100%;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,5 +49,6 @@ limitations under the License.
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: $primary-fg-color;
|
color: $primary-fg-color;
|
||||||
|
max-width: 600px;
|
||||||
|
margin-right: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue