Coder Social home page Coder Social logo

API: Cursor style property about revery HOT 3 CLOSED

revery-ui avatar revery-ui commented on May 19, 2024
API: Cursor style property

from revery.

Comments (3)

bryphe avatar bryphe commented on May 19, 2024

For example, even though its great we have some 'clickability' in #138 - the experience is not optimal:

image

When the mouse is over the 'Click Me' button, we should change from the pointer to a hand to indicate 'clickability. (There are also broader accessibility issues we'll need to work on here)

from revery.

OhadRau avatar OhadRau commented on May 19, 2024

I've gotten some work done here (mainly getting the style API implemented) but I'm kinda unsure of how to decide which node's cursor to take. I think a simple (but maybe hacky) way of deciding this is to choose the inner-most node as defined by "depth" from the root node. However, this makes the assumption that child nodes are always strictly on top of the parent node. Another option is picking the nearest edge/corner of a bounding box, but this is more computationally intensive and can also fail.

Edge case examples:

That said, all these will probably need to be replaced with some kind of raycasting algorithm to determine who drew the top-most visible pixel if we want to support non-rectangular bounding boxes so I don't think the choice will be very impactful long-term.

Apart from that, I'm still getting a weird error when trying to compile with both reason-fontkit + reason-glfw 3.2.1008 at the same time, so all this is kind of on hold until I figure out how to fix that.

from revery.

OhadRau avatar OhadRau commented on May 19, 2024

Should be fixed now with #168

from revery.

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.