@jbrowse/plugin-lollipop 2.17.0 → 3.0.0
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/dist/LinearLollipopDisplay/configSchema.d.ts +1 -7
- package/dist/LinearLollipopDisplay/configSchema.js +0 -9
- package/dist/LinearLollipopDisplay/index.d.ts +1 -1
- package/dist/LinearLollipopDisplay/index.js +1 -1
- package/dist/LinearLollipopDisplay/model.d.ts +19 -75
- package/dist/LinearLollipopDisplay/model.js +1 -24
- package/dist/LollipopRenderer/Layout.d.ts +1 -4
- package/dist/LollipopRenderer/Layout.js +1 -12
- package/dist/LollipopRenderer/LollipopRenderer.js +19 -9
- package/dist/LollipopRenderer/components/Lollipop.d.ts +1 -2
- package/dist/LollipopRenderer/components/Lollipop.js +2 -6
- package/dist/LollipopRenderer/components/LollipopRendering.d.ts +1 -2
- package/dist/LollipopRenderer/components/LollipopRendering.js +6 -8
- package/dist/LollipopRenderer/components/ScoreText.d.ts +3 -4
- package/dist/LollipopRenderer/components/ScoreText.js +2 -5
- package/dist/LollipopRenderer/components/Stick.d.ts +3 -4
- package/dist/LollipopRenderer/components/Stick.js +2 -5
- package/dist/LollipopRenderer/index.d.ts +1 -1
- package/dist/LollipopRenderer/index.js +17 -7
- package/dist/index.d.ts +1 -1
- package/esm/LinearLollipopDisplay/configSchema.d.ts +1 -7
- package/esm/LinearLollipopDisplay/configSchema.js +0 -9
- package/esm/LinearLollipopDisplay/index.d.ts +1 -1
- package/esm/LinearLollipopDisplay/index.js +1 -1
- package/esm/LinearLollipopDisplay/model.d.ts +19 -75
- package/esm/LinearLollipopDisplay/model.js +2 -25
- package/esm/LollipopRenderer/Layout.d.ts +1 -4
- package/esm/LollipopRenderer/Layout.js +1 -12
- package/esm/LollipopRenderer/LollipopRenderer.js +2 -2
- package/esm/LollipopRenderer/components/Lollipop.d.ts +1 -2
- package/esm/LollipopRenderer/components/Lollipop.js +2 -6
- package/esm/LollipopRenderer/components/LollipopRendering.d.ts +1 -2
- package/esm/LollipopRenderer/components/LollipopRendering.js +7 -9
- package/esm/LollipopRenderer/components/ScoreText.d.ts +3 -4
- package/esm/LollipopRenderer/components/ScoreText.js +3 -3
- package/esm/LollipopRenderer/components/Stick.d.ts +3 -4
- package/esm/LollipopRenderer/components/Stick.js +3 -3
- package/esm/LollipopRenderer/index.d.ts +1 -1
- package/esm/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearLollipopDisplay
|
|
4
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
5
2
|
export declare function configSchemaFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
/**
|
|
7
|
-
* #slot
|
|
8
|
-
*/
|
|
9
3
|
renderer: import("mobx-state-tree").IAnyModelType;
|
|
10
4
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
11
5
|
maxFeatureScreenDensity: {
|
|
@@ -3,19 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.configSchemaFactory = configSchemaFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
5
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
6
|
-
/**
|
|
7
|
-
* #config LinearLollipopDisplay
|
|
8
|
-
*/
|
|
9
6
|
function configSchemaFactory(pluginManager) {
|
|
10
7
|
return (0, configuration_1.ConfigurationSchema)('LinearLollipopDisplay', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
8
|
renderer: pluginManager.pluggableConfigSchemaType('renderer'),
|
|
15
9
|
}, {
|
|
16
|
-
/**
|
|
17
|
-
* #baseConfiguration
|
|
18
|
-
*/
|
|
19
10
|
baseConfiguration: plugin_linear_genome_view_1.baseLinearDisplayConfigSchema,
|
|
20
11
|
explicitlyTyped: true,
|
|
21
12
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearLollipopDisplayF(pluginManager: PluginManager): void;
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = LinearLollipopDisplayF;
|
|
4
4
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
5
5
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
6
|
-
const model_1 = require("./model");
|
|
7
6
|
const configSchema_1 = require("./configSchema");
|
|
7
|
+
const model_1 = require("./model");
|
|
8
8
|
function LinearLollipopDisplayF(pluginManager) {
|
|
9
9
|
pluginManager.addDisplayType(() => {
|
|
10
10
|
const configSchema = (0, configSchema_1.configSchemaFactory)(pluginManager);
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* #stateModel LinearLollipopDisplay
|
|
4
|
-
* extends
|
|
5
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
6
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
7
2
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
8
|
-
id: import("mobx-state-tree"
|
|
9
|
-
|
|
10
|
-
*/).IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
11
|
-
type: import("mobx-state-tree" /**
|
|
12
|
-
* #getter
|
|
13
|
-
*/).ISimpleType<string>;
|
|
3
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
4
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
14
5
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
15
6
|
} & {
|
|
16
7
|
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
@@ -20,21 +11,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
20
11
|
} & {
|
|
21
12
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
22
13
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
23
|
-
region: import("mobx-state-tree").
|
|
24
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
25
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
26
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
27
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
28
|
-
} & {
|
|
29
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
30
|
-
}, {
|
|
31
|
-
setRefName(newRefName: string): void;
|
|
32
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
14
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
33
15
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
34
16
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
17
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
36
18
|
}, {
|
|
37
|
-
|
|
19
|
+
stopToken: string | undefined;
|
|
38
20
|
filled: boolean;
|
|
39
21
|
reactElement: React.ReactElement | undefined;
|
|
40
22
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -52,21 +34,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
52
34
|
status?: string;
|
|
53
35
|
reactElement?: React.ReactElement;
|
|
54
36
|
};
|
|
55
|
-
}) =>
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
56
38
|
renderProps: any;
|
|
57
39
|
} & {
|
|
58
40
|
doReload(): void;
|
|
59
41
|
afterAttach(): void;
|
|
60
42
|
setStatus(message: string): void;
|
|
61
|
-
setLoading(
|
|
43
|
+
setLoading(newStopToken: string): void;
|
|
62
44
|
setMessage(messageText: string): void;
|
|
63
|
-
setRendered(props:
|
|
64
|
-
reactElement: React.ReactElement;
|
|
65
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
66
|
-
layout: any;
|
|
67
|
-
maxHeightReached: boolean;
|
|
68
|
-
renderProps: any;
|
|
69
|
-
} | undefined): void;
|
|
45
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/dist/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
70
46
|
setError(error: unknown): void;
|
|
71
47
|
reload(): void;
|
|
72
48
|
beforeDestroy(): void;
|
|
@@ -100,13 +76,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
100
76
|
};
|
|
101
77
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
102
78
|
} & {
|
|
103
|
-
/**
|
|
104
|
-
* #property
|
|
105
|
-
*/
|
|
106
79
|
type: import("mobx-state-tree").ISimpleType<"LinearLollipopDisplay">;
|
|
107
|
-
/**
|
|
108
|
-
* #property
|
|
109
|
-
*/
|
|
110
80
|
configuration: AnyConfigurationSchemaType;
|
|
111
81
|
}, {
|
|
112
82
|
rendererTypeName: string;
|
|
@@ -197,14 +167,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
197
167
|
readonly regionTooLarge: boolean;
|
|
198
168
|
readonly regionTooLargeReason: string;
|
|
199
169
|
} & {
|
|
170
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
200
171
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
201
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region):
|
|
172
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
202
173
|
} & {
|
|
203
174
|
featureIdUnderMouse: undefined | string;
|
|
204
175
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
205
176
|
} & {
|
|
206
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
207
|
-
readonly blockType: "
|
|
177
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
178
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
208
179
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
209
180
|
} & {
|
|
210
181
|
readonly renderDelay: number;
|
|
@@ -231,24 +202,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
231
202
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
232
203
|
renderProps(): any;
|
|
233
204
|
} & {
|
|
234
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<
|
|
205
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
235
206
|
afterAttach(): void;
|
|
236
207
|
} & {
|
|
237
|
-
/**
|
|
238
|
-
* #getter
|
|
239
|
-
*/
|
|
240
208
|
readonly blockType: string;
|
|
241
|
-
/**
|
|
242
|
-
* #getter
|
|
243
|
-
*/
|
|
244
209
|
readonly renderDelay: number;
|
|
245
|
-
/**
|
|
246
|
-
* #method
|
|
247
|
-
*/
|
|
248
210
|
renderProps(): any;
|
|
249
|
-
/**
|
|
250
|
-
* #getter
|
|
251
|
-
*/
|
|
252
211
|
readonly rendererTypeName: any;
|
|
253
212
|
}, {
|
|
254
213
|
type: string;
|
|
@@ -264,21 +223,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
264
223
|
} & {
|
|
265
224
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
266
225
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
267
|
-
region: import("mobx-state-tree").
|
|
268
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
269
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
270
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
271
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
272
|
-
} & {
|
|
273
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
274
|
-
}, {
|
|
275
|
-
setRefName(newRefName: string): void;
|
|
276
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
226
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
277
227
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
278
228
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
279
229
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
280
230
|
}, {
|
|
281
|
-
|
|
231
|
+
stopToken: string | undefined;
|
|
282
232
|
filled: boolean;
|
|
283
233
|
reactElement: React.ReactElement | undefined;
|
|
284
234
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -296,21 +246,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
296
246
|
status?: string;
|
|
297
247
|
reactElement?: React.ReactElement;
|
|
298
248
|
};
|
|
299
|
-
}) =>
|
|
249
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
300
250
|
renderProps: any;
|
|
301
251
|
} & {
|
|
302
252
|
doReload(): void;
|
|
303
253
|
afterAttach(): void;
|
|
304
254
|
setStatus(message: string): void;
|
|
305
|
-
setLoading(
|
|
255
|
+
setLoading(newStopToken: string): void;
|
|
306
256
|
setMessage(messageText: string): void;
|
|
307
|
-
setRendered(props:
|
|
308
|
-
reactElement: React.ReactElement;
|
|
309
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
310
|
-
layout: any;
|
|
311
|
-
maxHeightReached: boolean;
|
|
312
|
-
renderProps: any;
|
|
313
|
-
} | undefined): void;
|
|
257
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/dist/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
314
258
|
setError(error: unknown): void;
|
|
315
259
|
reload(): void;
|
|
316
260
|
beforeDestroy(): void;
|
|
@@ -347,8 +291,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
347
291
|
type: string;
|
|
348
292
|
id: string;
|
|
349
293
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
350
|
-
heightPreConfig: number | undefined;
|
|
351
294
|
rpcDriverName: string | undefined;
|
|
295
|
+
heightPreConfig: number | undefined;
|
|
352
296
|
userBpPerPxLimit: number | undefined;
|
|
353
297
|
userByteSizeLimit: number | undefined;
|
|
354
298
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -2,43 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stateModelFactory = stateModelFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
5
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
7
|
-
|
|
8
|
-
* #stateModel LinearLollipopDisplay
|
|
9
|
-
* extends
|
|
10
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
11
|
-
*/
|
|
6
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
12
7
|
function stateModelFactory(configSchema) {
|
|
13
8
|
return mobx_state_tree_1.types
|
|
14
9
|
.compose('LinearLollipopDisplay', plugin_linear_genome_view_1.BaseLinearDisplay, mobx_state_tree_1.types.model({
|
|
15
|
-
/**
|
|
16
|
-
* #property
|
|
17
|
-
*/
|
|
18
10
|
type: mobx_state_tree_1.types.literal('LinearLollipopDisplay'),
|
|
19
|
-
/**
|
|
20
|
-
* #property
|
|
21
|
-
*/
|
|
22
11
|
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
23
12
|
}))
|
|
24
13
|
.views(self => {
|
|
25
14
|
const { renderProps: superRenderProps } = self;
|
|
26
15
|
return {
|
|
27
|
-
/**
|
|
28
|
-
* #getter
|
|
29
|
-
*/
|
|
30
16
|
get blockType() {
|
|
31
17
|
return 'dynamicBlocks';
|
|
32
18
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
19
|
get renderDelay() {
|
|
37
20
|
return 500;
|
|
38
21
|
},
|
|
39
|
-
/**
|
|
40
|
-
* #method
|
|
41
|
-
*/
|
|
42
22
|
renderProps() {
|
|
43
23
|
return {
|
|
44
24
|
...superRenderProps(),
|
|
@@ -46,9 +26,6 @@ function stateModelFactory(configSchema) {
|
|
|
46
26
|
config: self.configuration.renderer,
|
|
47
27
|
};
|
|
48
28
|
},
|
|
49
|
-
/**
|
|
50
|
-
* #getter
|
|
51
|
-
*/
|
|
52
29
|
get rendererTypeName() {
|
|
53
30
|
return self.configuration.renderer.type;
|
|
54
31
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
2
|
interface LayoutItem {
|
|
3
3
|
uniqueId: string;
|
|
4
4
|
anchorLocation: number;
|
|
@@ -25,9 +25,6 @@ export declare class FloatingLayout {
|
|
|
25
25
|
add(uniqueId: string, anchorLocation: number, width: number, height: number, data: {
|
|
26
26
|
score: number;
|
|
27
27
|
}): void;
|
|
28
|
-
/**
|
|
29
|
-
* @returns Map of `uniqueId => {x,y,anchorLocation,width,height,data}`
|
|
30
|
-
*/
|
|
31
28
|
getLayout(configuration?: AnyConfigurationModel): LayoutMap;
|
|
32
29
|
getTotalHeight(): number;
|
|
33
30
|
serializeRegion(): {
|
|
@@ -18,9 +18,6 @@ class FloatingLayout {
|
|
|
18
18
|
this.items.push({ uniqueId, anchorLocation, width, height, data });
|
|
19
19
|
this.layoutDirty = true;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* @returns Map of `uniqueId => {x,y,anchorLocation,width,height,data}`
|
|
23
|
-
*/
|
|
24
21
|
getLayout(configuration) {
|
|
25
22
|
if (!this.layoutDirty) {
|
|
26
23
|
return this.layout;
|
|
@@ -29,10 +26,7 @@ class FloatingLayout {
|
|
|
29
26
|
throw new Error('configuration object required');
|
|
30
27
|
}
|
|
31
28
|
const minY = (0, configuration_1.readConfObject)(configuration, 'minStickLength');
|
|
32
|
-
// sort them by score ascending, so higher scores will always end up
|
|
33
|
-
// stacked last (toward the bottom)
|
|
34
29
|
const sorted = this.items.sort((a, b) => a.data.score - b.data.score);
|
|
35
|
-
// bump them
|
|
36
30
|
let maxBottom = 0;
|
|
37
31
|
const layoutEntries = new Array(sorted.length);
|
|
38
32
|
for (let i = 0; i < sorted.length; i += 1) {
|
|
@@ -42,7 +36,6 @@ class FloatingLayout {
|
|
|
42
36
|
const end = start + width;
|
|
43
37
|
let top = minY;
|
|
44
38
|
let bottom = top + height;
|
|
45
|
-
// figure out how far down to put it
|
|
46
39
|
for (let j = 0; j < i; j += 1) {
|
|
47
40
|
const [, previouslyLaidOutItem] = layoutEntries[j];
|
|
48
41
|
const { x: prevStart, y: prevTop, width: prevWidth, height: prevHeight, } = previouslyLaidOutItem;
|
|
@@ -50,13 +43,11 @@ class FloatingLayout {
|
|
|
50
43
|
const prevBottom = prevTop + prevHeight;
|
|
51
44
|
if ((0, range_1.doesIntersect2)(prevStart, prevEnd, start, end) &&
|
|
52
45
|
(0, range_1.doesIntersect2)(prevTop, prevBottom, top, bottom)) {
|
|
53
|
-
// bump this one to the bottom of the previous one
|
|
54
46
|
top = prevBottom;
|
|
55
47
|
bottom = top + height;
|
|
56
|
-
j = -1;
|
|
48
|
+
j = -1;
|
|
57
49
|
}
|
|
58
50
|
}
|
|
59
|
-
// record the entry and update the maxBottom
|
|
60
51
|
layoutEntries[i] = [
|
|
61
52
|
currentItem.uniqueId,
|
|
62
53
|
{ ...currentItem, x: start, y: top },
|
|
@@ -65,8 +56,6 @@ class FloatingLayout {
|
|
|
65
56
|
maxBottom = bottom;
|
|
66
57
|
}
|
|
67
58
|
}
|
|
68
|
-
// try to tile them left to right all at the same level
|
|
69
|
-
// if they don't fit, try to alternate them on 2 levels, then 3
|
|
70
59
|
this.totalHeight = maxBottom;
|
|
71
60
|
this.layout = new Map(layoutEntries);
|
|
72
61
|
this.layoutDirty = false;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -36,8 +46,8 @@ class FloatingLayoutSession extends BoxRendererType_1.LayoutSession {
|
|
|
36
46
|
const widthPx = (end - start) / this.bpPerPx;
|
|
37
47
|
return new MultiLayout_1.default(Layout_1.FloatingLayout, { width: widthPx });
|
|
38
48
|
}
|
|
39
|
-
layoutIsValid(
|
|
40
|
-
return false;
|
|
49
|
+
layoutIsValid() {
|
|
50
|
+
return false;
|
|
41
51
|
}
|
|
42
52
|
}
|
|
43
53
|
class LollipopRenderer extends BoxRendererType_1.default {
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
8
|
const mobx_react_1 = require("mobx-react");
|
|
9
9
|
const ScoreText_1 = __importDefault(require("./ScoreText"));
|
|
@@ -53,10 +53,6 @@ const Lollipop = (0, mobx_react_1.observer)(function Lollipop(props) {
|
|
|
53
53
|
fill: (0, configuration_1.readConfObject)(config, 'innerColor', { feature }),
|
|
54
54
|
};
|
|
55
55
|
const strokeWidth = (0, configuration_1.readConfObject)(config, 'strokeWidth', { feature });
|
|
56
|
-
return (
|
|
57
|
-
react_1.default.createElement("title", null, (0, configuration_1.readConfObject)(config, 'caption', { feature })),
|
|
58
|
-
react_1.default.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }),
|
|
59
|
-
radiusPx - strokeWidth <= 2 ? null : (react_1.default.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })),
|
|
60
|
-
react_1.default.createElement(ScoreText_1.default, { feature: feature, config: config, layoutRecord: layoutRecord })));
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)("g", { "data-testid": feature.id(), children: [(0, jsx_runtime_1.jsx)("title", { children: (0, configuration_1.readConfObject)(config, 'caption', { feature }) }), (0, jsx_runtime_1.jsx)("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }), radiusPx - strokeWidth <= 2 ? null : ((0, jsx_runtime_1.jsx)("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })), (0, jsx_runtime_1.jsx)(ScoreText_1.default, { feature: feature, config: config, layoutRecord: layoutRecord })] }));
|
|
61
57
|
});
|
|
62
58
|
exports.default = Lollipop;
|
|
@@ -3,11 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
7
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
9
|
const util_1 = require("@jbrowse/core/util");
|
|
9
10
|
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
// locals
|
|
11
11
|
const Lollipop_1 = __importDefault(require("./Lollipop"));
|
|
12
12
|
const Stick_1 = __importDefault(require("./Stick"));
|
|
13
13
|
function layoutFeat(args) {
|
|
@@ -69,11 +69,9 @@ const LollipopRendering = (0, mobx_react_1.observer)(function (props) {
|
|
|
69
69
|
const width = (region.end - region.start) / bpPerPx;
|
|
70
70
|
const records = [...layout.getLayout(config).values()];
|
|
71
71
|
const height = layout.getTotalHeight();
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
react_1.default.createElement(Lollipop_1.default, { key: `body-${feature.id()}`, ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId })));
|
|
77
|
-
})));
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: width, height: height, style: { position: 'relative' }, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onFocus: onMouseEnter, onBlur: onMouseLeave, onClick: onClick, children: records.map(layoutRecord => {
|
|
73
|
+
const feature = features.get(layoutRecord.data.featureId);
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Stick_1.default, { ...props, config: config, layoutRecord: layoutRecord, feature: feature }, `stick-${feature.id()}`), (0, jsx_runtime_1.jsx)(Lollipop_1.default, { ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId }, `body-${feature.id()}`)] }, feature.id()));
|
|
75
|
+
}) }));
|
|
78
76
|
});
|
|
79
77
|
exports.default = LollipopRendering;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Feature } from '@jbrowse/core/util';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
export default function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }: {
|
|
5
4
|
feature: Feature;
|
|
6
5
|
config: AnyConfigurationModel;
|
|
@@ -12,4 +11,4 @@ export default function ScoreText({ feature, config, layoutRecord: { y, data: {
|
|
|
12
11
|
score: number;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
}):
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.default = ScoreText;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
9
6
|
const color_1 = require("@jbrowse/core/util/color");
|
|
10
7
|
function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }) {
|
|
@@ -15,5 +12,5 @@ function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radius
|
|
|
15
12
|
if (fontHeight < 12) {
|
|
16
13
|
return null;
|
|
17
14
|
}
|
|
18
|
-
return (
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("text", { style: { fontSize: fontHeight, fill: (0, color_1.contrastingTextColor)(innerColor) }, x: anchorX, y: y + radiusPx - fontHeight / 2.4, textAnchor: "middle", dominantBaseline: "hanging", children: scoreString }));
|
|
19
16
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Feature } from '@jbrowse/core/util';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }: {
|
|
5
4
|
feature: Feature;
|
|
6
5
|
config: AnyConfigurationModel;
|
|
@@ -11,5 +10,5 @@ declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data
|
|
|
11
10
|
radiusPx: number;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
|
-
}) =>
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default Stick;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
5
|
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const Stick = (0, mobx_react_1.observer)(function Stick({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }) {
|
|
10
|
-
return (
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("line", { x1: anchorLocation, y1: 0, x2: anchorLocation, y2: y + 2 * radiusPx, stroke: (0, configuration_1.readConfObject)(config, 'stickColor', { feature }), strokeWidth: (0, configuration_1.readConfObject)(config, 'stickWidth', { feature }) }));
|
|
11
8
|
});
|
|
12
9
|
exports.default = Stick;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LollipopRendererF(pluginManager: PluginManager): void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class LollipopPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearLollipopDisplay
|
|
4
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
5
2
|
export declare function configSchemaFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
/**
|
|
7
|
-
* #slot
|
|
8
|
-
*/
|
|
9
3
|
renderer: import("mobx-state-tree").IAnyModelType;
|
|
10
4
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
11
5
|
maxFeatureScreenDensity: {
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
/**
|
|
4
|
-
* #config LinearLollipopDisplay
|
|
5
|
-
*/
|
|
6
3
|
export function configSchemaFactory(pluginManager) {
|
|
7
4
|
return ConfigurationSchema('LinearLollipopDisplay', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
5
|
renderer: pluginManager.pluggableConfigSchemaType('renderer'),
|
|
12
6
|
}, {
|
|
13
|
-
/**
|
|
14
|
-
* #baseConfiguration
|
|
15
|
-
*/
|
|
16
7
|
baseConfiguration: baseLinearDisplayConfigSchema,
|
|
17
8
|
explicitlyTyped: true,
|
|
18
9
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearLollipopDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DisplayType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
2
|
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
import { stateModelFactory } from './model';
|
|
4
3
|
import { configSchemaFactory } from './configSchema';
|
|
4
|
+
import { stateModelFactory } from './model';
|
|
5
5
|
export default function LinearLollipopDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaFactory(pluginManager);
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* #stateModel LinearLollipopDisplay
|
|
4
|
-
* extends
|
|
5
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
6
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
7
2
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
8
|
-
id: import("mobx-state-tree"
|
|
9
|
-
|
|
10
|
-
*/).IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
11
|
-
type: import("mobx-state-tree" /**
|
|
12
|
-
* #getter
|
|
13
|
-
*/).ISimpleType<string>;
|
|
3
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
4
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
14
5
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
15
6
|
} & {
|
|
16
7
|
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
@@ -20,21 +11,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
20
11
|
} & {
|
|
21
12
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
22
13
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
23
|
-
region: import("mobx-state-tree").
|
|
24
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
25
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
26
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
27
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
28
|
-
} & {
|
|
29
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
30
|
-
}, {
|
|
31
|
-
setRefName(newRefName: string): void;
|
|
32
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
14
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
33
15
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
34
16
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
17
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
36
18
|
}, {
|
|
37
|
-
|
|
19
|
+
stopToken: string | undefined;
|
|
38
20
|
filled: boolean;
|
|
39
21
|
reactElement: React.ReactElement | undefined;
|
|
40
22
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -52,21 +34,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
52
34
|
status?: string;
|
|
53
35
|
reactElement?: React.ReactElement;
|
|
54
36
|
};
|
|
55
|
-
}) =>
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
56
38
|
renderProps: any;
|
|
57
39
|
} & {
|
|
58
40
|
doReload(): void;
|
|
59
41
|
afterAttach(): void;
|
|
60
42
|
setStatus(message: string): void;
|
|
61
|
-
setLoading(
|
|
43
|
+
setLoading(newStopToken: string): void;
|
|
62
44
|
setMessage(messageText: string): void;
|
|
63
|
-
setRendered(props:
|
|
64
|
-
reactElement: React.ReactElement;
|
|
65
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
66
|
-
layout: any;
|
|
67
|
-
maxHeightReached: boolean;
|
|
68
|
-
renderProps: any;
|
|
69
|
-
} | undefined): void;
|
|
45
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/dist/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
70
46
|
setError(error: unknown): void;
|
|
71
47
|
reload(): void;
|
|
72
48
|
beforeDestroy(): void;
|
|
@@ -100,13 +76,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
100
76
|
};
|
|
101
77
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
102
78
|
} & {
|
|
103
|
-
/**
|
|
104
|
-
* #property
|
|
105
|
-
*/
|
|
106
79
|
type: import("mobx-state-tree").ISimpleType<"LinearLollipopDisplay">;
|
|
107
|
-
/**
|
|
108
|
-
* #property
|
|
109
|
-
*/
|
|
110
80
|
configuration: AnyConfigurationSchemaType;
|
|
111
81
|
}, {
|
|
112
82
|
rendererTypeName: string;
|
|
@@ -197,14 +167,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
197
167
|
readonly regionTooLarge: boolean;
|
|
198
168
|
readonly regionTooLargeReason: string;
|
|
199
169
|
} & {
|
|
170
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
200
171
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
201
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region):
|
|
172
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
202
173
|
} & {
|
|
203
174
|
featureIdUnderMouse: undefined | string;
|
|
204
175
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
205
176
|
} & {
|
|
206
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
207
|
-
readonly blockType: "
|
|
177
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
178
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
208
179
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
209
180
|
} & {
|
|
210
181
|
readonly renderDelay: number;
|
|
@@ -231,24 +202,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
231
202
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
232
203
|
renderProps(): any;
|
|
233
204
|
} & {
|
|
234
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<
|
|
205
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
235
206
|
afterAttach(): void;
|
|
236
207
|
} & {
|
|
237
|
-
/**
|
|
238
|
-
* #getter
|
|
239
|
-
*/
|
|
240
208
|
readonly blockType: string;
|
|
241
|
-
/**
|
|
242
|
-
* #getter
|
|
243
|
-
*/
|
|
244
209
|
readonly renderDelay: number;
|
|
245
|
-
/**
|
|
246
|
-
* #method
|
|
247
|
-
*/
|
|
248
210
|
renderProps(): any;
|
|
249
|
-
/**
|
|
250
|
-
* #getter
|
|
251
|
-
*/
|
|
252
211
|
readonly rendererTypeName: any;
|
|
253
212
|
}, {
|
|
254
213
|
type: string;
|
|
@@ -264,21 +223,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
264
223
|
} & {
|
|
265
224
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
266
225
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
267
|
-
region: import("mobx-state-tree").
|
|
268
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
269
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
270
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
271
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
272
|
-
} & {
|
|
273
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
274
|
-
}, {
|
|
275
|
-
setRefName(newRefName: string): void;
|
|
276
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
226
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
277
227
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
278
228
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
279
229
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
280
230
|
}, {
|
|
281
|
-
|
|
231
|
+
stopToken: string | undefined;
|
|
282
232
|
filled: boolean;
|
|
283
233
|
reactElement: React.ReactElement | undefined;
|
|
284
234
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -296,21 +246,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
296
246
|
status?: string;
|
|
297
247
|
reactElement?: React.ReactElement;
|
|
298
248
|
};
|
|
299
|
-
}) =>
|
|
249
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
300
250
|
renderProps: any;
|
|
301
251
|
} & {
|
|
302
252
|
doReload(): void;
|
|
303
253
|
afterAttach(): void;
|
|
304
254
|
setStatus(message: string): void;
|
|
305
|
-
setLoading(
|
|
255
|
+
setLoading(newStopToken: string): void;
|
|
306
256
|
setMessage(messageText: string): void;
|
|
307
|
-
setRendered(props:
|
|
308
|
-
reactElement: React.ReactElement;
|
|
309
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
310
|
-
layout: any;
|
|
311
|
-
maxHeightReached: boolean;
|
|
312
|
-
renderProps: any;
|
|
313
|
-
} | undefined): void;
|
|
257
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/dist/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
314
258
|
setError(error: unknown): void;
|
|
315
259
|
reload(): void;
|
|
316
260
|
beforeDestroy(): void;
|
|
@@ -347,8 +291,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
347
291
|
type: string;
|
|
348
292
|
id: string;
|
|
349
293
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
350
|
-
heightPreConfig: number | undefined;
|
|
351
294
|
rpcDriverName: string | undefined;
|
|
295
|
+
heightPreConfig: number | undefined;
|
|
352
296
|
userBpPerPxLimit: number | undefined;
|
|
353
297
|
userByteSizeLimit: number | undefined;
|
|
354
298
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,41 +1,21 @@
|
|
|
1
|
-
import { ConfigurationReference
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
1
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
3
2
|
import { BaseLinearDisplay } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
-
|
|
5
|
-
* #stateModel LinearLollipopDisplay
|
|
6
|
-
* extends
|
|
7
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
8
|
-
*/
|
|
3
|
+
import { types } from 'mobx-state-tree';
|
|
9
4
|
export function stateModelFactory(configSchema) {
|
|
10
5
|
return types
|
|
11
6
|
.compose('LinearLollipopDisplay', BaseLinearDisplay, types.model({
|
|
12
|
-
/**
|
|
13
|
-
* #property
|
|
14
|
-
*/
|
|
15
7
|
type: types.literal('LinearLollipopDisplay'),
|
|
16
|
-
/**
|
|
17
|
-
* #property
|
|
18
|
-
*/
|
|
19
8
|
configuration: ConfigurationReference(configSchema),
|
|
20
9
|
}))
|
|
21
10
|
.views(self => {
|
|
22
11
|
const { renderProps: superRenderProps } = self;
|
|
23
12
|
return {
|
|
24
|
-
/**
|
|
25
|
-
* #getter
|
|
26
|
-
*/
|
|
27
13
|
get blockType() {
|
|
28
14
|
return 'dynamicBlocks';
|
|
29
15
|
},
|
|
30
|
-
/**
|
|
31
|
-
* #getter
|
|
32
|
-
*/
|
|
33
16
|
get renderDelay() {
|
|
34
17
|
return 500;
|
|
35
18
|
},
|
|
36
|
-
/**
|
|
37
|
-
* #method
|
|
38
|
-
*/
|
|
39
19
|
renderProps() {
|
|
40
20
|
return {
|
|
41
21
|
...superRenderProps(),
|
|
@@ -43,9 +23,6 @@ export function stateModelFactory(configSchema) {
|
|
|
43
23
|
config: self.configuration.renderer,
|
|
44
24
|
};
|
|
45
25
|
},
|
|
46
|
-
/**
|
|
47
|
-
* #getter
|
|
48
|
-
*/
|
|
49
26
|
get rendererTypeName() {
|
|
50
27
|
return self.configuration.renderer.type;
|
|
51
28
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
2
|
interface LayoutItem {
|
|
3
3
|
uniqueId: string;
|
|
4
4
|
anchorLocation: number;
|
|
@@ -25,9 +25,6 @@ export declare class FloatingLayout {
|
|
|
25
25
|
add(uniqueId: string, anchorLocation: number, width: number, height: number, data: {
|
|
26
26
|
score: number;
|
|
27
27
|
}): void;
|
|
28
|
-
/**
|
|
29
|
-
* @returns Map of `uniqueId => {x,y,anchorLocation,width,height,data}`
|
|
30
|
-
*/
|
|
31
28
|
getLayout(configuration?: AnyConfigurationModel): LayoutMap;
|
|
32
29
|
getTotalHeight(): number;
|
|
33
30
|
serializeRegion(): {
|
|
@@ -15,9 +15,6 @@ export class FloatingLayout {
|
|
|
15
15
|
this.items.push({ uniqueId, anchorLocation, width, height, data });
|
|
16
16
|
this.layoutDirty = true;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* @returns Map of `uniqueId => {x,y,anchorLocation,width,height,data}`
|
|
20
|
-
*/
|
|
21
18
|
getLayout(configuration) {
|
|
22
19
|
if (!this.layoutDirty) {
|
|
23
20
|
return this.layout;
|
|
@@ -26,10 +23,7 @@ export class FloatingLayout {
|
|
|
26
23
|
throw new Error('configuration object required');
|
|
27
24
|
}
|
|
28
25
|
const minY = readConfObject(configuration, 'minStickLength');
|
|
29
|
-
// sort them by score ascending, so higher scores will always end up
|
|
30
|
-
// stacked last (toward the bottom)
|
|
31
26
|
const sorted = this.items.sort((a, b) => a.data.score - b.data.score);
|
|
32
|
-
// bump them
|
|
33
27
|
let maxBottom = 0;
|
|
34
28
|
const layoutEntries = new Array(sorted.length);
|
|
35
29
|
for (let i = 0; i < sorted.length; i += 1) {
|
|
@@ -39,7 +33,6 @@ export class FloatingLayout {
|
|
|
39
33
|
const end = start + width;
|
|
40
34
|
let top = minY;
|
|
41
35
|
let bottom = top + height;
|
|
42
|
-
// figure out how far down to put it
|
|
43
36
|
for (let j = 0; j < i; j += 1) {
|
|
44
37
|
const [, previouslyLaidOutItem] = layoutEntries[j];
|
|
45
38
|
const { x: prevStart, y: prevTop, width: prevWidth, height: prevHeight, } = previouslyLaidOutItem;
|
|
@@ -47,13 +40,11 @@ export class FloatingLayout {
|
|
|
47
40
|
const prevBottom = prevTop + prevHeight;
|
|
48
41
|
if (doesIntersect2(prevStart, prevEnd, start, end) &&
|
|
49
42
|
doesIntersect2(prevTop, prevBottom, top, bottom)) {
|
|
50
|
-
// bump this one to the bottom of the previous one
|
|
51
43
|
top = prevBottom;
|
|
52
44
|
bottom = top + height;
|
|
53
|
-
j = -1;
|
|
45
|
+
j = -1;
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
|
-
// record the entry and update the maxBottom
|
|
57
48
|
layoutEntries[i] = [
|
|
58
49
|
currentItem.uniqueId,
|
|
59
50
|
{ ...currentItem, x: start, y: top },
|
|
@@ -62,8 +53,6 @@ export class FloatingLayout {
|
|
|
62
53
|
maxBottom = bottom;
|
|
63
54
|
}
|
|
64
55
|
}
|
|
65
|
-
// try to tile them left to right all at the same level
|
|
66
|
-
// if they don't fit, try to alternate them on 2 levels, then 3
|
|
67
56
|
this.totalHeight = maxBottom;
|
|
68
57
|
this.layout = new Map(layoutEntries);
|
|
69
58
|
this.layoutDirty = false;
|
|
@@ -8,8 +8,8 @@ class FloatingLayoutSession extends LayoutSession {
|
|
|
8
8
|
const widthPx = (end - start) / this.bpPerPx;
|
|
9
9
|
return new MultiLayout(FloatingLayout, { width: widthPx });
|
|
10
10
|
}
|
|
11
|
-
layoutIsValid(
|
|
12
|
-
return false;
|
|
11
|
+
layoutIsValid() {
|
|
12
|
+
return false;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export default class LollipopRenderer extends BoxRendererType {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import ScoreText from './ScoreText';
|
|
@@ -48,10 +48,6 @@ const Lollipop = observer(function Lollipop(props) {
|
|
|
48
48
|
fill: readConfObject(config, 'innerColor', { feature }),
|
|
49
49
|
};
|
|
50
50
|
const strokeWidth = readConfObject(config, 'strokeWidth', { feature });
|
|
51
|
-
return (
|
|
52
|
-
React.createElement("title", null, readConfObject(config, 'caption', { feature })),
|
|
53
|
-
React.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }),
|
|
54
|
-
radiusPx - strokeWidth <= 2 ? null : (React.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })),
|
|
55
|
-
React.createElement(ScoreText, { feature: feature, config: config, layoutRecord: layoutRecord })));
|
|
51
|
+
return (_jsxs("g", { "data-testid": feature.id(), children: [_jsx("title", { children: readConfObject(config, 'caption', { feature }) }), _jsx("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }), radiusPx - strokeWidth <= 2 ? null : (_jsx("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })), _jsx(ScoreText, { feature: feature, config: config, layoutRecord: layoutRecord })] }));
|
|
56
52
|
});
|
|
57
53
|
export default Lollipop;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
4
|
import { bpToPx } from '@jbrowse/core/util';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
// locals
|
|
6
6
|
import Lollipop from './Lollipop';
|
|
7
7
|
import Stick from './Stick';
|
|
8
8
|
function layoutFeat(args) {
|
|
@@ -64,11 +64,9 @@ const LollipopRendering = observer(function (props) {
|
|
|
64
64
|
const width = (region.end - region.start) / bpPerPx;
|
|
65
65
|
const records = [...layout.getLayout(config).values()];
|
|
66
66
|
const height = layout.getTotalHeight();
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
React.createElement(Lollipop, { key: `body-${feature.id()}`, ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId })));
|
|
72
|
-
})));
|
|
67
|
+
return (_jsx("svg", { width: width, height: height, style: { position: 'relative' }, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onFocus: onMouseEnter, onBlur: onMouseLeave, onClick: onClick, children: records.map(layoutRecord => {
|
|
68
|
+
const feature = features.get(layoutRecord.data.featureId);
|
|
69
|
+
return (_jsxs(Fragment, { children: [_jsx(Stick, { ...props, config: config, layoutRecord: layoutRecord, feature: feature }, `stick-${feature.id()}`), _jsx(Lollipop, { ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId }, `body-${feature.id()}`)] }, feature.id()));
|
|
70
|
+
}) }));
|
|
73
71
|
});
|
|
74
72
|
export default LollipopRendering;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Feature } from '@jbrowse/core/util';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
export default function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }: {
|
|
5
4
|
feature: Feature;
|
|
6
5
|
config: AnyConfigurationModel;
|
|
@@ -12,4 +11,4 @@ export default function ScoreText({ feature, config, layoutRecord: { y, data: {
|
|
|
12
11
|
score: number;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
}):
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { readConfObject
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { contrastingTextColor } from '@jbrowse/core/util/color';
|
|
4
4
|
export default function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }) {
|
|
5
5
|
const innerColor = readConfObject(config, 'innerColor', { feature });
|
|
@@ -9,5 +9,5 @@ export default function ScoreText({ feature, config, layoutRecord: { y, data: {
|
|
|
9
9
|
if (fontHeight < 12) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return (
|
|
12
|
+
return (_jsx("text", { style: { fontSize: fontHeight, fill: contrastingTextColor(innerColor) }, x: anchorX, y: y + radiusPx - fontHeight / 2.4, textAnchor: "middle", dominantBaseline: "hanging", children: scoreString }));
|
|
13
13
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Feature } from '@jbrowse/core/util';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }: {
|
|
5
4
|
feature: Feature;
|
|
6
5
|
config: AnyConfigurationModel;
|
|
@@ -11,5 +10,5 @@ declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data
|
|
|
11
10
|
radiusPx: number;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
|
-
}) =>
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default Stick;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { readConfObject
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
const Stick = observer(function Stick({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }) {
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx("line", { x1: anchorLocation, y1: 0, x2: anchorLocation, y2: y + 2 * radiusPx, stroke: readConfObject(config, 'stickColor', { feature }), strokeWidth: readConfObject(config, 'stickWidth', { feature }) }));
|
|
6
6
|
});
|
|
7
7
|
export default Stick;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LollipopRendererF(pluginManager: PluginManager): void;
|
package/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class LollipopPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-lollipop",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "JBrowse 2 plugin for lollipops",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "2c6897f1fa732b1db5b094d1dca197e333e95319"
|
|
54
54
|
}
|