File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
* @module Typography
3
3
*/
4
4
5
- import { textCoreConstants } from './textCore.js' ;
5
+ import { textCoreConstants } from './textCore' ;
6
+ import * as constants from '../core/constants' ;
6
7
7
8
/*
8
9
API:
@@ -329,19 +330,19 @@ class Font {
329
330
let x = bounds . x ;
330
331
let y = bounds . y + ( i * textLeading ) + ascent ;
331
332
let lineWidth = renderer . _fontWidthSingle ( text ) ;
332
- if ( textAlign === fn . CENTER ) {
333
+ if ( textAlign === constants . CENTER ) {
333
334
x += ( bounds . w - lineWidth ) / 2 ;
334
335
}
335
- else if ( textAlign === fn . RIGHT ) {
336
+ else if ( textAlign === constants . RIGHT ) {
336
337
x += ( bounds . w - lineWidth ) ;
337
338
}
338
339
if ( typeof width !== 'undefined' ) {
339
340
switch ( renderer . states . rectMode ) {
340
- case fn . CENTER :
341
+ case constants . CENTER :
341
342
x -= width / 2 ;
342
343
y -= height / 2 ;
343
344
break ;
344
- case fn . RADIUS :
345
+ case constants . RADIUS :
345
346
x -= width ;
346
347
y -= height ;
347
348
break ;
You can’t perform that action at this time.
0 commit comments