@WAYNEDEV

Как сделать минимальную ширину и высоту в vue-cropperjs?

Всем привет!
Перелазил всю доку https://github.com/fengyuanchen/cropperjs#cropperjs но так ничего и не нашел, кроме метода setData({width: 1, height: 1}), но работает он не так как нужно. Тк если залили картинку 200*200, где минималка 220*220 - всё ломается
Кто сталкивался с этим? Мне нужен минимальный размер 220*220

Буду очень благодарен за помощь!
  • Вопрос задан
  • 79 просмотров
Пригласить эксперта
Ответы на вопрос 1
@7rows
Frontend Разработчик / Vue / JS / TS / CSS
откуда у вас width, height берется ?
Судя по описанию, вам нужны вот эти параметры
minContainerWidth
Type: Number
Default: 200
The minimum width of the container.

minContainerHeight
Type: Number
Default: 100
The minimum height of the container.

minCanvasWidth
Type: Number
Default: 0
The minimum width of the canvas (image wrapper).

minCanvasHeight
Type: Number
Default: 0
The minimum height of the canvas (image wrapper).

minCropBoxWidth
Type: Number
Default: 0
The minimum width of the crop box.

Note: This size is relative to the page, not the image.

minCropBoxHeight
Type: Number
Default: 0
The minimum height of the crop box.

Note: This size is relative to the page, not the image.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы