"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCursorPositionOverElement = void 0;
const getCursorPositionOverElement = (elementRect, mouseEvent) => {
    const cursorPositionY = elementRect.height - (mouseEvent.clientY - elementRect.y);
    const cursorPositionX = elementRect.width - (mouseEvent.clientX - elementRect.x);
    const cursorRatioY = elementRect.height / 2 / cursorPositionY;
    const cursorRatioX = elementRect.width / 2 / cursorPositionX;
    if (cursorRatioY > cursorRatioX) {
        if (cursorRatioY >= 1) {
            return 'bottom';
        }
        else {
            return 'top';
        }
    }
    else if (cursorRatioX >= 1) {
        return 'right';
    }
    else {
        return 'left';
    }
};
exports.getCursorPositionOverElement = getCursorPositionOverElement;
//# sourceMappingURL=editor.js.map
