question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allow Arrow to offset both left and top

See original GitHub issue

seems somewhat unnecessary to only support left OR top offset for arrow, but not both: https://github.com/souporserious/react-popper/blob/master/src/Popper.jsx#L155-L159

I’m writing a modifier to dynamically offset the popper on the alternate axis and counter-offset the arrow on the same axis, instead of relying on CSS margins etc, but react-popper actively fights this.

Is it fair to just do the simple thing and simply apply top and left offsets at all times?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
FezVrastacommented, Jul 10, 2017

react-popper should simply apply any style defined in the styles objects of arrow and popper elements. So yes, I this it would make sense to allow the OP’s modifier to work.

Also, please @giladgray, consider to release the modifier on npm, I think it may be useful for others.

If it’s not much code we may directly integrate the changes in the existing arrow modifier.

0reactions
souporseriouscommented, Jul 19, 2017

@giladgray interested in your solution to position the arrow, do you have any sample code you can point to? I’d love to integrate that in my own stuff 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use the node distance to offset the start and/or end of ...
First, it assumes the existance of two nodes between which to draw the arrow (in my case, there is only a single node)....
Read more >
Arrow | Popper
The arrow modifier positions an inner element of the popper so it appears centered relative to the reference element, usually the triangle or...
Read more >
Present UIPopoverController in same position with changing ...
My goal is to keep same coordinates for a UIPopoverController with just changing arrow offset. So basically i have three buttons ...
Read more >
Does Fletching Your Arrows Left or Right Make a Difference?
Fletching your arrows right offset or left offset based on the natural rotation of the arrow. What does the arrow do if you...
Read more >
Excel Shortcuts to Move the Selected Range with the Arrow ...
This technique uses a set of four very simple macros. The Range.Offset property allows us to reference the range to above, below, left,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found