GithubHelp home page GithubHelp logo

Comments (5)

wolfib avatar wolfib commented on August 14, 2024

Thanks for bringing that up, I never noticed this before.

The extent of the imperfect scaling seems to be dependent on browser and OS.

Currently the node width is determined by the size in pixels when writing the node's sequence to the screen. The zooming is handled automatically by d3.js and I suppose lines/rectangles and long pieces of text do not scale with the exactly same factor.

One solution would be to write the sequence letter by letter and supplying the coordinates instead of writing it as one big string. I'll give it some more thought and then probably do this.

from sequencetubemap.

subwaystation avatar subwaystation commented on August 14, 2024

Yeah, it is really strange. Always this Browser and OS dependency Hell...

I am wondering what would be the most efficient solution here? On the one hand an efficient drawing and on the other hand it should still be responsive for a huge number of bases. Do you think from an efficiency point of view, there will be a difference between the two ways of drawing?

from sequencetubemap.

subwaystation avatar subwaystation commented on August 14, 2024

It just came to my mind that from a functional point of view it would make more sense to draw each base on its own: When hovering over the base you can draw the same two lines as you did when hovering over a SNP. This could be helpful when visualizing a huge number of samples so that one can better identify what SNPs, INDELs, etc. are at a certain position.
What do you think?

from sequencetubemap.

wolfib avatar wolfib commented on August 14, 2024

I am working on an update for the interface which adds some kind of pagination so that you only see part of the graph and have to press a button to move left or right. This reduces the size of the image, so that I don't think the performance of writing each letter individually would be an issue.

I kind of like the hovering idea and since similar code is already there, it shouldn't be difficult to implement once the letters are written individually.

from sequencetubemap.

adamnovak avatar adamnovak commented on August 14, 2024

I'm still able to reproduce this. At certain zoom levels, the text of long nodes will get drawn past the end of the node, but it will fit inside the node at lower or higher zoom. We might be rounding our font sizes somehow.

For example, on the default demo visualization that loads when you open the page:

image

from sequencetubemap.

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.