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:
Ed S
2014-04-22 00:23:38 -07:00
parent d6d0fb49bd
commit 2c0f4e1114

View File

@@ -149,8 +149,8 @@
height: this.$element[0].offsetHeight
} );
return {
top: this.top || pos.top + pos.height,
left: this.left || '25%'
top: this.top !== undefined ? this.top : pos.top + pos.height,
left: this.left !== undefined ? this.left : '25%'
};
},