@aurigma/design-atoms-interfaces
Version:
36 lines (35 loc) • 1.32 kB
TypeScript
import { IResizeGripsPermissions } from "./IResizeGripsPermissions";
/**
* A structure defining the manipulation permissions.
* @example You can prevent elements from moving horizontally and enable corner grips with the following config.
* ```json
* {
* "defaultItemsConfig": {
* "rectangle": {
* "manipulationPermissions": {
* "allowMoveHorizontal": false,
* "resizeGrips": {
* "edge": false,
* "corner": ["Proportional"]
* }
* }
* }
* }
* }
* ```
* @public
*/
export interface IManipulationPermissionsData {
/** Allows deleting elements. The default value is `true`. */
allowDelete?: boolean;
/** Allows moving elements horizontally. The default value is `true`. */
allowMoveHorizontal?: boolean;
/** Allows moving elements vertically. The default value is `true`. */
allowMoveVertical?: boolean;
/** Allows rotating elements. The default value is `true`. */
allowRotate?: boolean;
/** Allows dragging the content of image placeholders when they have the `<PH><MAMH_f><MAMV_f>` markers. The default value is `true`. */
allowDragAndDrop?: boolean;
/** Enables the corner and side grips to resize elements. */
resizeGrips?: IResizeGripsPermissions;
}