tui.image-editor icon indicating copy to clipboard operation
tui.image-editor copied to clipboard

Tool submenu covers image and image moves into the wrong direction

Open GEMI opened this issue 5 years ago • 6 comments

Version

TUI image editor 3.7.2

Development Environment

Chrome 79, MacOS Catalina 10.15.2

Current Behavior

When menuBarPosition is top and opening any tool menu Draw, Paint, Crop or any other tool the image container ".tui-image-editor" moves Up instead of Down. So the tool menu covers actual picture and you cannot use the tool on the whole image.

Relevant code is in 'https://github.com/nhn/tui.image-editor/blob/master/src/js/ui.js'

    (menuBarPosition === 'top') {
            if (height > this._editorElementWrap.offsetHeight - 150) {
                top = (150 / 2) - ((height - (this._editorElementWrap.offsetHeight - 150)) / 2);
            }

So for example when height is 800, offset is 736 the result "top" becomes -32. So instead of image going down it goes up and it becomes hard to use the tool on the image.

Image normal Image moved up

Expected Behavior

When tool menu is expanded and menuBarPosition is "top" the image should move down, not up.

GEMI avatar Feb 13 '20 20:02 GEMI

I would not say this is an enhancement it is a bug, because you cannot draw on the image when the tool menu is covering it. The portion of the image that is covered by the menu is unusable.

Screenshot 2020-04-13 at 11 56 24

GEMI avatar Apr 13 '20 08:04 GEMI

Any fix ?

research-scife avatar Feb 09 '21 13:02 research-scife

Hi, we have the same problem. We are searching for a tool to edit images in our app and this one would be great but the toolbar is not working on smaller screens. The menu covers the bottom half of the image so I will never be able to edit this part which makes the tool unusable for us.

KatGr avatar Apr 30 '21 09:04 KatGr

@research-scife @KatGr I apologize for the inconvenience. The issue has not been worked on yet. I'll add this issue to our todo list.

lja1018 avatar May 03 '21 02:05 lja1018

Is there any way to fix this?

Icc-thang avatar Jan 06 '22 04:01 Icc-thang

@Icc-thang It hasn't been fixed yet.

lja1018 avatar Jan 12 '22 01:01 lja1018