File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ AFRAME.registerComponent('info-message', {
8181 this . infoButton . style . display = display ;
8282 display = display === 'none' ? '' : 'none' ;
8383 this . messageEl . style . display = display ;
84+ if ( display === 'none' ) {
85+ this . el . emit ( 'infomessageclosed' ) ;
86+ } else {
87+ this . el . emit ( 'infomessageopened' ) ;
88+ }
8489 } ,
8590
8691 createInfoButton : function ( onClick ) {
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ AFRAME.registerComponent('model-viewer', {
7979 'bottom: 20px; left: 15%; right: 15%; position: absolute; color: white;' +
8080 'font-size: 12px; line-height: 12px; border: none;' +
8181 'border-radius: 5px}' +
82+ '.a-upload-model.hidden {display: none}' +
8283 '.a-upload-model-button {cursor: pointer; padding: 0px 2px 0 2px; font-weight: bold; color: #666; border: 3px solid #666; box-sizing: border-box; vertical-align: middle; width: 25%; max-width: 110px; border-radius: 10px; height: 34px; background-color: white; margin: 0;}' +
8384 '.a-upload-model-button:hover {border-color: #ef2d5e; color: #ef2d5e}' +
8485 '.a-upload-model-input {color: #666; vertical-align: middle; padding: 0px 10px 0 10px; text-transform: uppercase; border: 0; width: 75%; height: 100%; border-radius: 10px; margin-right: 10px}' +
@@ -116,6 +117,13 @@ AFRAME.registerComponent('model-viewer', {
116117 this . value = inputDefaultValue ;
117118 } ;
118119
120+ this . el . sceneEl . addEventListener ( 'infomessageopened' , function ( ) {
121+ uploadContainerEl . classList . add ( 'hidden' ) ;
122+ } ) ;
123+ this . el . sceneEl . addEventListener ( 'infomessageclosed' , function ( ) {
124+ uploadContainerEl . classList . remove ( 'hidden' ) ;
125+ } ) ;
126+
119127 inputEl . value = inputDefaultValue ;
120128
121129 uploadContainerEl . appendChild ( inputEl ) ;
You can’t perform that action at this time.
0 commit comments