File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -206,9 +206,10 @@ AFRAME.registerComponent('dialog-popup', {
206206 value : value . substring ( 0 , wrapCount ) ,
207207 color,
208208 font,
209- width,
210209 wrapCount,
211- baseline : 'top'
210+ width : width - padding * 2 ,
211+ baseline : 'top' ,
212+ anchor : 'left'
212213 } ) ;
213214
214215 let y = height / 2 - padding ;
@@ -217,7 +218,7 @@ AFRAME.registerComponent('dialog-popup', {
217218 }
218219
219220 title . setAttribute ( 'position' , {
220- x : padding ,
221+ x : - ( width / 2 ) + padding ,
221222 y,
222223 z : 0.01
223224 } ) ;
@@ -244,10 +245,11 @@ AFRAME.registerComponent('dialog-popup', {
244245 body . setAttribute ( 'text' , {
245246 value,
246247 color,
247- width,
248248 font,
249249 wrapCount,
250- baseline : 'top'
250+ width : width - padding * 2 ,
251+ baseline : 'top' ,
252+ anchor : 'left'
251253 } ) ;
252254
253255 let y = height / 2 - padding * 3 ;
@@ -256,7 +258,7 @@ AFRAME.registerComponent('dialog-popup', {
256258 }
257259
258260 body . setAttribute ( 'position' , {
259- x : padding ,
261+ x : - ( width / 2 ) + padding ,
260262 y,
261263 z : 0.01
262264 } ) ;
You can’t perform that action at this time.
0 commit comments