GithubHelp home page GithubHelp logo

Comments (1)

johnfactotum avatar johnfactotum commented on May 23, 2024 1

Ideally it should be displayed in the margins to avoid obstructing the text.

Another issue is that it probably needs to be aware of the visible viewport so that in paginated mode, highlights that span multiple pages would have the icon on all pages. Edit: on second thought, maybe it'd be enough to show it at either the start or end of the highlight; showing it on each page is a bit weird as it would seem like there are multiple notes for the highlight.

So considering these two points, I think it'd probably make sense to have the renderer export a list of rects for the pages. Then it should be relatively straight forward to calculate the desired positions for the icons.

There are a couple remaining issues with this. The first is whether or how to handle collisions when you have multiple highlights on the same line. The second is whether or how to handle pointer events. Currently events are only handled if you click inside the rects of the highlighted text, rather than the hightlights themselves.

from foliate.

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.