@genome-spy/core 0.28.3 → 0.30.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/index.js +32 -32
- package/dist/schema.json +77 -10
- package/package.json +2 -2
- package/src/genomeSpy.js +1 -0
- package/src/gl/webGLHelper.js +39 -24
- package/src/marks/mark.js +18 -2
- package/src/scale/glslScaleGenerator.js +25 -11
- package/src/spec/sampleView.d.ts +180 -0
- package/src/spec/transform.d.ts +2 -2
- package/src/spec/view.d.ts +1 -23
- package/src/tooltip/dataTooltipHandler.js +16 -12
- package/src/view/gridView.js +6 -2
- package/src/view/scaleResolution.js +6 -0
- package/src/view/viewUtils.js +1 -1
- package/src/view/zoom.js +2 -2
|
@@ -220,6 +220,12 @@ export default class ScaleResolution {
|
|
|
220
220
|
props.domain = domain;
|
|
221
221
|
} else if (isDiscrete(props.type)) {
|
|
222
222
|
props.domain = new NominalDomain();
|
|
223
|
+
} else if (props.scheme) {
|
|
224
|
+
// An initial domain is required when using a scheme.
|
|
225
|
+
// Otherwise configureScale() does something weird when the domain is set later,
|
|
226
|
+
// resulting in an interpolator between just two colors.
|
|
227
|
+
// TODO: Fix configureScale().
|
|
228
|
+
props.domain = [0, 1];
|
|
223
229
|
}
|
|
224
230
|
|
|
225
231
|
if (!props.domain && props.domainMid !== undefined) {
|
package/src/view/viewUtils.js
CHANGED
|
@@ -18,7 +18,7 @@ import { rollup } from "d3-array";
|
|
|
18
18
|
* @typedef {import("../spec/view").ViewSpec} ViewSpec
|
|
19
19
|
* @typedef {import("../spec/view").LayerSpec} LayerSpec
|
|
20
20
|
* @typedef {import("../spec/view").FacetSpec} FacetSpec
|
|
21
|
-
* @typedef {import("../spec/
|
|
21
|
+
* @typedef {import("../spec/sampleView").SampleSpec} SampleSpec
|
|
22
22
|
* @typedef {import("../spec/view").UnitSpec} UnitSpec
|
|
23
23
|
* @typedef {import("../spec/view").VConcatSpec} VConcatSpec
|
|
24
24
|
* @typedef {import("../spec/view").HConcatSpec} HConcatSpec
|
package/src/view/zoom.js
CHANGED
|
@@ -30,10 +30,10 @@ export default function interactionToZoom(event, coords, handleZoom, hover) {
|
|
|
30
30
|
|
|
31
31
|
if (hover) {
|
|
32
32
|
const e = hover.mark.encoders;
|
|
33
|
-
if (e.x && !e.x2) {
|
|
33
|
+
if (e.x && !e.x2 && !e.x.constantValue) {
|
|
34
34
|
x = +e.x(hover.datum) * coords.width + coords.x;
|
|
35
35
|
}
|
|
36
|
-
if (e.y && !e.y2) {
|
|
36
|
+
if (e.y && !e.y2 && !e.y.constantValue) {
|
|
37
37
|
y = (1 - +e.y(hover.datum)) * coords.height + coords.y;
|
|
38
38
|
}
|
|
39
39
|
}
|