Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize browser window #55

Open
rozumny opened this issue Aug 24, 2018 · 2 comments
Open

Resize browser window #55

rozumny opened this issue Aug 24, 2018 · 2 comments
Labels
Enhancement Enhance performance or improve usability of original features.

Comments

@rozumny
Copy link

rozumny commented Aug 24, 2018

Hi guys,
is it possible to auto resize editor (canvas, controls,...) when user resize browser window?

@jinwoo-kim-nhn
Copy link
Contributor

@rozumny Sorry for the late reply.

You can resolve the canvas size with the imageEditor.resizeCanvasDimension api.
However, it is currently difficult to change controls dynamically with the includeUI option.
This issue will be considered for improvement.

@jinwoo-kim-nhn jinwoo-kim-nhn added the Enhancement Enhance performance or improve usability of original features. label Dec 27, 2018
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 25, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 25, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
june07 pushed a commit to june07-ugh/static that referenced this issue Apr 26, 2024
@bronze1man
Copy link

bronze1man commented Jun 3, 2024

I found a workaround of this problem (dom is the htmlDivElement of tui image editor, instance is the ImageEditor object) (you need change 20 or 280 with full width image and full height and guess and try):

        const ro = new ResizeObserver(()=>{
            const cssMaxWidth = dom.clientWidth-20
            const cssMaxHeight = dom.clientHeight-280
            instance.resizeCanvasDimension({width: cssMaxWidth, height: cssMaxHeight})
        })
        ro.observe(dom)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhance performance or improve usability of original features.
Projects
None yet
Development

No branches or pull requests

3 participants