make it work, seemingly

This commit is contained in:
Matthew Hodgson 2016-03-24 01:12:51 +00:00
parent 151a9994ba
commit 5bd0303dda
3 changed files with 4 additions and 2 deletions

View File

@ -369,7 +369,7 @@ module.exports = React.createClass({
},
onResize: function() {
dis.dispatch({ action: 'timeline_resize' });
dis.dispatch({ action: 'timeline_resize' }, true);
},
render: function() {

View File

@ -189,6 +189,7 @@ module.exports = React.createClass({
onResize: function() {
this.props.onResize();
this.checkScroll();
this.refs.geminiPanel.forceUpdate();
},
// after an update to the contents of the panel, check that the scroll is

View File

@ -125,7 +125,8 @@ module.exports = React.createClass({
var thumbHeight = null;
var timelineWidth = this._body.offsetWidth;
var maxHeight = 600*timelineWidth/800;
var maxHeight = 600; // let images take up as much width as they can so long as the height doesn't exceed 600px.
// the alternative here would be 600*timelineWidth/800; to scale them down to fit inside a 4:3 bounding box
//console.log("trying to fit image into timelineWidth of " + this._body.offsetWidth + " or " + this._body.clientWidth);
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, timelineWidth, maxHeight);