fix: softcoding

This commit is contained in:
cha0s 2022-04-11 20:35:43 -05:00
parent 0e5d87db87
commit d8a2fb8b92

View File

@ -122,7 +122,7 @@ function TilesPage({
if (!events) { if (!events) {
return undefined; return undefined;
} }
const tileSize = [16, 16]; const {tileSize} = room.tiles[currentLayer];
const stamp = (origin) => { const stamp = (origin) => {
const position = Vector.div([selection[0], selection[1]], tileSize); const position = Vector.div([selection[0], selection[1]], tileSize);
const size = Vector.div([selection[2], selection[3]], tileSize); const size = Vector.div([selection[2], selection[3]], tileSize);
@ -265,7 +265,7 @@ function TilesPage({
type, type,
}, },
) => { ) => {
const tileSize = [16, 16]; const {tileSize} = room.tiles[currentLayer];
switch (type) { switch (type) {
case 'touchstart': case 'touchstart':
case 'mousedown': { case 'mousedown': {