Search results

ImageEditorModel API in Angular Image Editor API component

Interface for a class ImageEditor

Properties

beforeSave

EmitType<BeforeSaveEventArgs>

Event callback that is raised before an image is saved.

click

EmitType<ImageEditorClickEventArgs>

Event callback that is raised while clicking on an image in the Image Editor.

created

EmitType<Event>

Event callback that is raised after rendering the Image Editor component.

cropping

EmitType<CropEventArgs>

Event callback that is raised while cropping an image.

destroyed

EmitType<Event>

Event callback that is raised once the component is destroyed with its elements and bound events.

fileOpened

EmitType<OpenEventArgs>

Event callback that is raised once an image is opened in an Image Editor.

finetuneValueChanging

EmitType<FinetuneEventArgs>

Event callback that is raised when applying fine tune to an image.

flipping

EmitType<FlipEventArgs>

Event callback that is raised while flipping an image.

frameChange

EmitType<FrameChangeEventArgs>

Event callback that is raised while applying frames on an image.

imageFiltering

EmitType<ImageFilterEventArgs>

Event callback that is raised when applying filter to an image.

panning

EmitType<PanEventArgs>

Event callback that is raised while panning an image.

quickAccessToolbarItemClick

EmitType<ClickEventArgs>

Event callback that is raised once the quick access toolbar item is clicked.

quickAccessToolbarOpen

EmitType<QuickAccessToolbarEventArgs>

Event callback that is raised when opening the quick access toolbar.

resizing

EmitType<ResizeEventArgs>

Event callback that is raised while resizing an image.

rotating

EmitType<RotateEventArgs>

Event callback that is raised while rotating an image.

saved

EmitType<SaveEventArgs>

Event callback that is raised once an image is saved.

selectionChanging

EmitType<SelectionChangeEventArgs>

Event callback that is raised while changing selection in an Image Editor.

shapeChange

EmitType<ShapeChangeEventArgs>

Event callback that is raised after shape changing action is performed in an image editor.

shapeChanging

EmitType<ShapeChangeEventArgs>

Event callback that is raised while changing shapes in an Image Editor.

toolbarCreated

EmitType<ToolbarEventArgs>

Event callback that is raised once the toolbar is created.

toolbarItemClicked

EmitType<ClickEventArgs>

Event callback that is raised once the toolbar item is clicked.

toolbarUpdating

EmitType<ToolbarEventArgs>

Event callback that is raised while updating/refreshing the toolbar

  <div style='height: 500px;'>
    <ejs-imageeditor id="image-editor" [showQuickAccessToolbar]= "true" (toolbarUpdating)="toolbarUpdate($event)"></ejs-imageeditor>
  </div>
  import { Component, ViewEncapsulation } from '@angular/core';
  import { ImageEditorComponent, ToolbarEventArgs } from '@syncfusion/ej2-angular-image-editor';

  @Component({
    selector: 'app-root',
    styleUrls: ['app.component.css'],
    templateUrl: 'app.component.html',
    encapsulation: ViewEncapsulation.None
  })
  export class AppComponent {
    public toolbarUpdate = (args: ToolbarEventArgs): void => {
      if (args.toolbarType === 'shapes') {
      args.toolbarItems = ['fillColor', 'strokeColor', 'strokeWidth', { text: 'Click', template: '<button class="e-btn" id="shape">Click</button>', tooltipText: 'Click', prefixIcon: 'e-expand', id: 'Click' }];
    }
    }
  }
<div style="height: 500px">
  <div id='imageeditor'></div>
</div>

zooming

EmitType<ZoomEventArgs>

Event callback that is raised while zooming an image.

allowUndoRedo

boolean

Specifies a boolean value whether enable undo/redo operations in the image editor.

cssClass

string

Defines one or more CSS classes that can be used to customize the appearance of an Image Editor component.

disabled

boolean

Defines whether an Image Editor component is enabled or disabled.

finetuneSettings

FinetuneSettingsModel

Specifies the finetune settings option which can be used to perform color adjustments in the image editor control.

  <div style='height: 500px;'>
    <ejs-imageeditor id="image-editor" [finetuneSettings]="finetuneSetting"></ejs-imageeditor>
  </div>
  import { Component, ViewEncapsulation } from '@angular/core';
  import { ImageEditorComponent } from '@syncfusion/ej2-angular-image-editor';

  @Component({
    selector: 'app-root',
    styleUrls: ['app.component.css'],
    templateUrl: 'app.component.html',
    encapsulation: ViewEncapsulation.None
  })
  export class AppComponent {
    private finetuneSetting = {
        brightness: { min: -100, max: 100, defaultValue: 0 },
        contrast: { min: -100, max: 100, defaultValue: 0 }
      }
  }

