Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Arrow isn't centered correct because of bubble border #325

Open
Spenhouet opened this issue Mar 21, 2017 · 0 comments
Open

Arrow isn't centered correct because of bubble border #325

Spenhouet opened this issue Mar 21, 2017 · 0 comments
Labels

Comments

@Spenhouet
Copy link

Spenhouet commented Mar 21, 2017

If you set arrowOffset to "center" and the bubble has a border, the arrow is not centered correct.

Minimal example: http://fiddle.jshell.net/x62303x6/

The bubbleBoundingWidth / bubbleBoundingHeight is from el.offsetWidth / el.offsetHeight and does include the border but the arrow position is set relative to the bubble content (without border).

Line 684 in dist:

arrowEl.style[arrowPos] = Math.floor((bubbleBoundingWidth / 2) - arrowEl.offsetWidth/2) + 'px';

Line 694 in dist:

arrowEl.style.top = Math.floor((bubbleBoundingHeight / 2) - arrowEl.offsetHeight/2) + 'px';
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants