-
Notifications
You must be signed in to change notification settings - Fork 617
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
using a TextVisual leads to unintended scaling of other Visual #981
Comments
So you have this problem with using a single TextVisual with a list of two positions and a list of two strings. Does it happen if you make two text visuals, one with the first position and string, and the other with the second position and string? Can you turn it into a minimal example (e.g., using as few lines as possible on current |
@Eric89GXL: here is a minimal gist _what it looks like initially:_ _what it looks like after pressing a key twice on the keyboard_ It's funky, because, here's how the code works:
This is weird. My expected behavior would be that it shrinks immediately after I press a key. I have a feeling I'm missing something very obvious here :/ |
So the Things to probe:
|
@Eric89GXL I'll try both and get back |
@Eric89GXL It works perfectly if the second |
interesting... I wonder if I did something stupid with the concatenation and position setting. If you have time to investigate (e.g., by adding some debugging |
@Eric89GXL, I'll try and do it once I finish up the colorbar. I need to learn how to do the right coordinate transforms for it for the pixel width border! |
Cool. For now then, just use two TextVisuals in your ColorbarVisual so you can wrap that up, and add a note saying that they should be combined once this issue is closed. |
all right. also, once |
Yeah, but it blows up Luke's system, so don't wait for that. And we'll probably also need to modify it to e.g. allow actually setting what the ticks should be, or the number of ticks. Right now it is basic and just always does 10 spanning the full range of the axis, which might not be great for a colorbar. |
@Eric89GXL hm, okay then, I'm constructing two |
This might be related to #975. Is there any progress on this issue? It's been bugging me too... |
No, we need to get #928 in before we can make additional progress on these issues. Some of them will be fixed, some won't. But the systems have been changed there so we need to make the fixes to that. If you have time, you could help @campagnola and @bollu port visuals in the new system, which would get us closer to fixing this. |
Just fixed a bug in #928 where TextVisual was changing the glViewport; hopefully that's it. |
Yeah that's probably the culprit. But it needs to change it during
rendering of SDF. Can you point to the change? I'm curious how you fixed it.
|
See the most recent commit. |
I guess I should have just looked at the commits, sorry about that... looks like flushing at a different point in the code. I bet it will fix this. |
I'm not sure if creating an issue is the right thing to do, but I haven't been able to debug this, so I decided to go ahead and just create one.
The problem is that when I use a
TextVisual
with multiple strings (as the constructor allows, it throws off the scaling completely and causes the entire scene to become really tiny. I don't know why this happens.Also, it does not happen if you have a
TextVisual
with just one string. This to me is even more perplexing._Example of extreme scaling down:_
example in which this happens
offending line of code
_Proper rendering with one
TextVisual
_The text was updated successfully, but these errors were encountered: