Closed tangtingtt closed 6 months ago
Hi, that only happens if caching is disabled (for example when you are checking out the chart with dev tools open). I don't think that there is a way around it since when expanding and collapsing, everything is being rendered, including images
thanks,😊Do you mean when caching is disabled in browser developer tools?
---Original--- From: "David @.> Date: Wed, May 29, 2024 19:17 PM To: @.>; Cc: @.**@.>; Subject: Re: [bumbeishvili/org-chart] The folding/folding function causes theimage within the node to flash (Issue #408)
Hi, that only happens if caching is disabled (for example when you are checking out the chart with dev tools open). I don't think that there is a way around it since when expanding and collapsing, everything is being rendered, including images
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Yes, when caching is disabled, flickering happens, because the image is being loaded once again, if caching is allowed, then image loading is instantaneous and while image loading still happens from a cache, it's not noticeable
Ok, I will go to the company tomorrow to have a try, thank you for your reply, good luck!
---Original--- From: "David @.> Date: Wed, May 29, 2024 20:38 PM To: @.>; Cc: @.**@.>; Subject: Re: [bumbeishvili/org-chart] The folding/folding function causes theimage within the node to flash (Issue #408)
Yes, when caching is disabled, flickering happens, because the image is being loaded once again, if caching is allowed, then image loading is instantaneous and while image loading still happens from a cache, it's not noticeable
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
After testing, it is indeed caused by disabling browser caching, so this is not a problem. Thank you very much! 😀However, en...,I have another small question. If I want to use the mouse to select elements within a node (ordinary text implemented by div tags) for copying, what kind of attribute should I set? @bumbeishvili I see that in your example(https://stackblitz.com/edit/js-1kytuv?file=index.html), you can select the text within the node, but I don't understand why or how I should implement it.
@tangtingtt When you are trying to select the text, panning event fires and chart is being panned
This is controlled by built-in d3.zoom class.
In that example, we are passing different d3. zoom class and we override the behavior, basically saying that don't apply panning to TR,TD, TH elements.
If you require text selection of specific divs, you can assign a specific class to them and then check if e.srcElement
has that class inside this function (instead of checking if it is TR,TD or TH elements)
@tangtingtt When you are trying to select the text, panning event fires and chart is being panned
This is controlled by built-in d3.zoom class.
In that example, we are passing different d3. zoom class and we override the behavior, basically saying that don't apply panning to TR,TD, TH elements.
If you require text selection of specific divs, you can assign a specific class to them and then check if
e.srcElement
has that class inside this function (instead of checking if it is TR,TD or TH elements)
According to your method, I succeeded. Thank you very much!
Hello author, Currently, when I fold/unfold child nodes, the elements of the parent node will be reloaded (the avatar img will be re rendered). Is there a way to solve this problem? I wrote the avatar implementation in the nodeContent function