fix: remove conficts
This commit is contained in:
commit
3bd398f98b
@ -1,6 +1,7 @@
|
|||||||
const Grid = function(canvas) {
|
const Grid = function(canvas) {
|
||||||
let grid = [[]];
|
let grid = [[]];
|
||||||
let ctx;
|
let ctx;
|
||||||
|
let storages = []
|
||||||
|
|
||||||
this.setCanvasSize = (canvas) => {
|
this.setCanvasSize = (canvas) => {
|
||||||
canvas.width = 2000;
|
canvas.width = 2000;
|
||||||
@ -33,6 +34,12 @@ const Grid = function(canvas) {
|
|||||||
this.ctx.strokeRect(x, y, w, h);
|
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.ctx = canvas.getContext('2d');
|
||||||
this.setCanvasSize(canvas);
|
this.setCanvasSize(canvas);
|
||||||
this.processGrid();
|
this.processGrid();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
const gridCanvas = document.getElementById('canvas-grid');
|
const gridCanvas = document.getElementById('canvas-grid');
|
||||||
const grid = new Grid(gridCanvas);
|
const grid = new Grid(gridCanvas);
|
||||||
|
grid.addStorageCenter(9, 0);
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user