Nuhel / filament-cropper

Filement Cropper Js
MIT License
35 stars 10 forks source link

Modal form height exceeds screen whith portrait images #10

Open Polfo opened 1 year ago

Polfo commented 1 year ago

When opening an image that is portrait (more height than width), the modal window of cropper exceeds the (portrait) screen heigth and it becomes very difficult to use the cropper. In the example below, more than half of the modal is off screen.

image

Is there a setting to limit the modal height to screen height?

Using: laravel 10.9.0 filament 2.17.29 filament-cropper 1.1.2

Polfo commented 1 year ago

A workaround is using ->modalSize('lg') // sm md lg xl 2xl

Just to clarify, in the documentation, I read ->modalSize('xl') as ->modalSize('times one') instead of ->modalSize('ex-el'). And experimented with ->modalSize('x0.5') in an attemt to reduce the modal size.

mehmetsahindev commented 1 year ago

Is there any solution?

mehmetsahindev commented 1 year ago

I solved the problem with this property.

->viewMode(ViewMode::FIT_CANVAS)