Fix: Create highlight dialog is misaligned on first highlight#159
Fix: Create highlight dialog is misaligned on first highlight#159pramodsum merged 4 commits intobox:masterfrom
Conversation
|
Verified that @pramodsum has signed the CLA. Thanks for the pull request! |
| * @param {HTMLElement} dialogEl - Annotation dialog element | ||
| * @return {number} Annotations dialog width | ||
| */ | ||
| export function getDialogWidth(dialogEl) { |
There was a problem hiding this comment.
I see that it was like this before, but is there a reason for hiding/showing the dialog so many times in this function? There may be a lot of layout recalculation going on when making these calls, and even the possibility of incorrect values being returned
There was a problem hiding this comment.
Hmm so I think the reason this was done this way was so that we could get the entire dialog width and accurately position the dialog before we actually display it. Then we wouldn't have the dialog shown and THEN repositioned correctly.
I could definitely see how it could cause some recalculations. I am open to suggestions on how to optimize this :)
There was a problem hiding this comment.
@JustinHoldstock any thoughts on how to improve this?
No description provided.