@jbrowse/plugin-linear-genome-view 1.6.5 → 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 (25) hide show
  1. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -1
  2. package/dist/LinearBareDisplay/configSchema.d.ts +1 -1
  3. package/dist/LinearBasicDisplay/configSchema.d.ts +1 -1
  4. package/dist/LinearGenomeView/components/TrackContainer.d.ts +3 -2
  5. package/dist/index.d.ts +1 -1
  6. package/dist/plugin-linear-genome-view.cjs.development.js +118 -228
  7. package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
  8. package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
  9. package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
  10. package/dist/plugin-linear-genome-view.esm.js +120 -230
  11. package/dist/plugin-linear-genome-view.esm.js.map +1 -1
  12. package/package.json +2 -2
  13. package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +1 -1
  14. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +6 -1
  15. package/src/LinearBasicDisplay/model.ts +1 -1
  16. package/src/LinearGenomeView/components/HelpDialog.tsx +14 -1
  17. package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +1 -13
  18. package/src/LinearGenomeView/components/OverviewScaleBar.tsx +7 -3
  19. package/src/LinearGenomeView/components/TrackContainer.tsx +24 -39
  20. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +194 -197
  21. package/src/LinearGenomeView/index.test.ts +44 -42
  22. package/src/LinearGenomeView/index.tsx +55 -131
  23. package/src/LinearGenomeView/volvoxDisplayedRegions.json +16 -0
  24. package/dist/LinearGenomeView/components/ReturnToImportFormDialog.d.ts +0 -9
  25. package/src/LinearGenomeView/components/ReturnToImportFormDialog.tsx +0 -83
@@ -455,88 +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"
509
- data-testid="track_menu_icon"
510
- tabindex="0"
511
- type="button"
512
- >
513
- <span
514
- 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"
515
487
  >
516
- <svg
517
- aria-hidden="true"
518
- class="MuiSvgIcon-root"
519
- focusable="false"
520
- viewBox="0 0 24 24"
488
+ <span
489
+ class="MuiIconButton-label"
521
490
  >
522
- <path
523
- 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"
524
- />
525
- </svg>
526
- </span>
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>
527
506
  <span
528
- class="MuiTouchRipple-root"
529
- />
530
- </button>
531
- </div>
532
- <div
533
- class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
534
- data-testid="trackRenderingContainer-lgv-testConfig"
535
- role="presentation"
536
- style="height: 100px;"
537
- >
507
+ class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
508
+ >
509
+ Foo Track
510
+ </span>
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>
538
538
  <div
539
- class="makeStyles-renderingComponentContainer"
540
539
  style="transform: scaleX(1);"
541
540
  >
542
541
  <div
@@ -770,7 +769,7 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
770
769
  class="MuiAutocomplete-root"
771
770
  data-testid="autocomplete"
772
771
  role="combobox"
773
- style="width: 255.22500000000002px;"
772
+ style="width: 255.27500000000003px;"
774
773
  >
775
774
  <div
776
775
  class="MuiFormControl-root MuiTextField-root makeStyles-headerRefName MuiFormControl-fullWidth"
@@ -790,7 +789,7 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
790
789
  placeholder="Search for location"
791
790
  spellcheck="false"
792
791
  type="text"
793
- value="ctgA:1..100;ctgB:1,001..1,698"
792
+ value="ctgA:1..100 ctgB:1,001..1,698"
794
793
  />
795
794
  <div
796
795
  class="MuiInputAdornment-root MuiInputAdornment-positionEnd"
@@ -1349,88 +1348,87 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
1349
1348
  class="makeStyles-root"
1350
1349
  >
1351
1350
  <div
1352
- 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;"
1353
1355
  >
1354
- <span
1355
- class="makeStyles-dragHandle"
1356
- data-testid="dragHandle-lgv-testConfig"
1357
- draggable="true"
1358
- >
1359
- <svg
1360
- aria-hidden="true"
1361
- class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1362
- focusable="false"
1363
- viewBox="0 0 24 24"
1364
- >
1365
- <path
1366
- 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"
1367
- />
1368
- </svg>
1369
- </span>
1370
- <button
1371
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1372
- tabindex="0"
1373
- title="close this track"
1374
- type="button"
1356
+ <div
1357
+ class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
1375
1358
  >
1376
1359
  <span
1377
- class="MuiIconButton-label"
1360
+ class="makeStyles-dragHandle"
1361
+ data-testid="dragHandle-lgv-testConfig"
1362
+ draggable="true"
1378
1363
  >
1379
1364
  <svg
1380
1365
  aria-hidden="true"
1381
- class="MuiSvgIcon-root"
1366
+ class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1382
1367
  focusable="false"
1383
1368
  viewBox="0 0 24 24"
1384
1369
  >
1385
1370
  <path
1386
- 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"
1387
1372
  />
