@genome-spy/core 0.55.0 → 0.56.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 +3642 -3530
- package/dist/bundle/index.js +90 -83
- package/dist/schema.json +4 -0
- package/dist/src/gl/glslScaleGenerator.d.ts +1 -0
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +3 -10
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/gl/webGLHelper.d.ts +8 -0
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +40 -0
- package/dist/src/marks/mark.d.ts +8 -0
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +86 -19
- package/dist/src/marks/rule.d.ts.map +1 -1
- package/dist/src/marks/rule.js +23 -22
- package/dist/src/selection/selection.d.ts +24 -0
- package/dist/src/selection/selection.d.ts.map +1 -1
- package/dist/src/selection/selection.js +73 -2
- package/dist/src/spec/parameter.d.ts +3 -2
- package/dist/src/types/selectionTypes.d.ts +2 -2
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +14 -8
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +46 -10
- package/package.json +2 -2
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { isString } from "vega-util";
|
|
2
2
|
import createFunction from "../utils/expression.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createMultiPointSelection,
|
|
5
|
+
createSinglePointSelection,
|
|
6
|
+
isPointSelectionConfig,
|
|
7
|
+
isTogglingEnabledInPointSelectionConfig,
|
|
8
|
+
} from "../selection/selection.js";
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
11
|
* A class that manages parameters and expressions.
|
|
@@ -100,13 +105,14 @@ export default class ParamMediator {
|
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
if ("select" in param) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const select = param.select;
|
|
109
|
+
if (isPointSelectionConfig(select)) {
|
|
110
|
+
// Set initial value so that production rules in shaders can be generated, etc.
|
|
111
|
+
setter(
|
|
112
|
+
isTogglingEnabledInPointSelectionConfig(select)
|
|
113
|
+
? createMultiPointSelection()
|
|
114
|
+
: createSinglePointSelection(null)
|
|
115
|
+
);
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unitView.d.ts","sourceRoot":"","sources":["../../../src/view/unitView.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unitView.d.ts","sourceRoot":"","sources":["../../../src/view/unitView.js"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,wBAHU,OAAO,OAAO,iBAAiB,EAAE,QAAQ,EAAE,cAAc,kBAAkB,EAAE,OAAO,CAAC,CAc7F;AAEF;IAeI;;;;;;;;OAQG;IACH,kBAPW,OAAO,iBAAiB,EAAE,QAAQ,WAClC,OAAO,yBAAyB,EAAE,OAAO,gBACzC,OAAO,oBAAoB,EAAE,OAAO,cACpC,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,YACN,OAAO,WAAW,EAAE,WAAW,EAiCzC;IA5BG,yCAAgB;IAIZ,iDAAiD;IACjD,MADW,OAAO,kBAAkB,EAAE,OAAO,CACnB;IAoHlC,2DAIC;IAED;;;;;OAKG;IAEH,iEA+FC;IAED;;;;;OAKG;IACH,4IAEC;IAkBD;;OAEG;IACH,uDAEC;IAED;;;;;;;;;;;;;OAaG;IACH,uEAHW,OAAO,oBAAoB,EAAE,IAAI,iDAqB3C;IAED,uBAQC;IAgBD;;;;OAIG;IACH,8BAJW,MAAM,+DAEJ,OAAO,iBAAiB,EAAE,kBAAkB,CAKxD;;CACJ;iBAnYgB,WAAW"}
|
|
@@ -16,7 +16,13 @@ import {
|
|
|
16
16
|
import createDomain from "../utils/domainArray.js";
|
|
17
17
|
import AxisResolution from "./axisResolution.js";
|
|
18
18
|
import View from "./view.js";
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
createMultiPointSelection,
|
|
21
|
+
createSinglePointSelection,
|
|
22
|
+
isPointSelectionConfig,
|
|
23
|
+
isTogglingEnabledInPointSelectionConfig,
|
|
24
|
+
updateMultiPointSelection,
|
|
25
|
+
} from "../selection/selection.js";
|
|
20
26
|
import { isString } from "vega-util";
|
|
21
27
|
import { UNIQUE_ID_KEY } from "../data/transforms/identifier.js";
|
|
22
28
|
|
|
@@ -102,8 +108,7 @@ export default class UnitView extends View {
|
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
const select = param.select;
|
|
105
|
-
|
|
106
|
-
if (type === "point") {
|
|
111
|
+
if (isPointSelectionConfig(select)) {
|
|
107
112
|
// Handle projection-free point selections
|
|
108
113
|
|
|
109
114
|
const none = -1;
|
|
@@ -123,15 +128,46 @@ export default class UnitView extends View {
|
|
|
123
128
|
["mouseover", "pointerover"].includes(on)
|
|
124
129
|
? "mousemove"
|
|
125
130
|
: "click",
|
|
126
|
-
(
|
|
131
|
+
(
|
|
132
|
+
rect,
|
|
133
|
+
/** @type {import("../utils/interactionEvent.js").default} */ event
|
|
134
|
+
) => {
|
|
135
|
+
const mouseEvent = /** @type {MouseEvent} */ (
|
|
136
|
+
event.uiEvent
|
|
137
|
+
);
|
|
127
138
|
const datum = getHoveredDatum();
|
|
128
139
|
const id = datum ? datum[UNIQUE_ID_KEY] : none;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
)
|
|
134
|
-
|
|
140
|
+
|
|
141
|
+
if (isTogglingEnabledInPointSelectionConfig(select)) {
|
|
142
|
+
const toggle = mouseEvent.shiftKey;
|
|
143
|
+
|
|
144
|
+
if (toggle) {
|
|
145
|
+
if (datum) {
|
|
146
|
+
const previousSelection =
|
|
147
|
+
this.paramMediator.getValue(name);
|
|
148
|
+
setter(
|
|
149
|
+
updateMultiPointSelection(
|
|
150
|
+
previousSelection,
|
|
151
|
+
{
|
|
152
|
+
toggle: [datum],
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
setter(
|
|
159
|
+
createMultiPointSelection(
|
|
160
|
+
datum ? [datum] : null
|
|
161
|
+
)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
if (id != lastId) {
|
|
166
|
+
lastId = id;
|
|
167
|
+
const selection =
|
|
168
|
+
createSinglePointSelection(datum);
|
|
169
|
+
setter(selection);
|
|
170
|
+
}
|
|
135
171
|
}
|
|
136
172
|
}
|
|
137
173
|
);
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.56.0",
|
|
11
11
|
"jsdelivr": "dist/bundle/index.js",
|
|
12
12
|
"unpkg": "dist/bundle/index.js",
|
|
13
13
|
"browser": "dist/bundle/index.js",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/long": "^4.0.1"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "3b83e28aecd08d1362bb373929823dc69cf9b705"
|
|
71
71
|
}
|