Przeglądaj źródła

Other: Updated balloon position names after refactoring in the BalloonPanelView class. Closes #92.

Aleksander Nowodzinski 8 lat temu
rodzic
commit
1ed23bc8d5

+ 2 - 2
packages/ckeditor5-image/src/image/ui/imageballoonpanelview.js

@@ -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'
 		};
 	},
 
@@ -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'
 		};
 	}
 };

+ 2 - 2
packages/ckeditor5-image/tests/image/ui/imageballoonpanelview.js

@@ -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 );
 	}