Skip to content

Commit

Permalink
fix(element-image): zoom when the selection is both zoomable and dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Jul 6, 2024
1 parent 64e2714 commit 0193036
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/element-image/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ export default class CropperImage extends CropperElement {
this.$getTagNameOf(CROPPER_SELECTION),
);

if (!$selection || !$selection.zoomable || $selection.dynamic) {
if (
!$selection
|| !$selection.zoomable
|| ($selection.zoomable && $selection.dynamic)
) {
const { x, y } = this.getBoundingClientRect();

this.$zoom(
Expand Down

0 comments on commit 0193036

Please sign in to comment.