You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Add warning if fixupHeight fails, and remove overzealous logging
This commit is contained in:
@@ -122,6 +122,7 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
fixupHeight: function() {
|
fixupHeight: function() {
|
||||||
if (!this.refs.image) {
|
if (!this.refs.image) {
|
||||||
|
console.warn("Refusing to fix up height on MImageBody with no image element");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +136,7 @@ module.exports = React.createClass({
|
|||||||
//console.log("trying to fit image into timelineWidth of " + this.refs.body.offsetWidth + " or " + this.refs.body.clientWidth);
|
//console.log("trying to fit image into timelineWidth of " + this.refs.body.offsetWidth + " or " + this.refs.body.clientWidth);
|
||||||
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, timelineWidth, maxHeight);
|
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, timelineWidth, maxHeight);
|
||||||
this.refs.image.style.height = thumbHeight + "px";
|
this.refs.image.style.height = thumbHeight + "px";
|
||||||
console.log("Imageheight now", thumbHeight);
|
// console.log("Image height now", thumbHeight);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user