Git Product home page Git Product logo

Comments (7)

bumbeishvili avatar bumbeishvili commented on August 11, 2024 1

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

from org-chart.

bumbeishvili avatar bumbeishvili commented on August 11, 2024 1

@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)

image

from org-chart.

bumbeishvili avatar bumbeishvili commented on August 11, 2024

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

from org-chart.

tangtingtt avatar tangtingtt commented on August 11, 2024

from org-chart.

tangtingtt avatar tangtingtt commented on August 11, 2024

from org-chart.

tangtingtt avatar tangtingtt commented on August 11, 2024

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.

from org-chart.

tangtingtt avatar tangtingtt commented on August 11, 2024

@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)

image

According to your method, I succeeded. Thank you very much!

from org-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.