@jbrowse/plugin-linear-comparative-view 4.0.2 → 4.0.4

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 (26) hide show
  1. package/esm/LGVSyntenyDisplay/model.d.ts +20 -1
  2. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +3 -0
  3. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +3 -0
  4. package/esm/LinearComparativeView/components/OpacitySlider.js +7 -3
  5. package/esm/LinearComparativeView/components/useRangeSelect.js +3 -0
  6. package/esm/LinearComparativeView/model.d.ts +33 -6
  7. package/esm/LinearSyntenyDisplay/afterAttach.js +9 -0
  8. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +15 -15
  9. package/esm/LinearSyntenyDisplay/components/util.d.ts +1 -0
  10. package/esm/LinearSyntenyDisplay/components/util.js +23 -38
  11. package/esm/LinearSyntenyDisplay/drawCigarClickMap.d.ts +2 -0
  12. package/esm/LinearSyntenyDisplay/drawCigarClickMap.js +88 -0
  13. package/esm/LinearSyntenyDisplay/{drawMouseoverClickMap.js → drawMouseover.js} +9 -11
  14. package/esm/LinearSyntenyDisplay/drawRef.d.ts +2 -0
  15. package/esm/LinearSyntenyDisplay/drawRef.js +190 -0
  16. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +4 -6
  17. package/esm/LinearSyntenyDisplay/drawSynteny.js +4 -461
  18. package/esm/LinearSyntenyDisplay/drawSyntenyUtils.d.ts +58 -0
  19. package/esm/LinearSyntenyDisplay/drawSyntenyUtils.js +62 -0
  20. package/esm/LinearSyntenyDisplay/model.d.ts +47 -2
  21. package/esm/LinearSyntenyDisplay/model.js +50 -2
  22. package/esm/LinearSyntenyView/model.d.ts +54 -18
  23. package/esm/LinearSyntenyView/model.js +23 -24
  24. package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +4 -4
  25. package/package.json +4 -4
  26. /package/esm/LinearSyntenyDisplay/{drawMouseoverClickMap.d.ts → drawMouseover.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
2
2
  import { types } from '@jbrowse/mobx-state-tree';
3
+ import { applyAlpha, colorSchemes, getQueryColor } from "./drawSyntenyUtils.js";
3
4
  import baseModelFactory from "../LinearComparativeDisplay/stateModelFactory.js";
4
5
  function stateModelFactory(configSchema) {
5
6
  return types
@@ -7,6 +8,8 @@ function stateModelFactory(configSchema) {
7
8
  type: types.literal('LinearSyntenyDisplay'),
8
9
  configuration: ConfigurationReference(configSchema),
9
10
  colorBy: types.optional(types.string, 'default'),
11
+ alpha: types.optional(types.number, 0.2),
12
+ minAlignmentLength: types.optional(types.number, 0),
10
13
  }))
