@aurigma/design-atoms-interfaces
Version:
27 lines (26 loc) • 1.11 kB
TypeScript
import { ResizeGripsCorner } from "./ResizeGripsCorner";
/**
* A structure defining the grips that appear on bounding rectangles.
* @example You can enable proportional resizing on dragging the corner grips and arbitrarily resizing on dragging the corner griips with holding the `Shift` key as follows:
* ```json
* {
* "defaultItemsConfig": {
* "image": {
* "manipulationPermissions": {
* "resizeGrips": {
* "corner": ["Proportional", "Arbitrary"],
* "edge": false
* }
* }
* }
* }
* }
* ```
* @public
*/
export interface IResizeGripsPermissions {
/** Enables side grips to resize elements arbitrarily. */
edge?: boolean;
/** An array of one or two elements enabling corner grips. The array elements are either `"Proportional"` or `"Arbitrary"`. The second element of the `corner` array defines how design elements should be resized when the user drags corner grips while holding down the Shift key. To disallow any rotation, pass an empty array. */
corner?: ResizeGripsCorner[];
}