fix #775 popup widget positioning #792

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

carlo-mr commented Oct 31, 2013

Allow mixing of absolute and relative positioning for popups.

If a domReference/referenceId is given and an absolutePosition configuration,
then the given absolute positions will overwrite the ones calculated based on the given reference.

Added tests for the new behavior.

fix #775 popup widget positioning
Allow mixing of absolute and relative positioning for popups.

If a domReference/referenceId is given and an absolutePosition configuration,
then the given absolute positions will overwrite the ones calculated based on the given reference.

Added tests for the new behavior.

@ghost ghost assigned divdavem Nov 19, 2013

- if (conf.absolutePosition === null) {
+ if (conf.absolutePosition === null ||
+ //allow mixing of relative and absolute positioning #775
+ (conf.absolutePosition !== null && conf.domReference !== null)) {
@divdavem

divdavem Nov 19, 2013

Member

This condition can be expressed more simply with:

if (conf.absolutePosition === null || conf.domReference !== null) {

(there is no need to check conf.absolutePosition !== null in the second part of the OR as that part is only evaluated when the first part of OR is false, so when conf.absolutePosition !== null is evaluated, it will always be true)

@divdavem divdavem closed this in 54264b4 Nov 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment