accomodate 800px wide thumbs and support horizontal scaling
This commit is contained in:
parent
12f5407392
commit
dc94df4b06
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
_getThumbUrl: function() {
|
_getThumbUrl: function() {
|
||||||
var content = this.props.mxEvent.getContent();
|
var content = this.props.mxEvent.getContent();
|
||||||
return MatrixClientPeg.get().mxcUrlToHttp(content.url, 480, 360);
|
return MatrixClientPeg.get().mxcUrlToHttp(content.url, 800, 600);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
@ -103,10 +103,10 @@ module.exports = React.createClass({
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
|
|
||||||
var thumbHeight = null;
|
var thumbHeight = null;
|
||||||
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 480, 360);
|
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 800, 600);
|
||||||
|
|
||||||
var imgStyle = {};
|
var imgStyle = {};
|
||||||
if (thumbHeight) imgStyle['height'] = thumbHeight;
|
if (thumbHeight) imgStyle['maxHeight'] = thumbHeight;
|
||||||
|
|
||||||
var thumbUrl = this._getThumbUrl();
|
var thumbUrl = this._getThumbUrl();
|
||||||
if (thumbUrl) {
|
if (thumbUrl) {
|
||||||
|
|
Loading…
Reference in a new issue