import { floorplanService } from '../Service/FloorplanService'
import { mathUtil } from '../MathUtil.js'
import { coordinate } from '../Coordinate'
import Constant from '../Constant'

export default class MoveTable {
    constructor() {

    }

    moveFullTable(dx,dy, tableId) {
        let table = floorplanService.getTable(tableId)

        table.center = {
            x:table.center.x + dx/coordinate.res * Constant.defaultZoom/coordinate.zoom,
            y:table.center.y - dy/coordinate.res * Constant.defaultZoom/coordinate.zoom,
        }

        table.setPoints2d()
    }
}

const moveTable = new MoveTable()
export { moveTable }
