Skip to content

Commit

Permalink
fix(Overlay): fix postion caculate error
Browse files Browse the repository at this point in the history
  • Loading branch information
tao1991123 committed Dec 6, 2018
1 parent 1db8bf1 commit d38a78f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/overlay/utils/position.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class Position {
for (let i = 0; i < expectedAlign.length; i++) {
const align = expectedAlign[i];
const pinElementPoints = this._normalizePosition(pinElement, align.split(' ')[0], isPinFixed);
const baseElementPoints = this._normalizePosition(baseElement, align.split(' ')[1], isBaseFixed);
const baseElementPoints = this._normalizePosition(baseElement, align.split(' ')[1], isPinFixed);
const pinElementParentOffset = this._getParentOffset(pinElement);
const baseElementOffset = (isPinFixed && isBaseFixed) ? this._getLeftTop(baseElement) : baseElementPoints.offset();
const top = baseElementOffset.top + baseElementPoints.y - pinElementParentOffset.top - pinElementPoints.y;
Expand Down

0 comments on commit d38a78f

Please sign in to comment.