UNPKG

advanced-cropper

Version:

The core of the advanced cropper libraries family

23 lines (20 loc) 613 B
import 'tslib'; import { rotateSize } from '../../service/utils.js'; import '../../types/index.js'; import '../../state/setCoordinates.js'; import { BoundingBoxType } from './types.js'; function circleBoundingBox(size, angle) { return size; } function rectangleBoundingBox(size, angle) { return rotateSize(size, angle); } function getBoundingBox(size, angle, algorithm) { if (algorithm === BoundingBoxType.Circle) { return circleBoundingBox(size); } else { return rectangleBoundingBox(size, angle); } } export { circleBoundingBox, getBoundingBox, rectangleBoundingBox };