1388
1373
  </svg>
1389
1374
  </span>
1390
- <span
1391
- class="MuiTouchRipple-root"
1392
- />
1393
- </button>
1394
- <span
1395
- class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1396
- >
1397
- Foo Track
1398
- </span>
1399
- <button
1400
- aria-controls="simple-menu"
1401
- aria-haspopup="true"
1402
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1403
- data-testid="track_menu_icon"
1404
- tabindex="0"
1405
- type="button"
1406
- >
1407
- <span
1408
- 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"
1409
1380
  >
1410
- <svg
1411
- aria-hidden="true"
1412
- class="MuiSvgIcon-root"
1413
- focusable="false"
1414
- viewBox="0 0 24 24"
1381
+ <span
1382
+ class="MuiIconButton-label"
1415
1383
  >
1416
- <path
1417
- 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"
1418
- />
1419
- </svg>
1420
- </span>
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>
1421
1399
  <span
1422
- class="MuiTouchRipple-root"
1423
- />
1424
- </button>
1425
- </div>
1426
- <div
1427
- class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
1428
- data-testid="trackRenderingContainer-lgv-testConfig"
1429
- role="presentation"
1430
- style="height: 100px;"
1431
- >
1400
+ class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1401
+ >
1402
+ Foo Track
1403
+ </span>
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>
1432
1431
  <div
1433
- class="makeStyles-renderingComponentContainer"
1434
1432
  style="transform: scaleX(1);"
1435
1433
  >
1436
1434
  <div
@@ -1505,88 +1503,87 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
1505
1503
  class="makeStyles-root"
1506
1504
  >
1507
1505
  <div
1508
- 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;"
1509
1510
  >
1510
- <span
1511
- class="makeStyles-dragHandle"
1512
- data-testid="dragHandle-lgv-testConfig2"
1513
- draggable="true"
1514
- >
1515
- <svg
1516
- aria-hidden="true"
1517
- class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1518
- focusable="false"
1519
- viewBox="0 0 24 24"
1520
- >
1521
- <path
1522
- 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"
1523
- />
1524
- </svg>
1525
- </span>
1526
- <button
1527
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1528
- tabindex="0"
1529
- title="close this track"
1530
- type="button"
1511
+ <div
1512
+ class="MuiPaper-root makeStyles-trackLabel makeStyles-trackLabelOverlap makeStyles-root MuiPaper-elevation1 MuiPaper-rounded"
1531
1513
  >
1532
1514
  <span
1533
- class="MuiIconButton-label"
1515
+ class="makeStyles-dragHandle"
1516
+ data-testid="dragHandle-lgv-testConfig2"
1517
+ draggable="true"
1534
1518
  >
1535
1519
  <svg
1536
1520
  aria-hidden="true"
1537
- class="MuiSvgIcon-root"
1521
+ class="MuiSvgIcon-root makeStyles-dragHandleIcon"
1538
1522
  focusable="false"
1539
1523
  viewBox="0 0 24 24"
1540
1524
  >
1541
1525
  <path
1542
- 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"
1543
1527
  />
1544
1528
  </svg>
1545
1529
  </span>
1546
- <span
1547
- class="MuiTouchRipple-root"
1548
- />
1549
- </button>
1550
- <span
1551
- class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1552
- >
1553
- Bar Track
1554
- </span>
1555
- <button
1556
- aria-controls="simple-menu"
1557
- aria-haspopup="true"
1558
- class="MuiButtonBase-root MuiIconButton-root makeStyles-iconButton MuiIconButton-colorSecondary"
1559
- data-testid="track_menu_icon"
1560
- tabindex="0"
1561
- type="button"
1562
- >
1563
- <span
1564
- 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"
1565
1535
  >
1566
- <svg
1567
- aria-hidden="true"
1568
- class="MuiSvgIcon-root"
1569
- focusable="false"
1570
- viewBox="0 0 24 24"
1536
+ <span
1537
+ class="MuiIconButton-label"
1571
1538
  >
1572
- <path
1573
- 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"
1574
- />
1575
- </svg>
1576
- </span>
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>
1577
1554
  <span
1578
- class="MuiTouchRipple-root"
1579
- />
1580
- </button>
1581
- </div>
1582
- <div
1583
- class="MuiPaper-root makeStyles-trackRenderingContainer MuiPaper-outlined MuiPaper-rounded"
1584
- data-testid="trackRenderingContainer-lgv-testConfig2"
1585
- role="presentation"
1586
- style="height: 100px;"
1587
- >
1555
+ class="MuiTypography-root makeStyles-trackName MuiTypography-body1"
1556
+ >
1557
+ Bar Track
1558
+ </span>
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>
1588
1586
  <div
1589
- class="makeStyles-renderingComponentContainer"
1590
1587
  style="transform: scaleX(1);"
1591
1588
  >
1592
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
+ })