Skip to content

Getting tooltip dimensions in "position" function #78

@spoudazon

Description

@spoudazon

Hi,
I want to make automatic tooltips positioning without passwing "x" and "y" parameters and I have problem with getting dimensions of the actual notification box.
I am trying to get dimensions of the notification box in the "position" function, but I can't get dimensions for the actual box, I am always getting dimensions for the last created box.
I have tried that, but without success:

position: function() {

console.log($.prompt.getCurrentStateName());
console.log($.prompt.getCurrentState().width());
console.log($.prompt.getCurrentState().prev().width());
console.log($.prompt.getCurrentState().next().width());
console.log($.prompt.getState($.prompt.getCurrentStateName()).width());
}

Is there any way to get these dimensions without rewriting your code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions