File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,22 +322,32 @@ export default {
322322 model . on ( "msg:custom" , ( msg ) => {
323323 msg = JSON . parse ( msg ) ;
324324 let [ fn , ...args ] = msg ;
325- api [ fn ] ( ...args ) ;
325+ /** @type { any } */ ( api ) [ fn ] ( ...args ) ;
326326 } ) ;
327327
328328 if ( viewconf . views . length === 1 ) {
329- api . on ( "location" , ( /** @type {GenomicLocation } */ loc ) => {
330- model . set ( "location" , locationToCoordinates ( loc ) ) ;
331- model . save_changes ( ) ;
332- } , viewconf . views [ 0 ] . uid ) ;
329+ api . on (
330+ "location" ,
331+ ( /** @type {GenomicLocation } */ loc ) => {
332+ model . set ( "location" , locationToCoordinates ( loc ) ) ;
333+ model . save_changes ( ) ;
334+ } ,
335+ viewconf . views [ 0 ] . uid ,
336+ undefined ,
337+ ) ;
333338 } else {
334339 viewconf . views . forEach ( ( view , idx ) => {
335- api . on ( "location" , ( /** @type {GenomicLocation } */ loc ) => {
336- let location = model . get ( "location" ) . slice ( ) ;
337- location [ idx ] = locationToCoordinates ( loc ) ;
338- model . set ( "location" , location ) ;
339- model . save_changes ( ) ;
340- } , view . uid ) ;
340+ api . on (
341+ "location" ,
342+ ( /** @type {GenomicLocation } */ loc ) => {
343+ let location = model . get ( "location" ) . slice ( ) ;
344+ location [ idx ] = locationToCoordinates ( loc ) ;
345+ model . set ( "location" , location ) ;
346+ model . save_changes ( ) ;
347+ } ,
348+ view . uid ,
349+ undefined ,
350+ ) ;
341351 } ) ;
342352 }
343353
You can’t perform that action at this time.
0 commit comments