-
Notifications
You must be signed in to change notification settings - Fork 27
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
Bug About Loading Solid Color Scheme Maps on another Map #726
Comments
Btw, the way to test this easily is this:
The changes are now live on the internal server. |
@umut-er The code you commented is required to set default properties of the map based on the properties read from the file. For example, open Newt, set color scheme to Gradient, open Insulin sample (with solid color scheme) and try to add new nodes to map. You will see that new elements added don't use the color scheme of Insulın but the Gradient. |
@hasanbalci What if I uncomment the old code as well? Do you think that is a good idea? |
@umut-er I think it should work. So please uncomment the previous code and keep the new one. |
There is another issue as well. If you try to load a plain sbgnml map (not a sample this time) on top of a gradient or 3D the colors are still off. Here is the cause of this issue: After loading a new map, we look for map properties defined inside of it. Since plain sbgnml files don't have such information (compare samples of type .nwt, which have that information), we do not correctly reset the color scheme. I will make a fix for this as well and push them together. |
Or is this intended? There are some comments that seem to indicate that this is intended. I am not going to make any changes about the comment above. |
@hasanbalci I did as you requested. The changes are now live on the internal server. Can you review please? |
It seems working well, thanks. For the other issue, I think it is ok to use the current color scheme when we load SBGN plain files. |
Here is a bug I detected with item 4 (file operations) of issue #725. This is specifically about color schemes.
If a sample or file with color scheme of type
solid
is loaded on top of a another already existing map of color schemegradient
or3D
, the colors won't be rendered correctly on the map even though it will be shown correctly on the sidebar. Refer to the video below:Screen.Recording.2024-07-04.at.12.24.13.mp4
I determined that this issue is caused by not properly deleting the background image. I tried to fix this and it seems to be gone. Here is the code I changed (this is in newt app-menu.js lines 823-839):
I found the new code after inspecting how the manual removal of background images works. You can see the button related to that:
and here is the code related to that button (found at newt inspector-utilities.js lines 817-821):
as you can see, I copy pasted it almost one-to-one and it seems to be working. However, I don't exactly understand what the old code does and why it doesn't work. I think someone more knowledgable than me should review this change and insure that it doesn't get rid of other functionalities that we might want.
The text was updated successfully, but these errors were encountered: