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

Zoom causes nodes to Blur #178

Closed
SK0P3iN opened this issue Jan 24, 2022 · 5 comments
Closed

Zoom causes nodes to Blur #178

SK0P3iN opened this issue Jan 24, 2022 · 5 comments
Labels
help wanted Extra attention is needed plugin-options-vue Issues regarding the Vue options plugin plugin-renderer-vue Issues regarding the Vue renderer plugin

Comments

@SK0P3iN
Copy link

SK0P3iN commented Jan 24, 2022

Zooming in/out on nodes makes them blurry.
Just for me or anyone facing the same issue?

image

@newcat
Copy link
Owner

newcat commented Jan 25, 2022

Unfortunately this is a compositing issue by Chrome which I don't know how to fix. In this case, Chrome always puts the Math node into its own compositing layer as long as it has the output interface... no clue why. But text in elements, that are on their own compositing layer, is always blurry as soon as there are some scale transforms applied. Really sucks, I know 😞

If anybody is able to find a workaround for this, I am very happy to integrate it and fix this issue.

@newcat newcat added help wanted Extra attention is needed plugin-options-vue Issues regarding the Vue options plugin plugin-renderer-vue Issues regarding the Vue renderer plugin labels Jan 25, 2022
@SK0P3iN
Copy link
Author

SK0P3iN commented Jan 25, 2022

Hi, I managed to make it work (at least for me)

In the file @baklavajs\plugin-renderer-vue\dist\index.js line 1453, i changed:

"transform": "scale(" + this.plugin.scaling + ") translate(" + this.plugin.panning.x + "px, " + this.plugin.panning.y + "px)",

to

"transform": "scale(" + this.plugin.scaling + ")",
"position": "absolute",
"top": this.plugin.panning.y*this.plugin.scaling + "px",
"left": this.plugin.panning.x*this.plugin.scaling + "px",

Hope it is useful for someone, maybe not the best way but it works fine for me :)

image

the result:
from:
image
to this;
image

@code-is-art
Copy link

code-is-art commented Apr 27, 2022

@newcat I can confirm this worked for me also. This would be in baklavajs-plugin-renderer-vue/src/components/Editor.vue in line 123. This also fixed an issue where while zoomed out the text input would blur when selected.

newcat added a commit that referenced this issue Apr 28, 2022
@newcat
Copy link
Owner

newcat commented Apr 28, 2022

Have fixed this in v1.9.3. It does slightly decrease the performance but I guess it's better than having blurry nodes. Thanks for finding the workaround @SK0P3iN and for verifying it @code-is-art .

@newcat newcat closed this as completed Apr 28, 2022
@alexisrolland
Copy link

Hi there,
I am using version 1.9.3 and I somehow still have a blur issue. Here is the details.

I have a simple custom node with one text area option (note this text area is an Ant Design component). It looks good in general, but when zooming in/out and then clicking on the text area to type text, the whole node gets blurred. When clicking outside the text area, then it gets back to normal. This does not happen if I don't zoom in/out.

Not sure why but Github does not allow me to upload a screenshot :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed plugin-options-vue Issues regarding the Vue options plugin plugin-renderer-vue Issues regarding the Vue renderer plugin
Projects
None yet
Development

No branches or pull requests

4 participants