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

Commit

Permalink
Other: Updated balloon position names after refactoring in the Balloo…
Browse files Browse the repository at this point in the history
…nPanelView class. Closes #92.
  • Loading branch information
oleq committed Apr 10, 2017
1 parent 0e8c6ca commit 4da5be2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/image/ui/imageballoonpanelview.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const positions = {
return {
top: targetRect.bottom + arrowVOffset,
left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,
name: 's'
name: 'arrow_s'
};
},

Expand All @@ -36,7 +36,7 @@ const positions = {
return {
top: targetRect.top - balloonRect.height - arrowVOffset,
left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,
name: 'n'
name: 'arrow_n'
};
}
};
Expand Down
4 changes: 2 additions & 2 deletions tests/image/ui/imageballoonpanelview.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ describe( 'ImageBalloonPanel', () => {
const balloonRect = { width: 50, height: 20 };

const northPosition = north( targetRect, balloonRect );
expect( northPosition.name ).to.equal( 'n' );
expect( northPosition.name ).to.equal( 'arrow_n' );
expect( northPosition.top ).to.equal( targetRect.top - balloonRect.height - BalloonPanelView.arrowVerticalOffset );
expect( northPosition.left ).to.equal( targetRect.left + targetRect.width / 2 - balloonRect.width / 2 );

const southPosition = south( targetRect, balloonRect );
expect( southPosition.name ).to.equal( 's' );
expect( southPosition.name ).to.equal( 'arrow_s' );
expect( southPosition.top ).to.equal( targetRect.bottom + BalloonPanelView.arrowVerticalOffset );
expect( southPosition.left ).to.equal( targetRect.left + targetRect.width / 2 - balloonRect.width / 2 );
}
Expand Down

0 comments on commit 4da5be2

Please sign in to comment.