fix: remove conficts

This commit is contained in:
Marcin Czerniak 2021-03-15 18:37:39 +01:00
commit 3bd398f98b
3 changed files with 9 additions and 0 deletions

1
nowy Normal file
View File

@ -0,0 +1 @@
witam

View File

@ -1,6 +1,7 @@
const Grid = function(canvas) {
let grid = [[]];
let ctx;
let storages = []
this.setCanvasSize = (canvas) => {
canvas.width = 2000;
@ -33,6 +34,12 @@ const Grid = function(canvas) {
this.ctx.strokeRect(x, y, w, h);
}
this.addStorageCenter = (x, y) => {
this.neonRect(x * 100, y * 100, 100, 100, '#ff0000', 10);
}
this.getStorageCenters = () => storages
this.ctx = canvas.getContext('2d');
this.setCanvasSize(canvas);
this.processGrid();

View File

@ -1,4 +1,5 @@
window.addEventListener('DOMContentLoaded', () => {
const gridCanvas = document.getElementById('canvas-grid');
const grid = new Grid(gridCanvas);
grid.addStorageCenter(9, 0);
});