mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
render: cleanup
This commit is contained in:
parent
2f3cb0e770
commit
6ed0361acf
5 changed files with 70197 additions and 39 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue