@@ -232,6 +232,7 @@ AFRAME.registerComponent('dialog-popup', {
232232 if ( this . dialogPlaneEl ) {
233233 this . positionDialogPlane ( ) ;
234234 this . dialogPlaneEl . setAttribute ( 'visible' , this . isOpen ) ;
235+ this . openIconEl . setAttribute ( 'visible' , ! this . isOpen ) ;
235236 }
236237 } ,
237238
@@ -246,7 +247,7 @@ AFRAME.registerComponent('dialog-popup', {
246247 openOn = _this$data . openOn ;
247248 var openIcon = document . createElement ( 'a-entity' ) ;
248249 openIcon . setAttribute ( 'id' , "" . concat ( this . el . getAttribute ( 'id' ) , "--open-icon" ) ) ;
249- openIcon . setAttribute ( 'position' , this . el . getAttribute ( 'position' ) ) ;
250+ openIcon . setAttribute ( 'position' , Object . assign ( { } , this . el . getAttribute ( 'position' ) ) ) ;
250251 openIcon . setAttribute ( 'geometry' , {
251252 primitive : 'circle' ,
252253 radius : radius
@@ -417,6 +418,7 @@ AFRAME.registerComponent('dialog-popup', {
417418 color = _this$data6 . dialogBoxColor ;
418419 var plane = this . dialogPlaneEl || document . createElement ( 'a-entity' ) ;
419420 plane . setAttribute ( 'id' , "" . concat ( this . el . getAttribute ( 'id' ) , "--dialog-plane" ) ) ;
421+ plane . setAttribute ( 'position' , Object . assign ( { } , this . el . getAttribute ( 'position' ) ) ) ;
420422 plane . setAttribute ( 'visible' , false ) ;
421423 plane . setAttribute ( 'geometry' , {
422424 primitive : 'plane' ,
@@ -447,6 +449,7 @@ AFRAME.registerComponent('dialog-popup', {
447449 spawnEntities : function spawnEntities ( ) {
448450 this . el . appendChild ( this . generateOpenIcon ( ) ) ;
449451 this . el . appendChild ( this . generateDialogPlane ( ) ) ;
452+ this . el . removeAttribute ( 'position' ) ;
450453 }
451454} ) ;
452455
0 commit comments