Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Internal: Revert balloon position calculation changed in the docs upd…
Browse files Browse the repository at this point in the history
…ate.
  • Loading branch information
jodator committed Jul 1, 2019
1 parent 3b3f269 commit 6d061dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/panel/balloon/balloonpanelview.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ export default class BalloonPanelView extends View {
fitInViewport: true
}, options );

const { top, left, name: position } = BalloonPanelView._getOptimalPosition( positionOptions );
const optimalPosition = BalloonPanelView._getOptimalPosition( positionOptions );

// Usually browsers make some problems with super accurate values like 104.345px
// so it is better to use int values.
const left = parseInt( optimalPosition.left );
const top = parseInt( optimalPosition.top );
const position = optimalPosition.name;

Object.assign( this, { top, left, position } );
}
Expand Down

0 comments on commit 6d061dd

Please sign in to comment.