feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Bug if you rotate the screen after drawing

Open 1rach opened this issue 4 years ago • 6 comments

Version

2.2.1

Library

feedback

Flutter channel

stable

Flutter version

2.8

Platform

Android, iOS, Web

Details

Thanks for this interesting package 👍.

I’ve found a bug :

when I took a screenshot and then I draw then finally I rotate the screen the drawing is not displayed correctly.

Steps to reproduce

1 screenshot 2 draw something 3 rotate the device

Output of flutter doctor -v

No response

1rach avatar Dec 13 '21 21:12 1rach

Hey, thanks for reporting. What would you expect to happen instead?

ueman avatar Dec 13 '21 21:12 ueman

For example, take a look at this image :

Before rotation (screen is horizontal): image

After rotation (screen is vertical after rotation) : image

As you can see, the "green plus", is on the blue button on the first screenshot, but the position is not correct on the second screenshot.

Let me know if I'm not clear.

1rach avatar Dec 13 '21 21:12 1rach

I cannot see the difference.

calcitem avatar Dec 13 '21 22:12 calcitem

I do understand the problem. I was just asking what you're expecting as the solution to the problem.

When you're rotating from horizontal to portrait you could have drawings which are cut off on the sides, because the screen isn't as wide anymore. Shrinking the drawing to fit the screen doesn't make much sense, I guess, because you're drawing to point something out about the UI which changed because of the rotation.

So I think it kinda makes sense to delete the drawing on rotations, though that's also not a nice UX.

Maybe the rotation should be disallowed while drawing.

What are your thoughts on this?

ueman avatar Dec 14 '21 05:12 ueman

It's currently not possible to read the current device orientation with Flutter. I've created an issue for that: https://github.com/flutter/flutter/issues/95719

ueman avatar Dec 23 '21 08:12 ueman

What about aligning the drawing to the center of the screen so that if the device orientation changes, the drawing at least remains centered?

eg if the window reduces n units on the x axis, the drawing will be shifted left by n/2 units.

caseycrogers avatar Dec 29 '21 04:12 caseycrogers