fontFamily

FontFamilyModel

Predefine the font families that populate in font family dropdown list from the toolbar.

height

string

Specifies the height of the Image Editor.

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

quickAccessToolbarTemplate

string | Function

Specifies a template for the quick access toolbar. Use this property to customize the quick access toolbar.

selectionSettings

SelectionSettingsModel

Specifies the selection settings to customize selection. A ‘SelectionSettingsModel’ value that specifies the the customization related options which are enabled in image editor control. The default value is null.

showQuickAccessToolbar

boolean

Specifies whether to show/hide the quick access toolbar.

theme

string | Theme

Specifies the theme of the Image Editor. The appearance of the shape selection in Image Editor is determined by this property.

toolbar

[]

Specifies the toolbar items to perform UI interactions. It accepts both string[] and ItemModel[] to configure its toolbar items. The default value is null. If the property is not defined in the control, the default toolbar will be rendered with preconfigured toolbar commands. If the property is defined as empty collection, the toolbar will not be rendered. The preconfigured toolbar commands are

  • Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
  • Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, path, text, image and freehand drawing with resize, drag and drop, and customize its appearance.
  • Transform: helps to rotate and flip an image.
  • Finetunes: helps to perform adjustments on an image.
  • Filters: helps to perform predefined color filters.
  • ZoomIn: performs zoom-in an image.
  • ZoomOut: performs zoom-out an image.
  • Save: save the modified image.
  • Open: open an image to perform editing.
  • Reset: reset the modification and restore the original image.
  <div style='height: 500px;'>
    <ejs-imageeditor id="image-editor" [toolbar]="customToolbar"></ejs-imageeditor>
  </div>
  import { Component, ViewEncapsulation } from '@angular/core';
  import { ImageEditorComponent } from '@syncfusion/ej2-angular-image-editor';

  @Component({
    selector: 'app-root',
    styleUrls: ['app.component.css'],
    templateUrl: 'app.component.html',
    encapsulation: ViewEncapsulation.None
  })
  export class AppComponent {
    public customToolbar = ['Crop', 'ZoomIn', 'ZoomOut', 'Transform', {text: 'Custom'}];
  }

toolbarTemplate

string | Function

Specifies a custom template for the toolbar of an image editor control. A string that specifies a custom template for the toolbar of the image editor. If this property is defined, the ‘toolbar’ property will not have any effect.

  <div style='height: 500px;'>
    <ejs-imageeditor id="image-editor" [showQuickAccessToolbar]= "true" >
      <ng-template #toolbarTemplate>
        <button id='dltbtn'>Custom</button>
      </ng-template>
    </ejs-imageeditor>
  </div>
  import { Component, ViewEncapsulation } from '@angular/core';
  import { ImageEditorComponent } from '@syncfusion/ej2-angular-image-editor';

  @Component({
    selector: 'app-root',
    styleUrls: ['app.component.css'],
    templateUrl: 'app.component.html',
    encapsulation: ViewEncapsulation.None
  })
  export class AppComponent {

  }

width

string

Specifies the width of an Image Editor.

zoomSettings

ZoomSettingsModel

Specifies the zoom settings to perform zooming action. A ‘ZoomSettingsModel’ value that specifies the the zoom related options which are enabled in image editor control. The default value is null.

  <div style='height: 500px;'>
    <ejs-imageeditor id="image-editor" [zoomSettings]= "zoomSetting"></ejs-imageeditor>
  </div>
  import { Component, ViewEncapsulation } from '@angular/core';
  import { ImageEditorComponent, ZoomTrigger } from '@syncfusion/ej2-angular-image-editor';

  @Component({
    selector: 'app-root',
    styleUrls: ['app.component.css'],
    templateUrl: 'app.component.html',
    encapsulation: ViewEncapsulation.None
  })
  export class AppComponent {
    public zoomSetting = {
      minZoomFactor: 1,
      maxZoomFactor: 100,
      zoomFactor: 1,
      zoomTrigger: ZoomTrigger.MouseWheel | ZoomTrigger.Pinch | ZoomTrigger.Toolbar | ZoomTrigger.Commands,
      zoomPoint: new Point {x: 500, y: 500}
    };
  }