@jbrowse/plugin-linear-genome-view 1.6.3 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  2. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -1
  3. package/dist/LinearBareDisplay/configSchema.d.ts +1 -1
  4. package/dist/LinearBasicDisplay/configSchema.d.ts +1 -1
  5. package/dist/LinearGenomeView/components/ScaleBar.d.ts +2 -0
  6. package/dist/LinearGenomeView/components/TrackContainer.d.ts +3 -2
  7. package/dist/LinearGenomeView/index.d.ts +1 -0
  8. package/dist/index.d.ts +1 -1
  9. package/dist/plugin-linear-genome-view.cjs.development.js +143 -250
  10. package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
  11. package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
  12. package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
  13. package/dist/plugin-linear-genome-view.esm.js +145 -252
  14. package/dist/plugin-linear-genome-view.esm.js.map +1 -1
  15. package/package.json +2 -2
  16. package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +2 -4
  17. package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -8
  18. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +11 -3
  19. package/src/LinearBasicDisplay/model.ts +1 -1
  20. package/src/LinearGenomeView/components/HelpDialog.tsx +14 -1
  21. package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +1 -13
  22. package/src/LinearGenomeView/components/OverviewScaleBar.tsx +7 -3
  23. package/src/LinearGenomeView/components/TrackContainer.tsx +24 -39
  24. package/src/LinearGenomeView/components/TrackLabel.tsx +5 -5
  25. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +194 -191
  26. package/src/LinearGenomeView/index.test.ts +44 -42
  27. package/src/LinearGenomeView/index.tsx +176 -245
  28. package/src/LinearGenomeView/volvoxDisplayedRegions.json +16 -0
  29. package/dist/LinearGenomeView/components/ReturnToImportFormDialog.d.ts +0 -9
  30. package/src/LinearGenomeView/components/ReturnToImportFormDialog.tsx +0 -83
@@ -455,86 +455,87 @@ exports[`<LinearGenomeView /> renders one track, one region 1`] = `
455
455
  class="makeStyles-root"
456
456
  >
457
457
  <div
458
- class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
458
+ class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
459
+ data-testid="trackRenderingContainer-lgv-testConfig"
460
+ role="presentation"
461
+ style="height: 100px;"
459
462
  >
460
- <span
461
- class="makeStyles-dragHandle"
462
- data-testid="dragHandle-lgv-testConfig"
463
- draggable="true"
464
- >
465
- <svg
466
- aria-hidden="true"
467
- class="MuiSvgIcon-root makeStyles-dragHandleIcon"
468
- focusable="false"
469
- viewBox="0 0 24 24"
470
- >
471
- <path
472
- d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
473
- />
474
- </svg>
475
- </span>
476
- <button
477
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
478
- tabindex="0"
479
- title="close this track"
480
- type="button"
463
+ <div
464
+ class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
481
465
  >
482
466
  <span
483
- class="MuiIconButton-label"
467
+ class="makeStyles-dragHandle"
468
+ data-testid="dragHandle-lgv-testConfig"
469
+ draggable="true"
484
470
  >
485
471
  <svg
486
472
  aria-hidden="true"
487
- class="MuiSvgIcon-root"
473
+ class="MuiSvgIcon-root makeStyles-dragHandleIcon"
488
474
  focusable="false"
489
475
  viewBox="0 0 24 24"
490
476
  >
491
477
  <path
492
- d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
478
+ d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
493
479
  />
494
480
  </svg>
495
481
  </span>
496
- <span
497
- class="MuiTouchRipple-root"
498
- />
499
- </button>
500
- <span
501
- class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
502
- >
503
- Foo Track
504
- </span>
505
- <button
506
- aria-controls="simple-menu"
507
- aria-haspopup="true"
508
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary MuiIconButton-disabled MuiButtonBase-disabled"
509
- data-testid="track_menu_icon"
510
- disabled=""
511
- tabindex="-1"
512
- type="button"
513
- >
514
- <span
515
- class="MuiIconButton-label"
482
+ <button
483
+ class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
484
+ tabindex="0"
485
+ title="close this track"
486
+ type="button"
516
487
  >
517
- <svg
518
- aria-hidden="true"
519
- class="MuiSvgIcon-root"
520
- focusable="false"
521
- viewBox="0 0 24 24"
488
+ <span
489
+ class="MuiIconButton-label"
522
490
  >
523
- <path
524
- d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
525
- />
526
- </svg>
491
+ <svg
492
+ aria-hidden="true"
493
+ class="MuiSvgIcon-root"
494
+ focusable="false"
495
+ viewBox="0 0 24 24"
496
+ >
497
+ <path
498
+ d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
499
+ />
500
+ </svg>
501
+ </span>
502
+ <span
503
+ class="MuiTouchRipple-root"
504
+ />
505
+ </button>
506
+ <span
507
+ class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
508
+ >
509
+ Foo Track
527
510
  </span>
528
- </button>
529
- </div>
530
- <div
531
- class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
532
- data-testid="trackRenderingContainer-lgv-testConfig"
533
- role="presentation"
534
- style="height: 100px;"
535
- >
511
+ <button
512
+ aria-controls="simple-menu"
513
+ aria-haspopup="true"
514
+ class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
515
+ data-testid="track_menu_icon"
516
+ tabindex="0"
517
+ type="button"
518
+ >
519
+ <span
520
+ class="MuiIconButton-label"
521
+ >
522
+ <svg
523
+ aria-hidden="true"
524
+ class="MuiSvgIcon-root"
525
+ focusable="false"
526
+ viewBox="0 0 24 24"
527
+ >
528
+ <path
529
+ d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
530
+ />
531
+ </svg>
532
+ </span>
533
+ <span
534
+ class="MuiTouchRipple-root"
535
+ />
536
+ </button>
537
+ </div>
536
538
  <div
537
- class="makeStyles-renderingComponentContainer"
538
539
  style="transform: scaleX(1);"
539
540
  >
540
541
  <div
@@ -768,7 +769,7 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
768
769
  class="MuiAutocomplete-root"
769
770
  data-testid="autocomplete"
770
771
  role="combobox"
771
- style="width: 255.22500000000002px;"
772
+ style="width: 255.27500000000003px;"
772
773
  >
773
774
  <div
774
775
  class="MuiFormControl-root MuiTextField-root makeStyles-headerRefName MuiFormControl-fullWidth"
@@ -788,7 +789,7 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
788
789
  placeholder="Search for location"
789
790
  spellcheck="false"
790
791
  type="text"
791
- value="ctgA:1..100;ctgB:1,001..1,698"
792
+ value="ctgA:1..100 ctgB:1,001..1,698"
792
793
  />
793
794
  <div
794
795
  class="MuiInputAdornment-root MuiInputAdornment-positionEnd"
@@ -1347,86 +1348,87 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
1347
1348
  class="makeStyles-root"
1348
1349
  >
1349
1350
  <div
1350
- class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
1351
+ class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
1352
+ data-testid="trackRenderingContainer-lgv-testConfig"
1353
+ role="presentation"
1354
+ style="height: 100px;"
1351
1355
  >
1352
- <span
1353
- class="makeStyles-dragHandle"
1354
- data-testid="dragHandle-lgv-testConfig"
1355
- draggable="true"
1356
- >
1357
- <svg
1358
- aria-hidden="true"
1359
- class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1360
- focusable="false"
1361
- viewBox="0 0 24 24"
1362
- >
1363
- <path
1364
- d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1365
- />
1366
- </svg>
1367
- </span>
1368
- <button
1369
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1370
- tabindex="0"
1371
- title="close this track"
1372
- type="button"
1356
+ <div
1357
+ class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
1373
1358
  >
1374
1359
  <span
1375
- class="MuiIconButton-label"
1360
+ class="makeStyles-dragHandle"
1361
+ data-testid="dragHandle-lgv-testConfig"
1362
+ draggable="true"
1376
1363
  >
1377
1364
  <svg
1378
1365
  aria-hidden="true"
1379
- class="MuiSvgIcon-root"
1366
+ class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1380
1367
  focusable="false"
1381
1368
  viewBox="0 0 24 24"
1382
1369
  >
1383
1370
  <path
1384
- d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
1371
+ d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1385
1372
  />
1386
1373
  </svg>
1387
1374
  </span>
1388
- <span
1389
- class="MuiTouchRipple-root"
1390
- />
1391
- </button>
1392
- <span
1393
- class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1394
- >
1395
- Foo Track
1396
- </span>
1397
- <button
1398
- aria-controls="simple-menu"
1399
- aria-haspopup="true"
1400
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary MuiIconButton-disabled MuiButtonBase-disabled"
1401
- data-testid="track_menu_icon"
1402
- disabled=""
1403
- tabindex="-1"
1404
- type="button"
1405
- >
1406
- <span
1407
- class="MuiIconButton-label"
1375
+ <button
1376
+ class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1377
+ tabindex="0"
1378
+ title="close this track"
1379
+ type="button"
1408
1380
  >
1409
- <svg
1410
- aria-hidden="true"
1411
- class="MuiSvgIcon-root"
1412
- focusable="false"
1413
- viewBox="0 0 24 24"
1381
+ <span
1382
+ class="MuiIconButton-label"
1414
1383
  >
1415
- <path
1416
- d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1417
- />
1418
- </svg>
1384
+ <svg
1385
+ aria-hidden="true"
1386
+ class="MuiSvgIcon-root"
1387
+ focusable="false"
1388
+ viewBox="0 0 24 24"
1389
+ >
1390
+ <path
1391
+ d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
1392
+ />
1393
+ </svg>
1394
+ </span>
1395
+ <span
1396
+ class="MuiTouchRipple-root"
1397
+ />
1398
+ </button>
1399
+ <span
1400
+ class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1401
+ >
1402
+ Foo Track
1419
1403
  </span>
1420
- </button>
1421
- </div>
1422
- <div
1423
- class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
1424
- data-testid="trackRenderingContainer-lgv-testConfig"
1425
- role="presentation"
1426
- style="height: 100px;"
1427
- >
1404
+ <button
1405
+ aria-controls="simple-menu"
1406
+ aria-haspopup="true"
1407
+ class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1408
+ data-testid="track_menu_icon"
1409
+ tabindex="0"
1410
+ type="button"
1411
+ >
1412
+ <span
1413
+ class="MuiIconButton-label"
1414
+ >
1415
+ <svg
1416
+ aria-hidden="true"
1417
+ class="MuiSvgIcon-root"
1418
+ focusable="false"
1419
+ viewBox="0 0 24 24"
1420
+ >
1421
+ <path
1422
+ d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1423
+ />
1424
+ </svg>
1425
+ </span>
1426
+ <span
1427
+ class="MuiTouchRipple-root"
1428
+ />
1429
+ </button>
1430
+ </div>
1428
1431
  <div
1429
- class="makeStyles-renderingComponentContainer"
1430
1432
  style="transform: scaleX(1);"
1431
1433
  >
1432
1434
  <div
@@ -1501,86 +1503,87 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
1501
1503
  class="makeStyles-root"
1502
1504
  >
1503
1505
  <div
1504
- class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
1506
+ class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
1507
+ data-testid="trackRenderingContainer-lgv-testConfig2"
1508
+ role="presentation"
1509
+ style="height: 100px;"
1505
1510
  >
1506
- <span
1507
- class="makeStyles-dragHandle"
1508
- data-testid="dragHandle-lgv-testConfig2"
1509
- draggable="true"
1510
- >
1511
- <svg
1512
- aria-hidden="true"
1513
- class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1514
- focusable="false"
1515
- viewBox="0 0 24 24"
1516
- >
1517
- <path
1518
- d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1519
- />
1520
- </svg>
1521
- </span>
1522
- <button
1523
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1524
- tabindex="0"
1525
- title="close this track"
1526
- type="button"
1511
+ <div
1512
+ class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
1527
1513
  >
1528
1514
  <span
1529
- class="MuiIconButton-label"
1515
+ class="makeStyles-dragHandle"
1516
+ data-testid="dragHandle-lgv-testConfig2"
1517
+ draggable="true"
1530
1518
  >
1531
1519
  <svg
1532
1520
  aria-hidden="true"
1533
- class="MuiSvgIcon-root"
1521
+ class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1534
1522
  focusable="false"
1535
1523
  viewBox="0 0 24 24"
1536
1524
  >
1537
1525
  <path
1538
- d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
1526
+ d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1539
1527
  />
1540
1528
  </svg>
1541
1529
  </span>
1542
- <span
1543
- class="MuiTouchRipple-root"
1544
- />
1545
- </button>
1546
- <span
1547
- class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1548
- >
1549
- Bar Track
1550
- </span>
1551
- <button
1552
- aria-controls="simple-menu"
1553
- aria-haspopup="true"
1554
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary MuiIconButton-disabled MuiButtonBase-disabled"
1555
- data-testid="track_menu_icon"
1556
- disabled=""
1557
- tabindex="-1"
1558
- type="button"
1559
- >
1560
- <span
1561
- class="MuiIconButton-label"
1530
+ <button
1531
+ class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1532
+ tabindex="0"
1533
+ title="close this track"
1534
+ type="button"
1562
1535
  >
1563
- <svg
1564
- aria-hidden="true"
1565
- class="MuiSvgIcon-root"
1566
- focusable="false"
1567
- viewBox="0 0 24 24"
1536
+ <span
1537
+ class="MuiIconButton-label"
1568
1538
  >
1569
- <path
1570
- d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1571
- />
1572
- </svg>
1539
+ <svg
1540
+ aria-hidden="true"
1541
+ class="MuiSvgIcon-root"
1542
+ focusable="false"
1543
+ viewBox="0 0 24 24"
1544
+ >
1545
+ <path
1546
+ d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
1547
+ />
1548
+ </svg>
1549
+ </span>
1550
+ <span
1551
+ class="MuiTouchRipple-root"
1552
+ />
1553
+ </button>
1554
+ <span
1555
+ class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1556
+ >
1557
+ Bar Track
1573
1558
  </span>
1574
- </button>
1575
- </div>
1576
- <div
1577
- class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
1578
- data-testid="trackRenderingContainer-lgv-testConfig2"
1579
- role="presentation"
1580
- style="height: 100px;"
1581
- >
1559
+ <button
1560
+ aria-controls="simple-menu"
1561
+ aria-haspopup="true"
1562
+ class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1563
+ data-testid="track_menu_icon"
1564
+ tabindex="0"
1565
+ type="button"
1566
+ >
1567
+ <span
1568
+ class="MuiIconButton-label"
1569
+ >
1570
+ <svg
1571
+ aria-hidden="true"
1572
+ class="MuiSvgIcon-root"
1573
+ focusable="false"
1574
+ viewBox="0 0 24 24"
1575
+ >
1576
+ <path
1577
+ d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
1578
+ />
1579
+ </svg>
1580
+ </span>
1581
+ <span
1582
+ class="MuiTouchRipple-root"
1583
+ />
1584
+ </button>
1585
+ </div>
1582
1586
  <div
1583
- class="makeStyles-renderingComponentContainer"
1584
1587
  style="transform: scaleX(1);"
1585
1588
  >
1586
1589
  <div
@@ -11,6 +11,7 @@ import { LinearGenomeViewStateModel, stateModelFactory } from '.'
11
11
  import { BaseLinearDisplayComponent } from '..'
12
12
  import { stateModelFactory as LinearBasicDisplayStateModelFactory } from '../LinearBareDisplay'
13
13
  import hg38DisplayedRegions from './hg38DisplayedRegions.json'
14
+ import volvoxDisplayedRegions from './volvoxDisplayedRegions.json'
14
15
 
15
16
  // use initializer function to avoid having console.warn jest.fn in a global
16
17
  function initialize() {
@@ -54,22 +55,7 @@ function initialize() {
54
55
  const Assembly = types
55
56
  .model({})
56
57
  .volatile(() => ({
57
- regions: [
58
- {
59
- assemblyName: 'volvox',
60
- start: 0,
61
- end: 50001,
62
- refName: 'ctgA',
63
- reversed: false,
64
- },
65
- {
66
- assemblyName: 'volvox',
67
- start: 0,
68
- end: 6079,
69
- refName: 'ctgB',
70
- reversed: false,
71
- },
72
- ],
58
+ regions: volvoxDisplayedRegions,
73
59
  }))
74
60
  .views(() => ({
75
61
  getCanonicalRefName(refName: string) {
@@ -79,6 +65,19 @@ function initialize() {
79
65
  return refName
80
66
  },
81
67
  }))
68
+
69
+ const AssemblyManager = types
70
+ .model({
71
+ assemblies: types.map(Assembly),
72
+ })
73
+ .actions(self => ({
74
+ isValidRefName(str: string) {
75
+ return !str.includes(':')
76
+ },
77
+ get(str: string) {
78
+ return self.assemblies.get(str)
79
+ },
80
+ }))
82
81
  const LinearGenomeModel = stateModelFactory(stubManager)
83
82
  const Session = types
84
83
  .model({
@@ -86,6 +85,13 @@ function initialize() {
86
85
  rpcManager: 'rpcManagerExists',
87
86
  view: types.maybe(LinearGenomeModel),
88
87
  configuration: types.map(types.string),
88
+ assemblyManager: types.optional(AssemblyManager, {
89
+ assemblies: {
90
+ volvox: {
91
+ regions: volvoxDisplayedRegions,
92
+ },
93
+ },
94
+ }),
89
95
  })
90
96
  .actions(self => ({
91
97
  setView(view: Instance<LinearGenomeViewStateModel>) {
@@ -93,9 +99,6 @@ function initialize() {
93
99
  return view
94
100
  },
95
101
  }))
96
- .volatile((/* self */) => ({
97
- assemblyManager: new Map([['volvox', Assembly.create({})]]),
98
- }))
99
102
 
100
103
  return { Session, LinearGenomeModel, Assembly }
101
104
  }
@@ -294,29 +297,6 @@ test('can navToMultiple', () => {
294
297
  ])
295
298
  expect(model.offsetPx).toBe(2799)
296
299
  expect(model.bpPerPx).toBeCloseTo(12.531)
297
-
298
- expect(() =>
299
- model.navToMultiple([
300
- { refName: 'ctgB', start: 5000, end: 10000 },
301
- { refName: 'ctgC', start: 5000, end: 10000 },
302
- ]),
303
- ).toThrow('Start of region ctgC:5,001..10,000 should be 1, but it is not')
304
-
305
- expect(() =>
306
- model.navToMultiple([
307
- { refName: 'ctgB', start: 0, end: 5000 },
308
- { refName: 'ctgC', start: 0, end: 5000 },
309
- ]),
310
- ).toThrow('End of region ctgB:1..5,000 should be 10,000, but it is not')
311
-
312
- expect(() =>
313
- model.navToMultiple([
314
- { refName: 'ctgA', start: 5000, end: 10000 },
315
- { refName: 'ctgA', start: 0, end: 5000 },
316
- ]),
317
- ).toThrow(
318
- 'Entered location ctgA:1..5,000 does not match with displayed regions',
319
- )
320
300
  })
321
301
 
322
302
  describe('Zoom to selected displayed regions', () => {
@@ -992,3 +972,25 @@ test('navToLocString with human assembly', () => {
992
972
  expect(model.view.offsetPx).toBe(9914777550)
993
973
  model.view.navToLocString('chr3:-1,100,000,000..-1,000,000,000')
994
974
  })
975
+
976
+ test('multi region', () => {
977
+ const { Session, LinearGenomeModel } = initialize()
978
+ const model = Session.create({
979
+ configuration: {},
980
+ }).setView(
981
+ LinearGenomeModel.create({
982
+ type: 'LinearGenomeView',
983
+ tracks: [{ name: 'foo track', type: 'BasicTrack' }],
984
+ }),
985
+ )
986
+ model.setWidth(800)
987
+ model.setDisplayedRegions(volvoxDisplayedRegions.slice(0, 1))
988
+
989
+ model.navToLocString('ctgA ctgB')
990
+ expect(model.displayedRegions[0].refName).toBe('ctgA')
991
+ expect(model.displayedRegions[1].refName).toBe('ctgB')
992
+ // [
993
+ // { refName: 'ctgA', start: 0, end: 50001 },
994
+ // { refName: 'ctgB', start: 0, end: 6079 },
995
+ // ])
996
+ })