Only use default pos if top/left are undefined
Allows 0 (which is falsey) to be passed as an offsets. Fixes #141
This commit is contained in:
@@ -149,8 +149,8 @@
|
|||||||
height: this.$element[0].offsetHeight
|
height: this.$element[0].offsetHeight
|
||||||
} );
|
} );
|
||||||
return {
|
return {
|
||||||
top: this.top || pos.top + pos.height,
|
top: this.top !== undefined ? this.top : pos.top + pos.height,
|
||||||
left: this.left || '25%'
|
left: this.left !== undefined ? this.left : '25%'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user