jQuery-Impromptu icon indicating copy to clipboard operation
jQuery-Impromptu copied to clipboard

Getting tooltip dimensions in "position" function

Open mikolajzieba opened this issue 8 years ago • 0 comments

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?

mikolajzieba avatar Aug 30 '16 06:08 mikolajzieba