@jbrowse/plugin-linear-genome-view 4.0.3 → 4.1.1
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.
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +1 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +7 -3
- package/esm/BaseLinearDisplay/components/Tooltip.js +1 -1
- package/esm/BaseLinearDisplay/model.d.ts +9 -0
- package/esm/BaseLinearDisplay/model.js +4 -4
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +5 -0
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +11 -0
- package/esm/BaseLinearDisplay/util.d.ts +1 -0
- package/esm/BaseLinearDisplay/util.js +11 -1
- package/esm/LinearBareDisplay/model.d.ts +9 -0
- package/esm/LinearBasicDisplay/model.d.ts +26 -4
- package/esm/LinearBasicDisplay/model.js +25 -21
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +1 -1
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +6 -7
- package/esm/LinearFeatureDisplay/model.d.ts +18 -3
- package/esm/LinearFeatureDisplay/model.js +64 -24
- package/esm/LinearGenomeView/afterAttach.js +8 -2
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
- package/esm/LinearGenomeView/components/Header.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +2 -2
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +5 -5
- package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -1
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +3 -3
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +4 -2
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +3 -3
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/Scalebar.js +3 -4
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +126 -4
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabel.js +3 -4
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +2 -2
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +2 -2
- package/esm/LinearGenomeView/components/useRangeSelect.js +28 -4
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
- package/esm/LinearGenomeView/index.d.ts +1 -0
- package/esm/LinearGenomeView/index.js +1 -0
- package/esm/LinearGenomeView/model.d.ts +14 -3
- package/esm/LinearGenomeView/model.js +52 -16
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +1 -1
- package/esm/LinearGenomeView/types.d.ts +9 -1
- package/esm/LinearGenomeView/util.d.ts +6 -2
- package/esm/LinearGenomeView/util.js +17 -18
- package/esm/index.d.ts +10 -0
- package/package.json +6 -5
|
@@ -95,7 +95,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
95
95
|
trackDisplayMode: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
96
96
|
trackMaxHeight: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
97
97
|
configuration: AnyConfigurationSchemaType;
|
|
98
|
-
|
|
98
|
+
jexlFiltersSetting: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>>;
|
|
99
99
|
}, {
|
|
100
100
|
rendererTypeName: string;
|
|
101
101
|
error: unknown;
|
|
@@ -143,6 +143,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
143
143
|
}> | null;
|
|
144
144
|
readonly adapterConfig: any;
|
|
145
145
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
146
|
+
readonly isMinimized: boolean;
|
|
146
147
|
readonly parentDisplay: any;
|
|
147
148
|
readonly effectiveRpcDriverName: any;
|
|
148
149
|
} & {
|
|
@@ -199,6 +200,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
199
200
|
}> | null;
|
|
200
201
|
readonly adapterConfig: any;
|
|
201
202
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
203
|
+
readonly isMinimized: boolean;
|
|
202
204
|
readonly parentDisplay: any;
|
|
203
205
|
readonly effectiveRpcDriverName: any;
|
|
204
206
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
@@ -252,6 +254,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
252
254
|
}> | null;
|
|
253
255
|
readonly adapterConfig: any;
|
|
254
256
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
257
|
+
readonly isMinimized: boolean;
|
|
255
258
|
readonly parentDisplay: any;
|
|
256
259
|
readonly effectiveRpcDriverName: any;
|
|
257
260
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
@@ -533,6 +536,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
533
536
|
}> | null;
|
|
534
537
|
readonly adapterConfig: any;
|
|
535
538
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
539
|
+
readonly isMinimized: boolean;
|
|
536
540
|
readonly parentDisplay: any;
|
|
537
541
|
readonly effectiveRpcDriverName: any;
|
|
538
542
|
} & {
|
|
@@ -589,6 +593,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
589
593
|
}> | null;
|
|
590
594
|
readonly adapterConfig: any;
|
|
591
595
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
596
|
+
readonly isMinimized: boolean;
|
|
592
597
|
readonly parentDisplay: any;
|
|
593
598
|
readonly effectiveRpcDriverName: any;
|
|
594
599
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
@@ -642,6 +647,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
642
647
|
}> | null;
|
|
643
648
|
readonly adapterConfig: any;
|
|
644
649
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
650
|
+
readonly isMinimized: boolean;
|
|
645
651
|
readonly parentDisplay: any;
|
|
646
652
|
readonly effectiveRpcDriverName: any;
|
|
647
653
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
@@ -868,6 +874,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
868
874
|
}> | null;
|
|
869
875
|
readonly adapterConfig: any;
|
|
870
876
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
877
|
+
readonly isMinimized: boolean;
|
|
871
878
|
readonly parentDisplay: any;
|
|
872
879
|
readonly effectiveRpcDriverName: any;
|
|
873
880
|
} & {
|
|
@@ -924,6 +931,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
924
931
|
}> | null;
|
|
925
932
|
readonly adapterConfig: any;
|
|
926
933
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
934
|
+
readonly isMinimized: boolean;
|
|
927
935
|
readonly parentDisplay: any;
|
|
928
936
|
readonly effectiveRpcDriverName: any;
|
|
929
937
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
@@ -977,6 +985,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
977
985
|
}> | null;
|
|
978
986
|
readonly adapterConfig: any;
|
|
979
987
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
988
|
+
readonly isMinimized: boolean;
|
|
980
989
|
readonly parentDisplay: any;
|
|
981
990
|
readonly effectiveRpcDriverName: any;
|
|
982
991
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
@@ -1083,7 +1092,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
1083
1092
|
} & {
|
|
1084
1093
|
featureUnderMouseVolatile: Feature | undefined;
|
|
1085
1094
|
} & {
|
|
1086
|
-
|
|
1095
|
+
activeFilters(): string[];
|
|
1087
1096
|
readonly rendererTypeName: any;
|
|
1088
1097
|
readonly sequenceAdapter: any;
|
|
1089
1098
|
readonly showLabels: any;
|
|
@@ -1171,6 +1180,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
1171
1180
|
}> | null;
|
|
1172
1181
|
readonly adapterConfig: any;
|
|
1173
1182
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
1183
|
+
readonly isMinimized: boolean;
|
|
1174
1184
|
readonly parentDisplay: any;
|
|
1175
1185
|
readonly effectiveRpcDriverName: any;
|
|
1176
1186
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
@@ -1224,11 +1234,16 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
1224
1234
|
}> | null;
|
|
1225
1235
|
readonly adapterConfig: any;
|
|
1226
1236
|
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
1237
|
+
readonly isMinimized: boolean;
|
|
1227
1238
|
readonly parentDisplay: any;
|
|
1228
1239
|
readonly effectiveRpcDriverName: any;
|
|
1229
1240
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
1230
1241
|
};
|
|
1242
|
+
filterMenuItems(): MenuItem[];
|
|
1243
|
+
} & {
|
|
1231
1244
|
trackMenuItems(): MenuItem[];
|
|
1245
|
+
} & {
|
|
1246
|
+
afterAttach(): void;
|
|
1232
1247
|
}, {
|
|
1233
1248
|
type: string;
|
|
1234
1249
|
} & Partial<import("@jbrowse/mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
@@ -1408,7 +1423,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
1408
1423
|
trackDisplayMode: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1409
1424
|
trackMaxHeight: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
1410
1425
|
configuration: AnyConfigurationSchemaType;
|
|
1411
|
-
|
|
1426
|
+
jexlFiltersSetting: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>>;
|
|
1412
1427
|
}>>;
|
|
1413
1428
|
export type LinearFeatureDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
1414
1429
|
export type LinearFeatureDisplayModel = Instance<LinearFeatureDisplayStateModel>;
|
|
@@ -3,8 +3,10 @@ import { ConfigurationReference, getConf, readConfObject, } from '@jbrowse/core/
|
|
|
3
3
|
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
4
4
|
import { SimpleFeature, getSession } from '@jbrowse/core/util';
|
|
5
5
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
6
|
-
import { cast, getParent, isAlive, types } from '@jbrowse/mobx-state-tree';
|
|
6
|
+
import { addDisposer, cast, getParent, isAlive, types, } from '@jbrowse/mobx-state-tree';
|
|
7
|
+
import ClearAllIcon from '@mui/icons-material/ClearAll';
|
|
7
8
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
9
|
+
import { reaction, toJS } from 'mobx';
|
|
8
10
|
import { BaseLinearDisplay } from "../BaseLinearDisplay/index.js";
|
|
9
11
|
const SetMaxHeightDialog = lazy(() => import("./components/SetMaxHeightDialog.js"));
|
|
10
12
|
const AddFiltersDialog = lazy(() => import("./components/AddFiltersDialog.js"));
|
|
@@ -17,14 +19,14 @@ function stateModelFactory(configSchema) {
|
|
|
17
19
|
trackDisplayMode: types.maybe(types.string),
|
|
18
20
|
trackMaxHeight: types.maybe(types.number),
|
|
19
21
|
configuration: ConfigurationReference(configSchema),
|
|
20
|
-
|
|
22
|
+
jexlFiltersSetting: types.maybe(types.array(types.string)),
|
|
21
23
|
}))
|
|
22
24
|
.volatile(() => ({
|
|
23
25
|
featureUnderMouseVolatile: undefined,
|
|
24
26
|
}))
|
|
25
27
|
.views(self => ({
|
|
26
|
-
|
|
27
|
-
return (self.
|
|
28
|
+
activeFilters() {
|
|
29
|
+
return (toJS(self.jexlFiltersSetting) ??
|
|
28
30
|
getConf(self, 'jexlFilters').map((r) => `jexl:${r}`));
|
|
29
31
|
},
|
|
30
32
|
get rendererTypeName() {
|
|
@@ -66,7 +68,7 @@ function stateModelFactory(configSchema) {
|
|
|
66
68
|
}))
|
|
67
69
|
.actions(self => ({
|
|
68
70
|
setJexlFilters(f) {
|
|
69
|
-
self.
|
|
71
|
+
self.jexlFiltersSetting = cast(f);
|
|
70
72
|
},
|
|
71
73
|
setFeatureUnderMouse(feat) {
|
|
72
74
|
self.featureUnderMouseVolatile = feat;
|
|
@@ -90,7 +92,7 @@ function stateModelFactory(configSchema) {
|
|
|
90
92
|
},
|
|
91
93
|
}))
|
|
92
94
|
.views(self => {
|
|
93
|
-
const {
|
|
95
|
+
const { renderProps: superRenderProps, renderingProps: superRenderingProps, } = self;
|
|
94
96
|
return {
|
|
95
97
|
renderProps() {
|
|
96
98
|
const superProps = superRenderProps();
|
|
@@ -98,7 +100,7 @@ function stateModelFactory(configSchema) {
|
|
|
98
100
|
...superProps,
|
|
99
101
|
config: self.rendererConfig,
|
|
100
102
|
filters: new SerializableFilterChain({
|
|
101
|
-
filters: self.activeFilters,
|
|
103
|
+
filters: self.activeFilters(),
|
|
102
104
|
}),
|
|
103
105
|
sequenceAdapter: self.sequenceAdapter,
|
|
104
106
|
};
|
|
@@ -162,6 +164,27 @@ function stateModelFactory(configSchema) {
|
|
|
162
164
|
},
|
|
163
165
|
};
|
|
164
166
|
},
|
|
167
|
+
filterMenuItems() {
|
|
168
|
+
return [
|
|
169
|
+
{
|
|
170
|
+
label: 'Edit filters...',
|
|
171
|
+
onClick: () => {
|
|
172
|
+
getSession(self).queueDialog(handleClose => [
|
|
173
|
+
AddFiltersDialog,
|
|
174
|
+
{
|
|
175
|
+
model: self,
|
|
176
|
+
handleClose,
|
|
177
|
+
},
|
|
178
|
+
]);
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
];
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
})
|
|
185
|
+
.views(self => {
|
|
186
|
+
const { trackMenuItems: superTrackMenuItems } = self;
|
|
187
|
+
return {
|
|
165
188
|
trackMenuItems() {
|
|
166
189
|
return [
|
|
167
190
|
...superTrackMenuItems(),
|
|
@@ -225,31 +248,48 @@ function stateModelFactory(configSchema) {
|
|
|
225
248
|
},
|
|
226
249
|
},
|
|
227
250
|
{
|
|
228
|
-
label: '
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
label: 'Edit filters...',
|
|
232
|
-
onClick: () => {
|
|
233
|
-
getSession(self).queueDialog(handleClose => [
|
|
234
|
-
AddFiltersDialog,
|
|
235
|
-
{
|
|
236
|
-
model: self,
|
|
237
|
-
handleClose,
|
|
238
|
-
},
|
|
239
|
-
]);
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
],
|
|
251
|
+
label: 'Filter by...',
|
|
252
|
+
icon: ClearAllIcon,
|
|
253
|
+
subMenu: self.filterMenuItems(),
|
|
243
254
|
},
|
|
244
255
|
];
|
|
245
256
|
},
|
|
246
257
|
};
|
|
247
258
|
})
|
|
259
|
+
.actions(self => ({
|
|
260
|
+
afterAttach() {
|
|
261
|
+
addDisposer(self, reaction(() => self.featureIdUnderMouse, async (featureId) => {
|
|
262
|
+
if (!featureId) {
|
|
263
|
+
self.setFeatureUnderMouse(undefined);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const session = getSession(self);
|
|
267
|
+
const { rpcManager } = session;
|
|
268
|
+
const { parentTrack } = self;
|
|
269
|
+
try {
|
|
270
|
+
const sessionId = getRpcSessionId(self);
|
|
271
|
+
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
272
|
+
featureId,
|
|
273
|
+
sessionId,
|
|
274
|
+
trackInstanceId: parentTrack.id,
|
|
275
|
+
rendererType: self.rendererTypeName,
|
|
276
|
+
}));
|
|
277
|
+
if (isAlive(self) &&
|
|
278
|
+
feature &&
|
|
279
|
+
self.featureIdUnderMouse === featureId) {
|
|
280
|
+
self.setFeatureUnderMouse(new SimpleFeature(feature));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
catch (e) {
|
|
284
|
+
}
|
|
285
|
+
}, { delay: 50, name: 'LinearFeatureDisplayMouseoverReaction' }));
|
|
286
|
+
},
|
|
287
|
+
}))
|
|
248
288
|
.postProcessSnapshot(snap => {
|
|
249
289
|
if (!snap) {
|
|
250
290
|
return snap;
|
|
251
291
|
}
|
|
252
|
-
const { trackShowLabels, trackShowDescriptions, trackDisplayMode, trackMaxHeight,
|
|
292
|
+
const { trackShowLabels, trackShowDescriptions, trackDisplayMode, trackMaxHeight, jexlFiltersSetting, ...rest } = snap;
|
|
253
293
|
return {
|
|
254
294
|
...rest,
|
|
255
295
|
...(trackShowLabels !== undefined ? { trackShowLabels } : {}),
|
|
@@ -258,7 +298,7 @@ function stateModelFactory(configSchema) {
|
|
|
258
298
|
: {}),
|
|
259
299
|
...(trackDisplayMode !== undefined ? { trackDisplayMode } : {}),
|
|
260
300
|
...(trackMaxHeight !== undefined ? { trackMaxHeight } : {}),
|
|
261
|
-
...(
|
|
301
|
+
...(jexlFiltersSetting?.length ? { jexlFiltersSetting } : {}),
|
|
262
302
|
};
|
|
263
303
|
});
|
|
264
304
|
}
|
|
@@ -34,11 +34,17 @@ export function setupInitAutorun(self) {
|
|
|
34
34
|
const idsNotFound = [];
|
|
35
35
|
for (const t of init.tracks) {
|
|
36
36
|
try {
|
|
37
|
-
|
|
37
|
+
if (typeof t === 'string') {
|
|
38
|
+
self.showTrack(t);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
self.showTrack(t.trackId, t.trackSnapshot ?? {}, t.displaySnapshot ?? {});
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
catch (e) {
|
|
45
|
+
const trackId = typeof t === 'string' ? t : t.trackId;
|
|
40
46
|
if (/Could not resolve identifier/.exec(`${e}`)) {
|
|
41
|
-
idsNotFound.push(
|
|
47
|
+
idsNotFound.push(trackId);
|
|
42
48
|
}
|
|
43
49
|
else {
|
|
44
50
|
throw e;
|
|
@@ -12,7 +12,7 @@ const useStyles = makeStyles()({
|
|
|
12
12
|
});
|
|
13
13
|
const HeaderRegionWidth = observer(function HeaderRegionWidth({ model, }) {
|
|
14
14
|
const { classes } = useStyles();
|
|
15
|
-
const {
|
|
16
|
-
return (_jsx(Typography, { variant: "body2", color: "textSecondary", className: classes.bp, children:
|
|
15
|
+
const { effectiveTotalBpDisplayStr } = model;
|
|
16
|
+
return (_jsx(Typography, { variant: "body2", color: "textSecondary", className: classes.bp, children: effectiveTotalBpDisplayStr }));
|
|
17
17
|
});
|
|
18
18
|
export default HeaderRegionWidth;
|
|
@@ -26,13 +26,13 @@ function ValueLabelComponent(props) {
|
|
|
26
26
|
}
|
|
27
27
|
const HeaderZoomControls = observer(function HeaderZoomControls({ model, }) {
|
|
28
28
|
const { classes } = useStyles();
|
|
29
|
-
const { width, maxBpPerPx, minBpPerPx, bpPerPx } = model;
|
|
29
|
+
const { width, maxBpPerPx, minBpPerPx, bpPerPx, effectiveBpPerPx } = model;
|
|
30
30
|
const [value, setValue] = useState(-Math.log2(bpPerPx) * 100);
|
|
31
31
|
useEffect(() => {
|
|
32
|
-
setValue(-Math.log2(
|
|
33
|
-
}, [
|
|
34
|
-
const zoomInDisabled =
|
|
35
|
-
const zoomOutDisabled =
|
|
32
|
+
setValue(-Math.log2(effectiveBpPerPx) * 100);
|
|
33
|
+
}, [effectiveBpPerPx]);
|
|
34
|
+
const zoomInDisabled = effectiveBpPerPx <= minBpPerPx + 0.0001;
|
|
35
|
+
const zoomOutDisabled = effectiveBpPerPx >= maxBpPerPx - 0.0001;
|
|
36
36
|
return (_jsxs("div", { className: classes.container, children: [_jsx(Tooltip, { title: "Zoom out 2x", children: _jsx("span", { children: _jsx(IconButton, { "data-testid": "zoom_out", disabled: zoomOutDisabled, onClick: () => {
|
|
37
37
|
model.zoom(bpPerPx * 2);
|
|
38
38
|
}, children: _jsx(ZoomOut, {}) }) }) }), _jsx(Slider, { size: "small", className: classes.slider, value: value, min: -Math.log2(maxBpPerPx) * 100, max: -Math.log2(minBpPerPx) * 100, onChangeCommitted: () => model.zoomTo(2 ** (-value / 100)), valueLabelDisplay: "auto", valueLabelFormat: newValue => `Window size: ${getBpDisplayStr(2 ** (-newValue / 100) * width)}`, slots: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
3
3
|
type LGV = LinearGenomeViewModel;
|
|
4
4
|
declare const ImportFormRefNameAutocomplete: ({ model, selectedAsm, value, setValue, setOption, }: {
|
|
@@ -20,12 +20,12 @@ const useStyles = makeStyles()(theme => ({
|
|
|
20
20
|
}));
|
|
21
21
|
const MiniControls = observer(function MiniControls({ model, }) {
|
|
22
22
|
const { classes } = useStyles();
|
|
23
|
-
const { id, bpPerPx, maxBpPerPx, minBpPerPx, hideHeader } = model;
|
|
23
|
+
const { id, bpPerPx, maxBpPerPx, minBpPerPx, hideHeader, effectiveBpPerPx } = model;
|
|
24
24
|
const { focusedViewId } = getSession(model);
|
|
25
25
|
return hideHeader ? (_jsx(Paper, { className: classes.background, children: _jsxs(Paper, { className: focusedViewId === id ? classes.focusedBackground : undefined, children: [_jsx(CascadingMenuButton, { menuItems: () => model.menuItems(), children: _jsx(ArrowDown, { fontSize: "small" }) }), _jsx(IconButton, { "data-testid": "zoom_out", onClick: () => {
|
|
26
26
|
model.zoom(bpPerPx * 2);
|
|
27
|
-
}, disabled:
|
|
27
|
+
}, disabled: effectiveBpPerPx >= maxBpPerPx - 0.0001, children: _jsx(ZoomOut, { fontSize: "small" }) }), _jsx(IconButton, { "data-testid": "zoom_in", onClick: () => {
|
|
28
28
|
model.zoom(bpPerPx / 2);
|
|
29
|
-
}, disabled:
|
|
29
|
+
}, disabled: effectiveBpPerPx <= minBpPerPx + 0.0001, children: _jsx(ZoomIn, { fontSize: "small" }) })] }) })) : null;
|
|
30
30
|
});
|
|
31
31
|
export default MiniControls;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
3
|
type LGV = LinearGenomeViewModel;
|
|
4
4
|
declare const OverviewRubberband: ({ model, overview, ControlComponent, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
3
|
type LGV = LinearGenomeViewModel;
|
|
4
4
|
declare const OverviewRubberbandHoverTooltip: ({ model, open, guideX, overview, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
3
|
declare const OverviewScalebarPolygon: ({ model, overview, useOffset, }: {
|
|
4
4
|
model: LinearGenomeViewModel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
3
|
import type { ContentBlock } from '@jbrowse/core/util/blockTypes';
|
|
4
4
|
declare const OverviewScalebarTickLabels: ({ block, scale, overview, model, }: {
|
|
@@ -2,11 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { TextField } from '@mui/material';
|
|
3
3
|
export default function AutocompleteTextField({ TextFieldProps, inputBoxVal, params, setInputValue, setCurrentSearch, }) {
|
|
4
4
|
const { helperText, slotProps = {} } = TextFieldProps;
|
|
5
|
+
const { ref: inputRef, ...restInputProps } = params.InputProps;
|
|
6
|
+
const { InputProps: _InputProps, ...restParams } = params;
|
|
5
7
|
return (_jsx(TextField, { onBlur: () => {
|
|
6
8
|
setInputValue(inputBoxVal);
|
|
7
|
-
}, ...
|
|
9
|
+
}, ...restParams, ...TextFieldProps, inputRef: inputRef, size: "small", helperText: helperText, slotProps: {
|
|
8
10
|
input: {
|
|
9
|
-
...
|
|
11
|
+
...restInputProps,
|
|
10
12
|
...slotProps.input,
|
|
11
13
|
},
|
|
12
14
|
}, placeholder: "Search for location", onChange: e => {
|
|
@@ -17,10 +17,10 @@ const useStyles = makeStyles()({
|
|
|
17
17
|
const Rubberband = observer(function Rubberband({ model, ControlComponent = _jsx("div", {}), }) {
|
|
18
18
|
const ref = useRef(null);
|
|
19
19
|
const { classes } = useStyles();
|
|
20
|
-
const { stickyViewHeaders, rubberbandTop } = model;
|
|
20
|
+
const { stickyViewHeaders, rubberbandTop, isScalebarRefNameMenuOpen } = model;
|
|
21
21
|
const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, isClick, clickBpOffset, handleMenuItemClick, handleClose, mouseMove, mouseDown, mouseOut, } = useRangeSelect(ref, model);
|
|
22
|
-
return (_jsxs(_Fragment, { children: [guideX !== undefined ? (_jsx(VerticalGuide, { model: model, coordX: guideX })) : rubberbandOn ? (_jsx(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left, top: rubberbandTop, sticky: stickyViewHeaders })) : null, anchorPosition ? (_jsx(Menu, { anchorReference: "anchorPosition", anchorPosition: {
|
|
23
|
-
left: anchorPosition.clientX,
|
|
22
|
+
return (_jsxs(_Fragment, { children: [guideX !== undefined && !isScalebarRefNameMenuOpen ? (_jsx(VerticalGuide, { model: model, coordX: guideX })) : rubberbandOn ? (_jsx(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left, top: rubberbandTop, sticky: stickyViewHeaders })) : null, anchorPosition ? (_jsx(Menu, { anchorReference: "anchorPosition", anchorPosition: {
|
|
23
|
+
left: anchorPosition.clientX + 10,
|
|
24
24
|
top: anchorPosition.clientY,
|
|
25
25
|
}, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: isClick && clickBpOffset
|
|
26
26
|
? model.rubberbandClickMenuItems(clickBpOffset)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { LinearGenomeViewModel } from '
|
|
2
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
3
3
|
type LGV = LinearGenomeViewModel;
|
|
4
4
|
interface ScalebarProps {
|
|
5
5
|
model: LGV;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const Scalebar:
|
|
9
|
+
declare const Scalebar: ({ model, style, className, ...other }: ScalebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default Scalebar;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
2
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
3
|
import { Paper } from '@mui/material';
|
|
5
4
|
import { observer } from 'mobx-react';
|
|
@@ -20,14 +19,14 @@ const useStyles = makeStyles()({
|
|
|
20
19
|
pointerEvents: 'none',
|
|
21
20
|
},
|
|
22
21
|
});
|
|
23
|
-
const Scalebar = observer(
|
|
22
|
+
const Scalebar = observer(function Scalebar({ model, style, className, ...other }) {
|
|
24
23
|
const { classes } = useStyles();
|
|
25
24
|
const { scaleFactor, staticBlocks, offsetPx } = model;
|
|
26
|
-
return (_jsxs(Paper, { "data-resizer": "true", className: cx(classes.container, className), variant: "outlined",
|
|
25
|
+
return (_jsxs(Paper, { "data-resizer": "true", className: cx(classes.container, className), variant: "outlined", style: { ...style, '--offset-px': `${offsetPx}px` }, ...other, children: [_jsx(Gridlines, { model: model, offset: 1 }), _jsx("div", { className: classes.zoomContainer, style: {
|
|
27
26
|
transform: scaleFactor !== 1 ? `scaleX(${scaleFactor})` : undefined,
|
|
28
27
|
}, children: _jsx("div", { className: classes.scalebar, style: {
|
|
29
28
|
transform: `translateX(calc(${staticBlocks.offsetPx}px - var(--offset-px) - 1px))`,
|
|
30
29
|
width: staticBlocks.totalWidthPx,
|
|
31
30
|
}, children: _jsx(ScalebarCoordinateLabels, { model: model }) }) }), _jsx(ScalebarRefNameLabels, { model: model })] }));
|
|
32
|
-
})
|
|
31
|
+
});
|
|
33
32
|
export default Scalebar;
|