Skip to content

using image restriction 'none' and aspect ratio. #265

Open
@leonardo-melhor-envio

Description

@leonardo-melhor-envio

When adding these two properties to the "cropp" component, when generating the preview image, it does not align the source image to the center.

cropp component:
image


generated image:
image


implementation:

     <Cropper
        ref="cropper"
        :src="src"
        :stencil-props="{
          aspectRatio: 128/32,
          movable: true,
          resizable: true,
        }"
        :canvas="{
          maxWidth: 128,
          maxHeight: 32,
        }"
        image-restriction="none"
      />

Codesandbox

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions