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

Zooming sometimes breaks until image cache is cleared #188

Closed
JordanMagnuson opened this issue Oct 30, 2020 · 11 comments
Closed

Zooming sometimes breaks until image cache is cleared #188

JordanMagnuson opened this issue Oct 30, 2020 · 11 comments

Comments

@JordanMagnuson
Copy link

The main window canvas view sometimes breaks until browser image cache is cleared. Please see this video for a clear depiction of the problem: https://drive.google.com/file/d/13NQz0U9vXUVHCKh3EZmFyCmlymXL-PKW/view

I have experienced this issue on multiple Windows 10 machines using both Chrome and Firefox.

Possibly related: zooming of shadows appears to be broken 100% of the time. To reproduce in an obvious way, simply add an image to any canvas and create a shadow effect (effects -> css effects -> shadow) with significant offset (e.g. x offset 100, y offset 100, radius 20), then try zooming the canvas way in and way out -> you'll notice that the shadow position seems to change drastically with the zooming. This happens whether or not browser image cache has been cleared.

Again: Windows 10, Chrome and Firefox.

@viliusle
Copy link
Owner

viliusle commented Nov 3, 2020

Are these 2 bugs or 1?
I understand shadow bug clearly.
But I still do not understand issue with zoom and cache, are you saying that if you zoom in and out for too long, it will crash or freeze?

@JordanMagnuson
Copy link
Author

Sorry for the confusion. I believe these are two separate bugs--I included them in one issue because I thought they may be related, but probably they should be two separate issues.

The first bug is more challenging because I have not yet figured out how to reproduce it, but it has occurred multiple times on multiple different Windows 10 machines (running both Chrome and Firefox). If you watch the video I linked, you can see that there is something wrong with the main display window: when zooming in and out the position of the items on the canvas seems to change (watch the position of the flower, for example, as I zoom in and out in the video). The canvas elements appear to move around on the canvas--which is why I thought it might be related to the shadow zoom bug. But the difficulty is that this issue does not occur all the time--only sometimes. And it appears to be resolved by clearing the browser's image/file cache.

Does that make anything more clear? Have you never run into this issue? I can try to make another video if that would be helpful.

@Giwayume
Copy link
Contributor

Giwayume commented Nov 5, 2020

Can you share your project file just in case?

@viliusle
Copy link
Owner

viliusle commented Nov 5, 2020

I also can not reproduce it, and don't remember seeing anything like that.

@viliusle
Copy link
Owner

viliusle commented Nov 5, 2020

It can be issue when opening old json on another version miniPaint, we will see after he will share that JSON file.

@JordanMagnuson
Copy link
Author

JordanMagnuson commented Nov 6, 2020

I don't think the canvas-zoom breaking bug is related to the project file: I have run into this issue multiple times with multiple different projects, on two different computers.

But here is one project file where I have observed the issue, just in case: testing_shadow.json

@Giwayume
Copy link
Contributor

Giwayume commented Nov 7, 2020

=/

I found a consistent way to break it.

Visit https://viliusle.github.io/miniPaint/

    • File -> New
    • Select 640x480
    • Click Ok
  1. Zoom out to 60% or so
    • File -> New
    • Select 640x480
    • Click Ok
  2. Use the pencil tool to draw on the canvas (for reference)
  3. Zoom in and out and you'll see it break

Problem seems to be with zooming out and zoom position/scale being retained after loading a new file.

@JordanMagnuson
Copy link
Author

@Giwayume Ah, yes! Thank you for figuring out how to reproduce the issue!

@viliusle
Copy link
Owner

viliusle commented Nov 7, 2020

I never saw this issue, because i always use F5 to refresh page.

p.s. both issues are fixed.
p.s.s. let me know if this is really annoying, so i will push new version to live faster.

@viliusle viliusle closed this as completed Nov 7, 2020
@JordanMagnuson
Copy link
Author

Thank you! Yes, if it's possible to push this to the live demo that would be great!

@viliusle
Copy link
Owner

Pushed to live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants