Crop - carstenschaefer/ImagerJs GitHub Wiki

Provides a tool for cropping images.


Enabling the Plugin

plugins: [
    'Rotate',
    'Crop',
    'Resize'
]

Configuration

pluginsConfig: {
    Crop: {
        controlsCss: {
          width: '15px',
          height: '15px',
          background: 'white',
          border: '1px solid black'
        },
        controlsTouchCss: {
          width: '25px',
          height: '25px',
          background: 'white',
          border: '2px solid black'
        }
    }
}
  • Optional setting. If not specified, the settings shown in the example will be used.
  • It's possible to specify different settings for desktop and touch devices:
    • objectControls: configuration object for desktop
    • objectControlsTouch: configuration object for touch devices
  • You can define any valid CSS rule.