Sha256: b4ab3caa4517c3cc235a43c8406c5e81e16324926d041db9af14d51bc5b4c7eb

Contents?: true

Size: 729 Bytes

Versions: 4

Compression:

Stored size: 729 Bytes

Contents

import * as Images from "./Images";

export interface Position {
  x: number;
  y: number;
}

export interface Size {
  width: number;
  height: number;
}

export interface Params {
  crop_start_x: number;
  crop_start_y: number;
  crop_width: number;
  crop_height: number;
  crop_gravity_x: number;
  crop_gravity_y: number;
}

export interface State extends Params {
  aspect: number | null;
  cropping: boolean;
  image: Images.Resource;
}

export interface CropSize extends Position, Size {
  aspect?: number;
}

export type Action =
  | { type: "completeCrop" | "startCrop" | "toggleFocal" }
  | { type: "setCrop"; payload: CropSize }
  | { type: "setAspect"; payload: number }
  | { type: "setFocal"; payload: Position };

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pages_core-3.15.4 app/javascript/types/Crop.ts
pages_core-3.15.3 app/javascript/types/Crop.ts
pages_core-3.15.2 app/javascript/types/Crop.ts
pages_core-3.15.1 app/javascript/types/Crop.ts