File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 3420
3420
for ( let i = 1 ; i <= text . length ; i ++ ) {
3421
3421
const { width} = ctx . measureText ( '[' + text . slice ( 0 , i ) + ']' ) ;
3422
3422
urlMeasures . push ( width - barWidth * 2 ) ;
3423
+ < << << << HEAD
3423
3424
}
3424
3425
} ;
3425
3426
_updateUrlMeasures ( ) ;
3432
3433
sceneMeasures . push ( width - barWidth * 2 ) ;
3433
3434
}
3434
3435
} ;
3436
+ = === ===
3437
+ }
3438
+ } ;
3439
+ _updateUrlMeasures ( ) ;
3440
+ const _updateSceneMeasures = ( ) => {
3441
+ sceneMeasures . length = 0 ;
3442
+ sceneMeasures . push ( 0 ) ;
3443
+ const { width : barWidth } = ctx . measureText ( '[' ) ;
3444
+ for ( let i = 1 ; i <= sceneText . length ; i ++ ) {
3445
+ const { width} = ctx . measureText ( '[' + sceneText . slice ( 0 , i ) + ']' ) ;
3446
+ sceneMeasures . push ( width - barWidth * 2 ) ;
3447
+ }
3448
+ } ;
3449
+ > >>> >>> 248928539 ae00ef1ce1813956532a8987a33c9f2
3435
3450
_updateSceneMeasures ( ) ;
3436
3451
3437
3452
const urlInputPadding = [ 40 , 53 ] ;
3729
3744
} else {
3730
3745
console . log ( 'paste fail' ) ;
3731
3746
}
3747
+ } else if ( id === 'action-open-scene' ) {
3748
+ const dom = new DOMParser ( ) . parseFromString ( url , 'text/html' ) ;
3749
+ if ( dom . body . childNodes . length === 1 && dom . body . childNodes [ 0 ] . nodeName === 'XR-SITE' ) {
3750
+ root . innerHTML = dom . body . childNodes [ 0 ] . innerHTML ;
3751
+ } else {
3752
+ console . log ( 'paste fail' ) ;
3753
+ }
3732
3754
} else if ( id === 'action-load-scene' ) {
3733
3755
window . parentPostMessage ( {
3734
3756
method : 'loadScene' ,
Original file line number Diff line number Diff line change @@ -330,6 +330,21 @@ <h3>{{label}}</h3>
330
330
{{/sceneResults}}
331
331
</ ul >
332
332
</ div >
333
+ < div class =results >
334
+ < ul >
335
+ {{#searchResults}}
336
+ < li >
337
+ < a href ="{{{url}}} " name ="{{{label}}} ">
338
+ < img src ="{{{icon}}} ">
339
+ < div class =wrap >
340
+ < h3 > {{label}}</ h3 >
341
+ < p > {{{url}}}</ p >
342
+ </ div >
343
+ </ a >
344
+ </ li >
345
+ {{/searchResults}}
346
+ </ ul >
347
+ </ div >
333
348
{{/tab2}}
334
349
{{#tab4}}
335
350
< div class =channels >
You can’t perform that action at this time.
0 commit comments