Giter Club home page Giter Club logo

Comments (4)

everweij avatar everweij commented on May 19, 2024

Hi Rijk,
Again, good question!
It's true that defining possibleAnchors has no effect on the anchor priority.
There is, however, some logic / rationale to which determines the anchor priority dynamically. This function looks at anchor (the 'preferred' anchor), preferX, preferY and possibleAnchors, and outputs a list of anchors sorted by priority. It than tries to find the first one that 'fits'.

This prioritising is currently implicit, which I think will work for many use-cases (together with preferX/Y). However, there may be use-cases where you want to prioritise the anchors explicitly.

How would you define such behavior? Right now, possibleAnchors just sets the available anchors. I don't think that this prop should do 2 things. Maybe an extra prop: anchorPriority? Or maybe a flag respectAnchorPriority that 'respects' / overrides the priority based on possibleAnchors? 😅

What do you think?

from react-laag.

rijk avatar rijk commented on May 19, 2024

If you ask me, this is not important enough to add another property for. I thought it could 'just work' like this, and that would be pretty nice. In this case I wanted BOTTOM_LEFT/BOTTOM_RIGHT to be used only as a last resort. It seems preferX/preferY cannot really help here.

But yeah, it is not super important, and if there's other considerations here I understand.

from react-laag.

everweij avatar everweij commented on May 19, 2024

I do think your wish is legitimate, but as a consequence it add more complexity. Will keep this open for now and see if others are running into the same issue as well...

from react-laag.

rijk avatar rijk commented on May 19, 2024

I'll close this as it's not that important.

from react-laag.

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.