render: cleanup

This commit is contained in:
muerwre 2018-11-28 10:18:03 +07:00
parent 2f3cb0e770
commit 6ed0361acf
5 changed files with 70197 additions and 39 deletions

View file

@ -12,12 +12,6 @@ export class Renderer extends React.Component {
this.fetchImages(ctx, geometry)
.then(images => this.composeImages({ geometry, images, ctx }));
// myimage = new Image();
// myimage.onload = function() {
// ctx.drawImage(myimage, x, y);
// }
// myimage.src = 'http://myserver/nextimage.cgi';
}
fetchImages = (ctx, geometry) => {
@ -60,12 +54,13 @@ export class Renderer extends React.Component {
return ctx.drawImage(image, posX, posY, 256, 256);
});
};
render() {
return (
<div className="renderer-shade" onClick={this.props.onClick}>
<canvas width={window.innerWidth} height={window.innerWidth} ref={el => { this.canvas = el; }} />
<canvas width={window.innerWidth} height={window.innerHeight} ref={el => { this.canvas = el; }} />
</div>
);
}