satmisha
asked on
how to get the last coordinates(Top and Left) of the popover using javascript
Hi Team,
Have made the popover which appears when the user clicks on the button, the user can scroll wherever the user wants.
The issue I am facing when I click on popover again it resets its position that means that popover appears from its default location rather appearing from the location where it was left earlier.
Enclosing the running code example, please suggest?
Click on 'POpover' button brings popover, you can drag and drop the popover wherever you want but the moment you click the button again it resets its position whereas expected is it should appear from the last location.
https://jsfiddle.net/girinishantg/w9cgzayj/12/
Have made the popover which appears when the user clicks on the button, the user can scroll wherever the user wants.
The issue I am facing when I click on popover again it resets its position that means that popover appears from its default location rather appearing from the location where it was left earlier.
Enclosing the running code example, please suggest?
Click on 'POpover' button brings popover, you can drag and drop the popover wherever you want but the moment you click the button again it resets its position whereas expected is it should appear from the last location.
https://jsfiddle.net/girinishantg/w9cgzayj/12/
ASKER
Thanks leakim971, I have gone through that but you see there are some associated issues like
1- flickering is happening
2- coordinates are not accurate as popover does not appear exactly where it was left.
I am trying with limited knowledge to solve it appreciate if you could help in this.
1- flickering is happening
2- coordinates are not accurate as popover does not appear exactly where it was left.
I am trying with limited knowledge to solve it appreciate if you could help in this.
ASKER
Hi Leakim971, I have achieved the second point i.e. generating the popover last left. The only issue left is the flickering part.
If you see there is a fraction of second flickering happens when popover appears second time onwards, is there anything that we could do here? enclosing working example below.
https://jsfiddle.net/girinishantg/w9cgzayj/30/
If you see there is a fraction of second flickering happens when popover appears second time onwards, is there anything that we could do here? enclosing working example below.
https://jsfiddle.net/girinishantg/w9cgzayj/30/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much leakim971.
Open in new window
Open in new window