newt icon indicating copy to clipboard operation
newt copied to clipboard

Border width changes on background image use

Open ugurdogrusoz opened this issue 4 years ago • 6 comments

Any particular reason the border width of nodes changes when experiment data is overlaid?

  • Load sample experiment map and data (notice how RB1 has thinner border than CCNE) p53_rb_pathway
  • "Remove All" (notice how border width are the same for all nodes) p53_rb_pathway (1)

ugurdogrusoz avatar Mar 19 '20 18:03 ugurdogrusoz

I think this issue is not related to the experiment data overlay. I tried setting a background image manually and border width was thinner. I believe it is predefined somewhere in the node functionalities.

image

mervekilicarslan5 avatar Mar 19 '20 18:03 mervekilicarslan5

@ugurdogrusoz The border is not thinner, half of it is hiding behind the background image, if you set background image then decrease opacity to see through it, you will see the full border. I guess when we sit background image width to 100% it covers all the width of node which includes half the border thickness.

nasimsaleh avatar Mar 20 '20 04:03 nasimsaleh

@nasimsaleh can you please check various options for background images and see if there is one that avoids this problem? Also any way we can change the drawing order of border and background image? Please see if there is a related ticket in Cytoscape.js repo.

ugurdogrusoz avatar Mar 20 '20 04:03 ugurdogrusoz

This same issue is reported here. Max suggests setting a padding equal to half the border width.

nasimsaleh avatar Mar 20 '20 06:03 nasimsaleh

Following the above solution by increasing padding won't work, because we have to set the option "background-width-relative-to" to "inner" so it doesn't include padding when calculating the width of background image, which will create problem with compound parent nodes background images which wont cover all the node since it will ignore the padding.

nasimsaleh avatar Mar 20 '20 07:03 nasimsaleh

Let's ignore this for now.

ugurdogrusoz avatar Mar 20 '20 07:03 ugurdogrusoz