Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

negative tip offset doesn't work when position.my is set to "top center" or "bottom center" #556

Closed
hippasus opened this issue Jul 11, 2013 · 0 comments
Milestone

Comments

@hippasus
Copy link

When position.my is either top or bottom center, setting the tip offset to a negative value does not take any effect.

$('.tooltip').qtip({
    position: {
        my: "top center" // or "bottom center"
    },
    style: {
        tip: {
            offset: -10
        }
    }
});

I think it's caused by setting userOffset = Math.max(0, this.options.offset) in the calculate function.

When the side is CENTER, I think we can fix this by changing the code to position[MARGIN+'-' + b] = -Math.round(size[ precedance === Y ? 0 : 1 ] / 2) + self.options.offset;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant