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

export default class MoveCustomImage {
    constructor() {

    }

    moveFullCustomImage(dx,dy, customImageId) {
        let customImage = floorplanService.getCustomImage(customImageId)
        customImage.center = {
            x:customImage.center.x + dx/coordinate.res * Constant.defaultZoom/coordinate.zoom,
            y:customImage.center.y - dy/coordinate.res * Constant.defaultZoom/coordinate.zoom,
        }
    }
}

const moveCustomImage = new MoveCustomImage()
export { moveCustomImage }