11
14
  .volatile(() => ({
12
15
  mainCanvas: null,
@@ -17,8 +20,6 @@ function stateModelFactory(configSchema) {
17
20
  mouseoverId: undefined,
18
21
  clickId: undefined,
19
22
  cigarMouseoverId: -1,
20
- alpha: 0.2,
21
- minAlignmentLength: 0,
22
23
  }))
23
24
  .actions(self => ({
24
25
  setFeatPositions(arg) {
@@ -75,6 +76,53 @@ function stateModelFactory(configSchema) {
75
76
  get featMap() {
76
77
  return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
77
78
  },
79
+ get colorSchemeConfig() {
80
+ return colorSchemes[self.colorBy] || colorSchemes.default;
81
+ },
82
+ get colorMapWithAlpha() {
83
+ const { alpha } = self;
84
+ const activeColorMap = this.colorSchemeConfig.cigarColors;
85
+ return {
86
+ I: applyAlpha(activeColorMap.I, alpha),
87
+ N: applyAlpha(activeColorMap.N, alpha),
88
+ D: applyAlpha(activeColorMap.D, alpha),
89
+ X: applyAlpha(activeColorMap.X, alpha),
90
+ M: applyAlpha(activeColorMap.M, alpha),
91
+ '=': applyAlpha(activeColorMap['='], alpha),
92
+ };
93
+ },
94
+ get posColorWithAlpha() {
95
+ const posColor = self.colorBy === 'strand' ? colorSchemes.strand.posColor : 'red';
96
+ return applyAlpha(posColor, self.alpha);
97
+ },
98
+ get negColorWithAlpha() {
99
+ const negColor = self.colorBy === 'strand' ? colorSchemes.strand.negColor : 'blue';
100
+ return applyAlpha(negColor, self.alpha);
101
+ },
102
+ get queryColorWithAlphaMap() {
103
+ const { alpha } = self;
104
+ const cache = new Map();
105
+ return (queryName) => {
106
+ if (!cache.has(queryName)) {
107
+ const color = getQueryColor(queryName);
108
+ cache.set(queryName, applyAlpha(color, alpha));
109
+ }
110
+ return cache.get(queryName);
111
+ };
112
+ },
113
+ get queryTotalLengths() {
114
+ if (self.minAlignmentLength <= 0) {
115
+ return undefined;
116
+ }
117
+ const lengths = new Map();
118
+ for (const { f } of self.featPositions) {
119
+ const queryName = f.get('name') || f.get('id') || f.id();
120
+ const alignmentLength = Math.abs(f.get('end') - f.get('start'));
121
+ const currentTotal = lengths.get(queryName) || 0;
122
+ lengths.set(queryName, currentTotal + alignmentLength);
123
+ }
124
+ return lengths;
125
+ },
78
126
  }))
79
127
  .actions(self => ({
80
128
  afterAttach() {
@@ -53,11 +53,14 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
53
53
  lastTrackDragY: undefined | number;
54
54
  volatileError: unknown;
55
55
  scaleFactor: number;
56
+ targetBpPerPx: number | undefined;
56
57
  trackRefs: Record<string, HTMLDivElement>;
57
58
  coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
58
59
  coarseTotalBp: number;
59
60
  leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").BpOffset;
60
61
  rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").BpOffset;
62
+ isScalebarRefNameMenuOpen: boolean;
63
+ scalebarRefNameClickPending: boolean;
61
64
  } & {
62
65
  readonly pinnedTracks: any[];
63
66
  readonly unpinnedTracks: any[];
@@ -111,6 +114,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
111
114
  setShowCytobands(flag: boolean): void;
112
115
  setWidth(newWidth: number): void;
113
116
  setError(error: unknown): void;
117
+ setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
118
+ setScalebarRefNameClickPending(pending: boolean): void;
114
119
  setHideHeader(b: boolean): void;
115
120
  setHideHeaderOverview(b: boolean): void;
116
121
  setHideNoTracksActive(b: boolean): void;
@@ -150,6 +155,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
150
155
  setDraggingTrackId(idx?: string): void;
151
156
  setLastTrackDragY(y: number): void;
152
157
  setScaleFactor(factor: number): void;
158
+ setTargetBpPerPx(target: number | undefined): void;
153
159
  clearView(): void;
154
160
  setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").InitState): void;
155
161
  exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").ExportSvgOptions): Promise<void>;
@@ -171,6 +177,9 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
171
177
  readonly visibleLocStrings: string;
172
178
  readonly coarseVisibleLocStrings: string;
173
179
  readonly coarseTotalBpDisplayStr: string;
180
+ readonly effectiveBpPerPx: number;
181
+ readonly effectiveTotalBp: number;
182
+ readonly effectiveTotalBpDisplayStr: string;
174
183
  } & {
175
184
  setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
176
185
  } & {
@@ -182,8 +191,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
182
191
  }): Promise<void>;
183
192
  navToLocation(parsedLocString: import("@jbrowse/core/util").ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
184
193
  navToLocations(regions: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
185
- navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation): void;
186
- navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation[]): void;
194
+ navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation, grow?: number): void;
195
+ navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation[], grow?: number): void;
187
196
  } & {
188
197
  rubberBandMenuItems(): import("@jbrowse/core/ui").MenuItem[];
189
198
  bpToPx({ refName, coord, regionNumber, }: {
@@ -349,21 +358,30 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
349
358
  muiName: string;
350
359
  };
351
360
  helpText: string;
361
+ subMenu?: undefined;
352
362
  type?: undefined;
353
363
  checked?: undefined;
354
- subMenu?: undefined;
355
- } | {
356
- label: string;
357
- type: string;
358
- checked: boolean;
359
- onClick: () => void;
360
- helpText: string;
361
- description?: undefined;
362
- icon?: undefined;
363
- subMenu?: undefined;
364
364
  } | {
365
365
  label: string;
366
366
  subMenu: ({
367
+ label: string;
368
+ onClick: () => void;
369
+ description: string;
370
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
371
+ muiName: string;
372
+ };
373
+ helpText: string;
374
+ type?: undefined;
375
+ checked?: undefined;
376
+ } | {
377
+ label: string;
378
+ type: string;
379
+ checked: boolean;
380
+ onClick: () => void;
381
+ helpText: string;
382
+ description?: undefined;
383
+ icon?: undefined;
384
+ } | {
367
385
  label: string;
368
386
  checked: boolean;
369
387
  type: string;
@@ -403,11 +421,11 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
403
421
  muiName: string;
404
422
  };
405
423
  onClick: () => void;
406
- helpText: string;
407
424
  description?: undefined;
425
+ helpText?: undefined;
426
+ subMenu?: undefined;
408
427
  type?: undefined;
409
428
  checked?: undefined;
410
- subMenu?: undefined;
411
429
  })[];
412
430
  menuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
413
431
  label: string;
@@ -471,11 +489,14 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
471
489
  lastTrackDragY: undefined | number;
472
490
  volatileError: unknown;
473
491
  scaleFactor: number;
492
+ targetBpPerPx: number | undefined;
474
493
  trackRefs: Record<string, HTMLDivElement>;
475
494
  coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
476
495
  coarseTotalBp: number;
477
496
  leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").BpOffset;
478
497
  rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").BpOffset;
498
+ isScalebarRefNameMenuOpen: boolean;
499
+ scalebarRefNameClickPending: boolean;
479
500
  } & {
480
501
  readonly pinnedTracks: any[];
481
502
  readonly unpinnedTracks: any[];
@@ -529,6 +550,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
529
550
  setShowCytobands(flag: boolean): void;
530
551
  setWidth(newWidth: number): void;
531
552
  setError(error: unknown): void;
553
+ setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
554
+ setScalebarRefNameClickPending(pending: boolean): void;
532
555
  setHideHeader(b: boolean): void;
533
556
  setHideHeaderOverview(b: boolean): void;
534
557
  setHideNoTracksActive(b: boolean): void;
@@ -568,6 +591,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
568
591
  setDraggingTrackId(idx?: string): void;
569
592
  setLastTrackDragY(y: number): void;
570
593
  setScaleFactor(factor: number): void;
594
+ setTargetBpPerPx(target: number | undefined): void;
571
595
  clearView(): void;
572
596
  setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").InitState): void;
573
597
  exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").ExportSvgOptions): Promise<void>;
@@ -589,6 +613,9 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
589
613
  readonly visibleLocStrings: string;
590
614
  readonly coarseVisibleLocStrings: string;
591
615
  readonly coarseTotalBpDisplayStr: string;
616
+ readonly effectiveBpPerPx: number;
617
+ readonly effectiveTotalBp: number;
618
+ readonly effectiveTotalBpDisplayStr: string;
592
619
  } & {
593
620
  setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
594
621
  } & {
@@ -600,8 +627,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
600
627
  }): Promise<void>;
601
628
  navToLocation(parsedLocString: import("@jbrowse/core/util").ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
602
629
  navToLocations(regions: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
603
- navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation): void;
604
- navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation[]): void;
630
+ navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation, grow?: number): void;
631
+ navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation[], grow?: number): void;
605
632
  } & {
606
633
  rubberBandMenuItems(): import("@jbrowse/core/ui").MenuItem[];
607
634
  bpToPx({ refName, coord, regionNumber, }: {
@@ -740,11 +767,14 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
740
767
  lastTrackDragY: undefined | number;
741
768
  volatileError: unknown;
742
769
  scaleFactor: number;
770
+ targetBpPerPx: number | undefined;
743
771
  trackRefs: Record<string, HTMLDivElement>;
744
772
  coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
745
773
  coarseTotalBp: number;
746
774
  leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").BpOffset;
747
775
  rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").BpOffset;
776
+ isScalebarRefNameMenuOpen: boolean;
777
+ scalebarRefNameClickPending: boolean;
748
778
  } & {
749
779
  readonly pinnedTracks: any[];
750
780
  readonly unpinnedTracks: any[];
@@ -798,6 +828,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
798
828
  setShowCytobands(flag: boolean): void;
799
829
  setWidth(newWidth: number): void;
800
830
  setError(error: unknown): void;
831
+ setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
832
+ setScalebarRefNameClickPending(pending: boolean): void;
801
833
  setHideHeader(b: boolean): void;
802
834
  setHideHeaderOverview(b: boolean): void;
803
835
  setHideNoTracksActive(b: boolean): void;
@@ -837,6 +869,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
837
869
  setDraggingTrackId(idx?: string): void;
838
870
  setLastTrackDragY(y: number): void;
839
871
  setScaleFactor(factor: number): void;
872
+ setTargetBpPerPx(target: number | undefined): void;
840
873
  clearView(): void;
841
874
  setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").InitState): void;
842
875
  exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").ExportSvgOptions): Promise<void>;
@@ -858,6 +891,9 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
858
891
  readonly visibleLocStrings: string;
859
892
  readonly coarseVisibleLocStrings: string;
860
893
  readonly coarseTotalBpDisplayStr: string;
894
+ readonly effectiveBpPerPx: number;
895
+ readonly effectiveTotalBp: number;
896
+ readonly effectiveTotalBpDisplayStr: string;
861
897
  } & {
862
898
  setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
863
899
  } & {
@@ -869,8 +905,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
869
905
  }): Promise<void>;
870
906
  navToLocation(parsedLocString: import("@jbrowse/core/util").ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
871
907
  navToLocations(regions: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
872
- navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation): void;
873
- navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation[]): void;
908
+ navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation, grow?: number): void;
909
+ navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types.ts").NavLocation[], grow?: number): void;
874
910
  } & {
875
911
  rubberBandMenuItems(): import("@jbrowse/core/ui").MenuItem[];
876
912
  bpToPx({ refName, coord, regionNumber, }: {
@@ -90,13 +90,6 @@ export default function stateModelFactory(pluginManager) {
90
90
  icon: CropFreeIcon,
91
91
  helpText: 'Square view synchronizes the zoom levels of both genome views by calculating the average zoom level and applying it to both panels. This helps ensure features are displayed at comparable scales, making it easier to compare syntenic regions visually.',
92
92
  },
93
- {
94
- label: 'Show all regions',
95
- onClick: self.showAllRegions,
96
- description: 'Show entire genome assemblies',
97
- icon: VisibilityIcon,
98
- helpText: 'This command will zoom out all views to display the entire genome assemblies. This is useful when you want to get a high-level overview of syntenic relationships across whole genomes or when you need to reset the view after zooming into specific regions.',
99
- },
100
93
  {
101
94
  label: 'Re-order chromosomes',
102
95
  onClick: () => {
@@ -113,39 +106,46 @@ export default function stateModelFactory(pluginManager) {
113
106
  helpText: "This operation 'diagonalizes' the data which algorithmically reorders and reorients chromosomes to minimize crossing synteny lines, creating a more diagonal pattern. This makes it easier to identify large-scale genomic rearrangements, inversions, and translocations. The process may take a few moments for large genomes.",
114
107
  },
115
108
  {
116
- label: 'Show dynamic controls',
117
- type: 'checkbox',
118
- checked: self.showDynamicControls,
119
- onClick: () => {
120
- self.setShowDynamicControls(!self.showDynamicControls);
121
- },
122
- helpText: 'Toggle visibility of dynamic controls like opacity and minimum length sliders. These controls allow you to adjust synteny visualization parameters in real-time.',
123
- },
124
- {
125
- label: 'Draw',
109
+ label: 'Show...',
126
110
  subMenu: [
127
111
  {
128
- label: 'Draw CIGAR',
112
+ label: 'Show all regions',
113
+ onClick: self.showAllRegions,
114
+ description: 'Show entire genome assemblies',
115
+ icon: VisibilityIcon,
116
+ helpText: 'This command will zoom out all views to display the entire genome assemblies. This is useful when you want to get a high-level overview of syntenic relationships across whole genomes or when you need to reset the view after zooming into specific regions.',
117
+ },
118
+ {
119
+ label: 'Show dynamic controls',
120
+ type: 'checkbox',
121
+ checked: self.showDynamicControls,
122
+ onClick: () => {
123
+ self.setShowDynamicControls(!self.showDynamicControls);
124
+ },
125
+ helpText: 'Toggle visibility of dynamic controls like opacity and minimum length sliders. These controls allow you to adjust synteny visualization parameters in real-time.',
126
+ },
127
+ {
128
+ label: 'Show CIGAR insertions/deletions',
129
129
  checked: self.drawCIGAR,
130
130
  type: 'checkbox',
131
- description: 'If disabled, only draws the broad scale CIGAR match',
131
+ description: 'If disabled, only shows the broad scale CIGAR match',
132
132
  onClick: () => {
133
133
  self.setDrawCIGAR(!self.drawCIGAR);
134
134
  },
135
135
  helpText: 'CIGAR strings encode detailed alignment information including matches, insertions, and deletions. When enabled, this option visualizes the fine-scale variations in syntenic alignments. Disable this for a cleaner view that shows only broad syntenic blocks.',
136
136
  },
137
137
  {
138
- label: 'Draw only CIGAR matches',
138
+ label: 'Show CIGAR matches only',
139
139
  checked: self.drawCIGARMatchesOnly,
140
140
  type: 'checkbox',
141
- description: 'If enabled, it hides the insertions and deletions in the CIGAR strings, helps with divergent',
141
+ description: 'If enabled, hides the insertions and deletions in the CIGAR strings',
142
142
  onClick: () => {
143
143
  self.setDrawCIGARMatchesOnly(!self.drawCIGARMatchesOnly);
144
144
  },
145
145
  helpText: 'When comparing divergent genomes, showing all insertions and deletions can clutter the view. This option filters the CIGAR visualization to show only the matching regions, providing a cleaner view of conserved syntenic blocks while hiding small-scale indels.',
146
146
  },
147
147
  {
148
- label: 'Draw curved lines',
148
+ label: 'Show curved lines',
149
149
  type: 'checkbox',
150
150
  checked: self.drawCurves,
151
151
  icon: Curves,
@@ -155,7 +155,7 @@ export default function stateModelFactory(pluginManager) {
155
155
  helpText: 'Toggle between straight lines and smooth bezier curves for synteny connections. Curved lines can make the visualization more aesthetically pleasing and may help reduce visual clutter when many syntenic regions are displayed. Straight lines provide a more direct representation.',
156
156
  },
157
157
  {
158
- label: 'Draw location markers',
158
+ label: 'Show location markers',
159
159
  type: 'checkbox',
160
160
  checked: self.drawLocationMarkers,
161
161
  description: 'Draw periodic markers to show location within large matches',
@@ -188,7 +188,6 @@ export default function stateModelFactory(pluginManager) {
188
188
  },
189
189
  ]);
190
190
  },
191
- helpText: 'Export the current synteny view as a scalable vector graphics (SVG) file. SVG format preserves quality at any zoom level and can be edited in vector graphics software like Inkscape or Adobe Illustrator. Perfect for creating publication-quality figures.',
192
191
  },
193
192
  ];
194
193
  },
@@ -10,8 +10,8 @@ const LinkToSyntenyView = observer(function LinkToSyntenyView({ model, feat, })
10
10
  event.preventDefault();
11
11
  const { views } = view;
12
12
  if (level !== undefined) {
13
- views[level]?.navTo(feat);
14
- views[level + 1]?.navTo(feat.mate);
13
+ views[level]?.navTo(feat, 0.2);
14
+ views[level + 1]?.navTo(feat.mate, 0.2);
15
15
  }
16
16
  else {
17
17
  const f1 = feat;
@@ -30,8 +30,8 @@ const LinkToSyntenyView = observer(function LinkToSyntenyView({ model, feat, })
30
30
  : '',
31
31
  ].join(' ... '));
32
32
  }
33
- v1?.navTo(f1);
34
- v2?.navTo(f2);
33
+ v1?.navTo(f1, 0.2);
34
+ v2?.navTo(f2, 0.2);
35
35
  }
36
36
  }, children: "Center view on this feature" }) })) : null, _jsx("li", { children: _jsx(Link, { href: "#", onClick: event => {
37
37
  event.preventDefault();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-comparative-view",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "JBrowse 2 linear comparative view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -28,9 +28,9 @@
28
28
  "file-saver-es": "^2.0.5",
29
29
  "mobx": "^6.15.0",
30
30
  "mobx-react": "^9.2.1",
31
- "@jbrowse/core": "^4.0.2",
32
- "@jbrowse/plugin-alignments": "^4.0.2",
33
- "@jbrowse/plugin-linear-genome-view": "^4.0.2"
31
+ "@jbrowse/plugin-alignments": "^4.0.4",
32
+ "@jbrowse/plugin-linear-genome-view": "^4.0.4",
33
+ "@jbrowse/core": "^4.0.4"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": ">=18.0.0",