-
Notifications
You must be signed in to change notification settings - Fork 456
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
Magnify tool not working for all elements when added and it breaks #1172
Comments
@dannyrb or anyone, Have you gotten a chance to look into this yet? I don't mean to rush anyone if it's already being worked on. I just wasn't sure if it has been seen since it has been up for a few days. I don't know what the expected turnaround time for these should be since it is open source. |
I already found a solution.
|
@jlopes90 that makes it work for when you have more than one image for it to work on? |
@jlopes90 I'll try it, but even if that works, it seems like a bug that you need to add that type of styling. It should work by default like the others do. |
@kuehlc, does that do the trick for you? We could inline the style on the dynamically created element; I believe we don't because we don't want it to interfere with any user defined styles. |
@dannyrb yes, the style change made it work. It just seems like a bug because the other tools work by default for this. I don't see how the same thing for those tools can't be done for magnify, but you know the code better than me. |
@kuehlc, that's a good point. I wouldn't be against a PR that adds the appropriate style a la JS when the magnifying glass should be visible. |
I don't have time to do the PR myself due to a deadline that I'm on for a current project, but I agree that this would be a nice add. Thanks in advance for whoever commits it. |
I have like a same problem with magnify (i work with a four viewports)
after this steps i have incorrect behavior for other viewports for the Move tool This behavior i can get for the version in master branch and on the OHIF demo site version |
Magnify tool appears to have another (potentially related) issue where each "click" creates a new enabled element. This causes ~22 tools to be duplicated when the sync flag is set (you can see this at I'm wondering if listeners / elements aren't being properly cleaned up in some scenarios. I think the issue may be that we need to shift the clean-up from framework lifecycle events to registrations in the create/add. ( |
oh yeah, i saw this problem with creating additional elements |
Believe this is resolved in 4.19.1, would be great if y'all could check! |
Prerequisites
Latest
Yes
Yes. None looked related.
Description
I have tested adding/enabling tools that I want to work on up to 4 images at a time. Pan, zoom, and wwwc tool seem to work fine on each element when added, but the magnify tool only works (appears, but does not work properly) for a single element.
Steps to Reproduce the issue
Right click on second element
Drag mouse
Magnify glass shows up on first element, but it does not cover properly. It gets locked to part of the first image, and it does not let you move the magnifying glass over the entire area that it should be enabled for.
Expected behavior: (What you expected to happen)
Magnify tool to work for each individual element when it is added globally.
Actual behavior: (What actually happened)
Magnify only works (appears, but does not work properly) on one element. When trying to use it on second element, it appears on the first element instead.
CodeSandbox With Reproduction of Issue:
https://codesandbox.io/s/nervous-chebyshev-nfz39
The text was updated successfully, but these errors were encountered: