Closed leonard-thieu closed 7 years ago
@leonard-thieu tried it and looks working, but atm is not valid to be merged unfortunately.
:not()
looks not widely supported http://caniuse.com/#search=%3Anotdist/
folder Can you make these changes?
thanks a lot for your time!
:not() looks not widely supported http://caniuse.com/#search=%3Anot
That's for the selector list argument. I'm only using single simple selectors.
The tip arrow is not showing up
I'm not sure why the tip arrow is not showing up for you (or why the tooltip isn't positioned correctly). I can't reproduce it. This is how it displays for me:
Also, I'm thinking I should change the order of the directions that the smart
algorithm iterates through. Originally, smart
selected counter-clockwise from the start direction (except for bottom
for which it went clockwise). I tried to keep some backwards-compatibility by having it try cardinal directions first but I didn't implement it correctly (and it wouldn't work for bottom
anyway).
I think it might make more sense to have it cycle through all directions in order (i.e. top
-> top left
-> left
-> bottom left
). This should result in it selecting a position closer to the start position and take less iterations to find a position.
@leonard-thieu
That's for the selector list argument. I'm only using single simple selectors.
You're right sorry i found the wrong :not()
I'm not sure why the tip arrow is not showing up for you (or why the tooltip isn't positioned correctly). I can't reproduce it.
Now it works also for me, i cloned your fork https://github.com/leonard-thieu/angular-tooltips and checked out the corner-positioins branch, everythings ok now :)
So let me know how you want to proceed for the directions order, if to open a new PR and merge this or if to wait a little, no problems ... :)
I'll just make the change now since it hasn't been merged yet.
This should be good to go.
@leonard-thieu tried it locally https://github.com/leonard-thieu/angular-tooltips/tree/corner-positions
but it doesn't seem to work, am i missing anything?
thank you.
I can't reproduce and I'm not sure why it's positioning top
instead of top left
for you.
@leonard-thieu sorry my bad this was the problem https://github.com/720kb/angular-tooltips/blob/master/index.html#L359 :) must be src/ not dist/ thanks for this great addition, i am going to release it
Fixes #205
This PR adds support for corner positions (
top left
,top right
,bottom left
,bottom right
). This also modifies thesmart
option to include the corner position as candidates. However, it appears thesmart
algorithm doesn't work correctly even in the most recent commit (44da315a24451b04b2d59d38569c1f9f20e4b436). I believe this also fixes a bug withonTooltipSideChange
where it may have failed to remove the old attribute.Also, I didn't know what to do with the tip arrows. They ended up looking pretty ugly.