Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
haven2world committed Nov 14, 2022
1 parent 2bafda3 commit 966b2e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const DefaultOptions: Required<ImageEditOptions> = {
disableCrop: false,
disableRotate: false,
disableSideResize: false,
onlyActivateImageEditingManually: false,
};

/**
Expand Down Expand Up @@ -182,6 +183,7 @@ export default class ImageEdit implements EditorPlugin {
switch (e.eventType) {
case PluginEventType.SelectionChanged:
if (
!this.options.onlyActivateImageEditingManually &&
e.selectionRangeEx &&
e.selectionRangeEx.type === SelectionRangeTypes.ImageSelection
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@ export default interface ImageEditOptions {
* Whether image crop is disabled. @default false
*/
disableCrop?: boolean;

/**
* Whether to only allow activate image editing by calling `setImageEditing` outside the plugin
*/
onlyActivateImageEditingManually?: boolean;
}

0 comments on commit 966b2e9

Please sign in to comment.