@genome-spy/core 0.74.0 → 0.75.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/bundle/index.es.js +4660 -4468
- package/dist/bundle/index.js +81 -81
- package/dist/schema.json +220 -12
- package/dist/src/data/sources/dataUtils.d.ts +25 -0
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +23 -0
- package/dist/src/data/sources/inlineSource.js +2 -2
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +8 -3
- package/dist/src/encoder/encoder.d.ts +2 -2
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +8 -3
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +91 -51
- package/dist/src/gl/dataToVertices.d.ts +12 -14
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +116 -95
- package/dist/src/gl/glslScaleGenerator.d.ts +3 -0
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +10 -8
- package/dist/src/gl/vertexRangeIndex.d.ts +23 -0
- package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -0
- package/dist/src/gl/vertexRangeIndex.js +150 -0
- package/dist/src/marks/mark.d.ts +1 -1
- package/dist/src/paramRuntime/expressionCompiler.d.ts +2 -1
- package/dist/src/paramRuntime/expressionCompiler.d.ts.map +1 -1
- package/dist/src/paramRuntime/expressionCompiler.js +3 -2
- package/dist/src/paramRuntime/expressionRef.d.ts +4 -1
- package/dist/src/paramRuntime/expressionRef.d.ts.map +1 -1
- package/dist/src/paramRuntime/expressionRef.js +10 -3
- package/dist/src/paramRuntime/graphRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/graphRuntime.js +15 -6
- package/dist/src/paramRuntime/paramRuntime.d.ts +8 -2
- package/dist/src/paramRuntime/paramRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/paramRuntime.js +10 -5
- package/dist/src/paramRuntime/types.d.ts +1 -0
- package/dist/src/paramRuntime/types.d.ts.map +1 -1
- package/dist/src/paramRuntime/types.js +1 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +5 -4
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +17 -6
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +1 -0
- package/dist/src/scales/domainPlanner.d.ts +57 -11
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +182 -83
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +7 -2
- package/dist/src/scales/scalePropsResolver.d.ts +3 -3
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +28 -5
- package/dist/src/scales/scaleResolution.d.ts +12 -1
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +171 -18
- package/dist/src/screenshotExport.d.ts +23 -0
- package/dist/src/screenshotExport.d.ts.map +1 -0
- package/dist/src/screenshotExport.js +44 -0
- package/dist/src/screenshotHarness.d.ts.map +1 -1
- package/dist/src/screenshotHarness.js +26 -24
- package/dist/src/spec/axis.d.ts +2 -2
- package/dist/src/spec/channel.d.ts +4 -4
- package/dist/src/spec/data.d.ts +12 -0
- package/dist/src/spec/scale.d.ts +13 -1
- package/dist/src/utils/expression.d.ts +16 -8
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +291 -11
- package/dist/src/view/flowBuilder.d.ts +1 -1
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +11 -7
- package/dist/src/view/resolutionPlanner.d.ts +9 -0
- package/dist/src/view/resolutionPlanner.d.ts.map +1 -0
- package/dist/src/view/resolutionPlanner.js +302 -0
- package/dist/src/view/unitView.d.ts +1 -1
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +5 -152
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +2 -1
- package/package.json +2 -2
package/dist/schema.json
CHANGED
|
@@ -267,8 +267,11 @@
|
|
|
267
267
|
"type": "boolean"
|
|
268
268
|
},
|
|
269
269
|
"title": {
|
|
270
|
-
"description": "A title for the axis (none by default).",
|
|
271
|
-
"type":
|
|
270
|
+
"description": "A title for the axis (none by default). Set to `null` to remove it.",
|
|
271
|
+
"type": [
|
|
272
|
+
"string",
|
|
273
|
+
"null"
|
|
274
|
+
]
|
|
272
275
|
},
|
|
273
276
|
"titleColor": {
|
|
274
277
|
"description": "Color of the title, can be in hex color code or regular color name.",
|
|
@@ -600,8 +603,11 @@
|
|
|
600
603
|
"type": "boolean"
|
|
601
604
|
},
|
|
602
605
|
"title": {
|
|
603
|
-
"description": "A title for the axis (none by default).",
|
|
604
|
-
"type":
|
|
606
|
+
"description": "A title for the axis (none by default). Set to `null` to remove it.",
|
|
607
|
+
"type": [
|
|
608
|
+
"string",
|
|
609
|
+
"null"
|
|
610
|
+
]
|
|
605
611
|
},
|
|
606
612
|
"titleColor": {
|
|
607
613
|
"description": "Color of the title, can be in hex color code or regular color name.",
|
|
@@ -4689,6 +4695,13 @@
|
|
|
4689
4695
|
"CsvDataFormat": {
|
|
4690
4696
|
"additionalProperties": false,
|
|
4691
4697
|
"properties": {
|
|
4698
|
+
"columns": {
|
|
4699
|
+
"description": "Optional ordered list of field names for headerless CSV or TSV input. When provided, the first row is interpreted as data rather than a header row.",
|
|
4700
|
+
"items": {
|
|
4701
|
+
"type": "string"
|
|
4702
|
+
},
|
|
4703
|
+
"type": "array"
|
|
4704
|
+
},
|
|
4692
4705
|
"parse": {
|
|
4693
4706
|
"anyOf": [
|
|
4694
4707
|
{
|
|
@@ -4776,6 +4789,13 @@
|
|
|
4776
4789
|
"DsvDataFormat": {
|
|
4777
4790
|
"additionalProperties": false,
|
|
4778
4791
|
"properties": {
|
|
4792
|
+
"columns": {
|
|
4793
|
+
"description": "Optional ordered list of field names for headerless delimiter-separated input. When provided, the first row is interpreted as data rather than a header row.",
|
|
4794
|
+
"items": {
|
|
4795
|
+
"type": "string"
|
|
4796
|
+
},
|
|
4797
|
+
"type": "array"
|
|
4798
|
+
},
|
|
4779
4799
|
"delimiter": {
|
|
4780
4800
|
"description": "The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.",
|
|
4781
4801
|
"maxLength": 1,
|
|
@@ -4874,10 +4894,24 @@
|
|
|
4874
4894
|
"description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)."
|
|
4875
4895
|
},
|
|
4876
4896
|
"dx": {
|
|
4877
|
-
"
|
|
4897
|
+
"anyOf": [
|
|
4898
|
+
{
|
|
4899
|
+
"$ref": "#/definitions/NumericMarkPropDef"
|
|
4900
|
+
},
|
|
4901
|
+
{
|
|
4902
|
+
"$ref": "#/definitions/MarkPropExprDef"
|
|
4903
|
+
}
|
|
4904
|
+
]
|
|
4878
4905
|
},
|
|
4879
4906
|
"dy": {
|
|
4880
|
-
"
|
|
4907
|
+
"anyOf": [
|
|
4908
|
+
{
|
|
4909
|
+
"$ref": "#/definitions/NumericMarkPropDef"
|
|
4910
|
+
},
|
|
4911
|
+
{
|
|
4912
|
+
"$ref": "#/definitions/MarkPropExprDef"
|
|
4913
|
+
}
|
|
4914
|
+
]
|
|
4881
4915
|
},
|
|
4882
4916
|
"facetIndex": {
|
|
4883
4917
|
"$ref": "#/definitions/FieldDefWithoutScale",
|
|
@@ -5247,7 +5281,14 @@
|
|
|
5247
5281
|
"description": "X coordinates of the marks.\n\nThe `value` of this channel can be a number between zero and one."
|
|
5248
5282
|
},
|
|
5249
5283
|
"x2": {
|
|
5250
|
-
"
|
|
5284
|
+
"anyOf": [
|
|
5285
|
+
{
|
|
5286
|
+
"$ref": "#/definitions/Position2Def"
|
|
5287
|
+
},
|
|
5288
|
+
{
|
|
5289
|
+
"type": "null"
|
|
5290
|
+
}
|
|
5291
|
+
],
|
|
5251
5292
|
"description": "X2 coordinates of the marks.\n\nThe `value` of this channel can be a number between zero and one."
|
|
5252
5293
|
},
|
|
5253
5294
|
"y": {
|
|
@@ -5255,7 +5296,14 @@
|
|
|
5255
5296
|
"description": "Y coordinates of the marks.\n\nThe `value` of this channel can be a number between zero and one."
|
|
5256
5297
|
},
|
|
5257
5298
|
"y2": {
|
|
5258
|
-
"
|
|
5299
|
+
"anyOf": [
|
|
5300
|
+
{
|
|
5301
|
+
"$ref": "#/definitions/Position2Def"
|
|
5302
|
+
},
|
|
5303
|
+
{
|
|
5304
|
+
"type": "null"
|
|
5305
|
+
}
|
|
5306
|
+
],
|
|
5259
5307
|
"description": "Y2 coordinates of the marks.\n\nThe `value` of this channel can be a number between zero and one."
|
|
5260
5308
|
}
|
|
5261
5309
|
},
|
|
@@ -6257,8 +6305,11 @@
|
|
|
6257
6305
|
"type": "boolean"
|
|
6258
6306
|
},
|
|
6259
6307
|
"title": {
|
|
6260
|
-
"description": "A title for the axis (none by default).",
|
|
6261
|
-
"type":
|
|
6308
|
+
"description": "A title for the axis (none by default). Set to `null` to remove it.",
|
|
6309
|
+
"type": [
|
|
6310
|
+
"string",
|
|
6311
|
+
"null"
|
|
6312
|
+
]
|
|
6262
6313
|
},
|
|
6263
6314
|
"titleColor": {
|
|
6264
6315
|
"description": "Color of the title, can be in hex color code or regular color name.",
|
|
@@ -8402,6 +8453,55 @@
|
|
|
8402
8453
|
}
|
|
8403
8454
|
]
|
|
8404
8455
|
},
|
|
8456
|
+
"MarkPropExprDef": {
|
|
8457
|
+
"additionalProperties": false,
|
|
8458
|
+
"properties": {
|
|
8459
|
+
"band": {
|
|
8460
|
+
"description": "Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.",
|
|
8461
|
+
"maximum": 1,
|
|
8462
|
+
"minimum": 0,
|
|
8463
|
+
"type": "number"
|
|
8464
|
+
},
|
|
8465
|
+
"domainInert": {
|
|
8466
|
+
"description": "Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level `domainInert` when an entire subtree should be excluded.\n\n**Default value:** `false`",
|
|
8467
|
+
"type": "boolean"
|
|
8468
|
+
},
|
|
8469
|
+
"expr": {
|
|
8470
|
+
"description": "An expression. Properties of the data can be accessed through the `datum` object.",
|
|
8471
|
+
"type": "string"
|
|
8472
|
+
},
|
|
8473
|
+
"resolutionChannel": {
|
|
8474
|
+
"$ref": "#/definitions/ChannelWithScale",
|
|
8475
|
+
"description": "An alternative channel for scale resolution.\n\nThis is mainly for internal use and allows using `color` channel to resolve `fill` and `stroke` channels under certain circumstances."
|
|
8476
|
+
},
|
|
8477
|
+
"scale": {
|
|
8478
|
+
"anyOf": [
|
|
8479
|
+
{
|
|
8480
|
+
"$ref": "#/definitions/Scale"
|
|
8481
|
+
},
|
|
8482
|
+
{
|
|
8483
|
+
"type": "null"
|
|
8484
|
+
}
|
|
8485
|
+
],
|
|
8486
|
+
"description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
|
|
8487
|
+
},
|
|
8488
|
+
"title": {
|
|
8489
|
+
"description": "A title for the field. If `null`, the title will be removed.",
|
|
8490
|
+
"type": [
|
|
8491
|
+
"string",
|
|
8492
|
+
"null"
|
|
8493
|
+
]
|
|
8494
|
+
},
|
|
8495
|
+
"type": {
|
|
8496
|
+
"$ref": "#/definitions/Type"
|
|
8497
|
+
}
|
|
8498
|
+
},
|
|
8499
|
+
"required": [
|
|
8500
|
+
"expr",
|
|
8501
|
+
"type"
|
|
8502
|
+
],
|
|
8503
|
+
"type": "object"
|
|
8504
|
+
},
|
|
8405
8505
|
"MarkProps": {
|
|
8406
8506
|
"anyOf": [
|
|
8407
8507
|
{
|
|
@@ -11449,6 +11549,9 @@
|
|
|
11449
11549
|
},
|
|
11450
11550
|
{
|
|
11451
11551
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
11552
|
+
},
|
|
11553
|
+
{
|
|
11554
|
+
"$ref": "#/definitions/ExprRef"
|
|
11452
11555
|
}
|
|
11453
11556
|
],
|
|
11454
11557
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -11465,6 +11568,18 @@
|
|
|
11465
11568
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
11466
11569
|
"type": "number"
|
|
11467
11570
|
},
|
|
11571
|
+
"domainTransition": {
|
|
11572
|
+
"anyOf": [
|
|
11573
|
+
{
|
|
11574
|
+
"type": "boolean"
|
|
11575
|
+
},
|
|
11576
|
+
{
|
|
11577
|
+
"additionalProperties": {},
|
|
11578
|
+
"type": "object"
|
|
11579
|
+
}
|
|
11580
|
+
],
|
|
11581
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
11582
|
+
},
|
|
11468
11583
|
"exponent": {
|
|
11469
11584
|
"description": "The exponent of the `pow` scale.",
|
|
11470
11585
|
"type": "number"
|
|
@@ -11646,6 +11761,9 @@
|
|
|
11646
11761
|
},
|
|
11647
11762
|
{
|
|
11648
11763
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
11764
|
+
},
|
|
11765
|
+
{
|
|
11766
|
+
"$ref": "#/definitions/ExprRef"
|
|
11649
11767
|
}
|
|
11650
11768
|
],
|
|
11651
11769
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -11662,6 +11780,18 @@
|
|
|
11662
11780
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
11663
11781
|
"type": "number"
|
|
11664
11782
|
},
|
|
11783
|
+
"domainTransition": {
|
|
11784
|
+
"anyOf": [
|
|
11785
|
+
{
|
|
11786
|
+
"type": "boolean"
|
|
11787
|
+
},
|
|
11788
|
+
{
|
|
11789
|
+
"additionalProperties": {},
|
|
11790
|
+
"type": "object"
|
|
11791
|
+
}
|
|
11792
|
+
],
|
|
11793
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
11794
|
+
},
|
|
11665
11795
|
"exponent": {
|
|
11666
11796
|
"description": "The exponent of the `pow` scale.",
|
|
11667
11797
|
"type": "number"
|
|
@@ -11714,6 +11844,9 @@
|
|
|
11714
11844
|
},
|
|
11715
11845
|
{
|
|
11716
11846
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
11847
|
+
},
|
|
11848
|
+
{
|
|
11849
|
+
"$ref": "#/definitions/ExprRef"
|
|
11717
11850
|
}
|
|
11718
11851
|
],
|
|
11719
11852
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -11730,6 +11863,18 @@
|
|
|
11730
11863
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
11731
11864
|
"type": "number"
|
|
11732
11865
|
},
|
|
11866
|
+
"domainTransition": {
|
|
11867
|
+
"anyOf": [
|
|
11868
|
+
{
|
|
11869
|
+
"type": "boolean"
|
|
11870
|
+
},
|
|
11871
|
+
{
|
|
11872
|
+
"additionalProperties": {},
|
|
11873
|
+
"type": "object"
|
|
11874
|
+
}
|
|
11875
|
+
],
|
|
11876
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
11877
|
+
},
|
|
11733
11878
|
"exponent": {
|
|
11734
11879
|
"description": "The exponent of the `pow` scale.",
|
|
11735
11880
|
"type": "number"
|
|
@@ -11923,6 +12068,9 @@
|
|
|
11923
12068
|
},
|
|
11924
12069
|
{
|
|
11925
12070
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
12071
|
+
},
|
|
12072
|
+
{
|
|
12073
|
+
"$ref": "#/definitions/ExprRef"
|
|
11926
12074
|
}
|
|
11927
12075
|
],
|
|
11928
12076
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -11939,6 +12087,18 @@
|
|
|
11939
12087
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
11940
12088
|
"type": "number"
|
|
11941
12089
|
},
|
|
12090
|
+
"domainTransition": {
|
|
12091
|
+
"anyOf": [
|
|
12092
|
+
{
|
|
12093
|
+
"type": "boolean"
|
|
12094
|
+
},
|
|
12095
|
+
{
|
|
12096
|
+
"additionalProperties": {},
|
|
12097
|
+
"type": "object"
|
|
12098
|
+
}
|
|
12099
|
+
],
|
|
12100
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
12101
|
+
},
|
|
11942
12102
|
"exponent": {
|
|
11943
12103
|
"description": "The exponent of the `pow` scale.",
|
|
11944
12104
|
"type": "number"
|
|
@@ -12152,6 +12312,9 @@
|
|
|
12152
12312
|
},
|
|
12153
12313
|
{
|
|
12154
12314
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
12315
|
+
},
|
|
12316
|
+
{
|
|
12317
|
+
"$ref": "#/definitions/ExprRef"
|
|
12155
12318
|
}
|
|
12156
12319
|
],
|
|
12157
12320
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -12168,6 +12331,18 @@
|
|
|
12168
12331
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
12169
12332
|
"type": "number"
|
|
12170
12333
|
},
|
|
12334
|
+
"domainTransition": {
|
|
12335
|
+
"anyOf": [
|
|
12336
|
+
{
|
|
12337
|
+
"type": "boolean"
|
|
12338
|
+
},
|
|
12339
|
+
{
|
|
12340
|
+
"additionalProperties": {},
|
|
12341
|
+
"type": "object"
|
|
12342
|
+
}
|
|
12343
|
+
],
|
|
12344
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
12345
|
+
},
|
|
12171
12346
|
"exponent": {
|
|
12172
12347
|
"description": "The exponent of the `pow` scale.",
|
|
12173
12348
|
"type": "number"
|
|
@@ -12358,6 +12533,9 @@
|
|
|
12358
12533
|
},
|
|
12359
12534
|
{
|
|
12360
12535
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
12536
|
+
},
|
|
12537
|
+
{
|
|
12538
|
+
"$ref": "#/definitions/ExprRef"
|
|
12361
12539
|
}
|
|
12362
12540
|
],
|
|
12363
12541
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -12374,6 +12552,18 @@
|
|
|
12374
12552
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
12375
12553
|
"type": "number"
|
|
12376
12554
|
},
|
|
12555
|
+
"domainTransition": {
|
|
12556
|
+
"anyOf": [
|
|
12557
|
+
{
|
|
12558
|
+
"type": "boolean"
|
|
12559
|
+
},
|
|
12560
|
+
{
|
|
12561
|
+
"additionalProperties": {},
|
|
12562
|
+
"type": "object"
|
|
12563
|
+
}
|
|
12564
|
+
],
|
|
12565
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
12566
|
+
},
|
|
12377
12567
|
"exponent": {
|
|
12378
12568
|
"description": "The exponent of the `pow` scale.",
|
|
12379
12569
|
"type": "number"
|
|
@@ -12577,6 +12767,9 @@
|
|
|
12577
12767
|
},
|
|
12578
12768
|
{
|
|
12579
12769
|
"$ref": "#/definitions/SelectionDomainRef"
|
|
12770
|
+
},
|
|
12771
|
+
{
|
|
12772
|
+
"$ref": "#/definitions/ExprRef"
|
|
12580
12773
|
}
|
|
12581
12774
|
],
|
|
12582
12775
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -12593,6 +12786,18 @@
|
|
|
12593
12786
|
"description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.",
|
|
12594
12787
|
"type": "number"
|
|
12595
12788
|
},
|
|
12789
|
+
"domainTransition": {
|
|
12790
|
+
"anyOf": [
|
|
12791
|
+
{
|
|
12792
|
+
"type": "boolean"
|
|
12793
|
+
},
|
|
12794
|
+
{
|
|
12795
|
+
"additionalProperties": {},
|
|
12796
|
+
"type": "object"
|
|
12797
|
+
}
|
|
12798
|
+
],
|
|
12799
|
+
"description": "Controls whether domain updates are applied immediately or with a smooth transition.\n\nSet this to `false` to apply domain updates immediately. The default is `true`, except for domains defined by an `ExprRef`, which default to `false` unless overridden.\n\n__Default value:__ `true`, except `false` for ExprRef-driven domains."
|
|
12800
|
+
},
|
|
12596
12801
|
"exponent": {
|
|
12597
12802
|
"description": "The exponent of the `pow` scale.",
|
|
12598
12803
|
"type": "number"
|
|
@@ -14714,8 +14919,11 @@
|
|
|
14714
14919
|
"type": "boolean"
|
|
14715
14920
|
},
|
|
14716
14921
|
"title": {
|
|
14717
|
-
"description": "A title for the axis (none by default).",
|
|
14718
|
-
"type":
|
|
14922
|
+
"description": "A title for the axis (none by default). Set to `null` to remove it.",
|
|
14923
|
+
"type": [
|
|
14924
|
+
"string",
|
|
14925
|
+
"null"
|
|
14926
|
+
]
|
|
14719
14927
|
},
|
|
14720
14928
|
"titleColor": {
|
|
14721
14929
|
"description": "Color of the title, can be in hex color code or regular color name.",
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export function getFormat(params: import("../../spec/data.js").DataSource, urls?: string | string[]): {
|
|
10
10
|
type?: "csv" | "tsv";
|
|
11
|
+
columns?: string[];
|
|
11
12
|
parse?: import("../../spec/data.js").Parse | null;
|
|
12
13
|
} | {
|
|
13
14
|
type?: "dsv";
|
|
14
15
|
delimiter: string;
|
|
16
|
+
columns?: string[];
|
|
15
17
|
parse?: import("../../spec/data.js").Parse | null;
|
|
16
18
|
} | {
|
|
17
19
|
type?: "json";
|
|
@@ -28,6 +30,29 @@ export function getFormat(params: import("../../spec/data.js").DataSource, urls?
|
|
|
28
30
|
type: string;
|
|
29
31
|
parse?: import("../../spec/data.js").Parse | null;
|
|
30
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Vega's DSV readers support synthetic header rows via `format.header`.
|
|
35
|
+
* GenomeSpy exposes the user-facing option as `format.columns`.
|
|
36
|
+
*
|
|
37
|
+
* @param {import("../../spec/data.js").DataFormat} format
|
|
38
|
+
*/
|
|
39
|
+
export function toVegaLoaderFormat(format: import("../../spec/data.js").DataFormat): {
|
|
40
|
+
type?: "csv" | "tsv";
|
|
41
|
+
columns?: string[];
|
|
42
|
+
parse?: import("../../spec/data.js").Parse | null;
|
|
43
|
+
} | {
|
|
44
|
+
type?: "dsv";
|
|
45
|
+
delimiter: string;
|
|
46
|
+
columns?: string[];
|
|
47
|
+
parse?: import("../../spec/data.js").Parse | null;
|
|
48
|
+
} | {
|
|
49
|
+
type?: "json";
|
|
50
|
+
property?: string;
|
|
51
|
+
parse?: import("../../spec/data.js").Parse | null;
|
|
52
|
+
} | {
|
|
53
|
+
type: string;
|
|
54
|
+
parse?: import("../../spec/data.js").Parse | null;
|
|
55
|
+
};
|
|
31
56
|
/**
|
|
32
57
|
* @param {string} type
|
|
33
58
|
* @returns {string}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataUtils.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/dataUtils.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,kCAJW,OAAO,oBAAoB,EAAE,UAAU,SAEvC,MAAM,GAAG,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"dataUtils.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/dataUtils.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,kCAJW,OAAO,oBAAoB,EAAE,UAAU,SAEvC,MAAM,GAAG,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;EAsB3B;AAED;;;;;GAKG;AACH,2CAFW,OAAO,oBAAoB,EAAE,UAAU;;;;;;;;;;;;;;;;EAiBjD;AAED;;;GAGG;AACH,mCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;GAEG;AACH,wCAFW,MAAM,GAAG,MAAM,EAAE,UA2B3B;AAED;;GAEG;AACH,sCAFW,MAAM,WAWhB;AAkBD;;;GAGG;AACH,4CAHW,OAAO,oBAAoB,EAAE,UAAU,GACtC,UAAU,IAAI,OAAO,oBAAoB,EAAE,aAAa,CAInE;AAED;;;GAGG;AACH,4CAHW,OAAO,oBAAoB,EAAE,UAAU,GACtC,UAAU,IAAI,OAAO,oBAAoB,EAAE,aAAa,CAInE;AAED;;;GAGG;AACH,6CAHW,OAAO,oBAAoB,EAAE,UAAU,GACtC,UAAU,IAAI,OAAO,oBAAoB,EAAE,cAAc,CAIpE;AAED;;;;GAIG;AACH,sCAHW,OAAO,oBAAoB,EAAE,UAAU,GACtC,UAAU,IAAI,OAAO,oBAAoB,EAAE,OAAO,CAI7D;AAED;;GAEG;AACH,wCAFW,MAAM,GAAG,SAAS,WAI5B;AA/CM,+BAAgC,GAAG,QAI3B,OAAO,uBAAuB,EAAE,MAAM;;UAGtB,OAAO,gBAAgB,EAAE,KAAK,qCANR"}
|
|
@@ -34,6 +34,29 @@ export function getFormat(params, urls = []) {
|
|
|
34
34
|
return format;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Vega's DSV readers support synthetic header rows via `format.header`.
|
|
39
|
+
* GenomeSpy exposes the user-facing option as `format.columns`.
|
|
40
|
+
*
|
|
41
|
+
* @param {import("../../spec/data.js").DataFormat} format
|
|
42
|
+
*/
|
|
43
|
+
export function toVegaLoaderFormat(format) {
|
|
44
|
+
const readFormat = { ...format };
|
|
45
|
+
|
|
46
|
+
if (
|
|
47
|
+
(isCsvDataFormat(readFormat) || isDsvDataFormat(readFormat)) &&
|
|
48
|
+
readFormat.columns &&
|
|
49
|
+
!("header" in readFormat)
|
|
50
|
+
) {
|
|
51
|
+
// @ts-ignore Vega loader supports `header`, but the public data format
|
|
52
|
+
// type intentionally exposes the GenomeSpy-level `columns` property
|
|
53
|
+
// instead.
|
|
54
|
+
readFormat.header = readFormat.columns;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return readFormat;
|
|
58
|
+
}
|
|
59
|
+
|
|
37
60
|
/**
|
|
38
61
|
* @param {string} type
|
|
39
62
|
* @returns {string}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { read } from "vega-loader";
|
|
2
|
-
import { getFormat, makeWrapper } from "./dataUtils.js";
|
|
2
|
+
import { getFormat, makeWrapper, toVegaLoaderFormat } from "./dataUtils.js";
|
|
3
3
|
import DataSource from "./dataSource.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -79,7 +79,7 @@ export default class InlineSource extends DataSource {
|
|
|
79
79
|
data = [values];
|
|
80
80
|
} else if (typeof values == "string") {
|
|
81
81
|
// It's a string that needs to be parsed
|
|
82
|
-
data = read(values, getFormat(this.params));
|
|
82
|
+
data = read(values, toVegaLoaderFormat(getFormat(this.params)));
|
|
83
83
|
} else {
|
|
84
84
|
throw new Error(
|
|
85
85
|
'"values" in data configuration is not an array, object, or a string!'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"AAuJA;;;GAGG;AACH,gCAHW,OAAO,CAAC,OAAO,oBAAoB,EAAE,IAAI,CAAC,GACxC,IAAI,IAAI,OAAO,oBAAoB,EAAE,OAAO,CAIxD;AA5ID;;;GAGG;AACH;IACI;;;OAGG;IACH,oBAHW,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,oBAAoB,EAAE,OAAO,EAc9C;IATG,6CAMC;IAED,gBAAiC;;CAgHxC;uBA9IsB,iBAAiB"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { read } from "vega-loader";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
getFormat,
|
|
4
|
+
hasGzipExtension,
|
|
5
|
+
responseType,
|
|
6
|
+
toVegaLoaderFormat,
|
|
7
|
+
} from "./dataUtils.js";
|
|
3
8
|
import DataSource from "./dataSource.js";
|
|
4
9
|
import {
|
|
5
10
|
activateExprRefProps,
|
|
@@ -63,7 +68,7 @@ export default class UrlSource extends DataSource {
|
|
|
63
68
|
);
|
|
64
69
|
|
|
65
70
|
const files = /** @type {string[] | {url: string}[]} */ (
|
|
66
|
-
read(content, format)
|
|
71
|
+
read(content, toVegaLoaderFormat(format))
|
|
67
72
|
)
|
|
68
73
|
.map((u) => (typeof u === "string" ? u : u.url))
|
|
69
74
|
.map((u) => concatUrl(listUrl, u));
|
|
@@ -114,7 +119,7 @@ export default class UrlSource extends DataSource {
|
|
|
114
119
|
const readAndParse = async (content, url) => {
|
|
115
120
|
try {
|
|
116
121
|
/** @type {any[] | Promise<any[]>} */
|
|
117
|
-
const dataOrPromise = read(content, format);
|
|
122
|
+
const dataOrPromise = read(content, toVegaLoaderFormat(format));
|
|
118
123
|
const data =
|
|
119
124
|
dataOrPromise instanceof Promise
|
|
120
125
|
? await dataOrPromise
|
|
@@ -97,12 +97,12 @@ export function isChannelDefWithScale(channelDef: import("../spec/channel.js").C
|
|
|
97
97
|
/**
|
|
98
98
|
* @param {import("../spec/channel.js").ChannelDef} channelDef
|
|
99
99
|
*/
|
|
100
|
-
export function findChannelDefWithScale(channelDef: import("../spec/channel.js").ChannelDef): import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, number> | import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, string> | import("../spec/channel.js").PositionFieldDef | import("../spec/channel.js").ChromPosDef | import("../spec/channel.js").PositionDatumDef | import("../spec/channel.js").
|
|
100
|
+
export function findChannelDefWithScale(channelDef: import("../spec/channel.js").ChannelDef): import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, number> | import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, string> | import("../spec/channel.js").PositionFieldDef | import("../spec/channel.js").ChromPosDef | import("../spec/channel.js").PositionDatumDef | import("../spec/channel.js").MarkPropExprDef<import("../spec/channel.js").Type> | import("../spec/channel.js").Conditional<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>>;
|
|
101
101
|
/**
|
|
102
102
|
* @param {import("../view/unitView.js").default} view
|
|
103
103
|
* @param {import("../spec/channel.js").Channel} channel
|
|
104
104
|
*/
|
|
105
|
-
export function getChannelDefWithScale(view: import("../view/unitView.js").default, channel: import("../spec/channel.js").Channel): import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, number> | import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, string> | import("../spec/channel.js").PositionFieldDef | import("../spec/channel.js").ChromPosDef | import("../spec/channel.js").PositionDatumDef | import("../spec/channel.js").
|
|
105
|
+
export function getChannelDefWithScale(view: import("../view/unitView.js").default, channel: import("../spec/channel.js").Channel): import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, number> | import("../spec/channel.js").FieldOrDatumDefWithCondition<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>, string> | import("../spec/channel.js").PositionFieldDef | import("../spec/channel.js").ChromPosDef | import("../spec/channel.js").PositionDatumDef | import("../spec/channel.js").MarkPropExprDef<import("../spec/channel.js").Type> | import("../spec/channel.js").Conditional<import("../spec/channel.js").MarkPropFieldDef<import("../spec/channel.js").Type>>;
|
|
106
106
|
/**
|
|
107
107
|
* @param {import("../spec/channel.js").ChannelDef} channelDef
|
|
108
108
|
* @returns {channelDef is import("../spec/channel.js").TypeMixins<import("../spec/channel.js").Type>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/encoder/encoder.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,gDANW,MAAM,YACN,OAAO,oBAAoB,EAAE,QAAQ,gBACrC;IAAE,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC;IAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,0BAA0B,EAAE,eAAe,CAAA;CAAE,SAC7H,OAAO,GACL,OAAO,qBAAqB,EAAE,SAAS,CAmEnD;AAED;;;;;;;;;GASG;AACH,mDANW,OAAO,oBAAoB,EAAE,OAAO,cACpC,OAAO,oBAAoB,EAAE,UAAU,YACvC,OAAO,oBAAoB,EAAE,QAAQ,gBACrC;IAAE,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,0BAA0B,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAA;CAAE,GAC3H,OAAO,qBAAqB,EAAE,cAAc,EAAE,CAuD1D;AAED;;;;;;GAMG;AACH,iDAJW,OAAO,qBAAqB,EAAE,OAAO,YACrC,OAAO,oBAAoB,EAAE,QAAQ,GACnC,OAAO,CAAC,MAAM,6EAAkB,CAAC,CAyC7C;AAED;;;;;;;GAOG;AACH,kDAHW,OAAO,oBAAoB,EAAE,OAAO,GAClC,OAAO,CAInB;AAED;;;GAGG;AACH,6CAHW,OAAO,qBAAqB,EAAE,OAAO,GACnC,OAAO,qBAAq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EAAE,OAAO,2DAS9C;AAED;;;;;GAKG;AACH,2CAFW,OAAO,oBAAoB,EAAE,OAAO,wCAI9C;AAED;;;;GAIG;AACH,kDAFW,OAAO,oBAAoB,EAAE,OAAO,0CAM9C;AAED;;GAEG;AACH,wCAFW,OAAO,oBAAoB,EAAE,OAAO,WAI9C;AAED;;;;GAIG;AACH,2CAFW,OAAO,oBAAoB,EAAE,OAAO,WAI9C;AAED;;;GAGG;AACH,4CAHW,OAAO,oBAAoB,EAAE,OAAO,GAClC,OAAO,IAAI,OAAO,oBAAoB,EAAE,gBAAgB,CAsBpE;AAED;;;;;GAKG;AACH,0CAHW,OAAO,oBAAoB,EAAE,OAAO,GAClC,GAAG,EAAE,CAsBjB;AAED;;;GAGG;AACH,gDAHW,OAAO,oBAAoB,EAAE,OAAO,GAClC,CAAS,IAAG,EAAH,GAAG,KAAE,MAAM,CAmBhC;AA7LD;;GAEG;AACH,wCAFU,OAAO,oBAAoB,EAAE,wBAAwB,EAAE,CAEb;AAEpD;;GAEG;AACH,0CAFU,OAAO,oBAAoB,EAAE,0BAA0B,EAAE,CAEX;AAExD;;GAEG;AACH,iCAFU,OAAO,oBAAoB,EAAE,iBAAiB,EAAE,CAKxD;AAoBF;;;;GAIG;AACH,gCAFU,OAAO,CAAC,MAAM,CAAC,OAAO,oBAAoB,EAAE,OAAO,EAAE,OAAO,oBAAoB,EAAE,0BAA0B,CAAC,CAAC,CAKtH;AAEF;;;;GAIG;AACH,8BAFU,OAAO,CAAC,MAAM,CAAC,OAAO,oBAAoB,EAAE,OAAO,EAAE,OAAO,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAInG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaleLocus.d.ts","sourceRoot":"","sources":["../../../src/genome/scaleLocus.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scaleLocus.d.ts","sourceRoot":"","sources":["../../../src/genome/scaleLocus.js"],"names":[],"mappings":"AASA,2EA2HC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;
|
|
8
|
+
const EXACT_LOCUS_LABEL_THINNING_FACTOR = 0.65;
|
|
8
9
|
|
|
9
10
|
export default function scaleLocus() {
|
|
10
11
|
/** @type {import("./scaleLocus.js").ScaleLocus} */
|
|
@@ -39,13 +40,17 @@ export default function scaleLocus() {
|
|
|
39
40
|
|
|
40
41
|
const requestedCount = Math.max(
|
|
41
42
|
1,
|
|
42
|
-
Math.min(count ?? 10, Math.
|
|
43
|
+
Math.min(count ?? 10, Math.floor(domainSpan))
|
|
43
44
|
);
|
|
44
45
|
|
|
45
46
|
let step = tickStep(domain[0], domain[1], requestedCount);
|
|
46
47
|
|
|
47
48
|
if (step < EXACT_LOCUS_LABEL_STEP_THRESHOLD) {
|
|
48
|
-
step = tickStep(
|
|
49
|
+
step = tickStep(
|
|
50
|
+
domain[0],
|
|
51
|
+
domain[1],
|
|
52
|
+
requestedCount * EXACT_LOCUS_LABEL_THINNING_FACTOR
|
|
53
|
+
);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
step = Math.max(1, step);
|
|
@@ -89,7 +94,7 @@ export default function scaleLocus() {
|
|
|
89
94
|
const step = tickStep(
|
|
90
95
|
domain[0],
|
|
91
96
|
domain[1],
|
|
92
|
-
Math.max(1, Math.min(count ?? 10, Math.
|
|
97
|
+
Math.max(1, Math.min(count ?? 10, Math.floor(domainSpan)))
|
|
93
98
|
);
|
|
94
99
|
// Use higher display precision for smaller spans
|
|
95
100
|
// TODO: max absolute value should be taken into account too. 2.00M vs 200M
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactionController.d.ts","sourceRoot":"","sources":["../../../src/genomeSpy/interactionController.js"],"names":[],"mappings":"AAWA;
|
|
1
|
+
{"version":3,"file":"interactionController.d.ts","sourceRoot":"","sources":["../../../src/genomeSpy/interactionController.js"],"names":[],"mappings":"AAWA;IAoCI;;;;;;;;;;OAUG;IACH,mIATG;QAAmD,QAAQ,EAAnD,OAAO,iBAAiB,EAAE,OAAO;QACe,QAAQ,EAAxD,OAAO,sBAAsB,EAAE,OAAO;QACY,OAAO,EAAzD,OAAO,wBAAwB,EAAE,OAAO;QACQ,QAAQ,EAAxD,OAAO,sBAAsB,EAAE,OAAO;QACM,SAAS,EAArD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI;QAC6C,eAAe,EAA9F,MAAM,CAAC,MAAM,EAAE,OAAO,8BAA8B,EAAE,cAAc,CAAC;QACjD,wBAAwB,EAA5C,MAAM,IAAI;QACY,mBAAmB,EAAzC,MAAM,MAAM;KACtB,EAiCA;IAED;cA3DkB,OAAO,kBAAkB,EAAE,OAAO;eAAS,OAAO,qBAAqB,EAAE,KAAK;kBAAY,MAAM;MA6DjH;IAED,6BAQC;IAED;;OAEG;IACH,iCAFW,UAAU,QA8CpB;IAED,kCAycC;IA+JD;;;;;;;OAOG;IACH,cAFa,CAAC,SAFH,CAAC,cACD,CAAS,IAAC,EAAD,CAAC,KAAE,OAAO,CAAC,MAAM,GAAG,WAAW,GAAG,OAAO,KAAK,EAAE,cAAc,CAAC,QAgBlF;;CACJ;8BAGY;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC"}
|