@genome-spy/core 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +31 -31
- package/package.json +2 -2
- package/src/view/gridView.js +16 -8
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "BSD-2-Clause",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.28.1",
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"module": "src/index.js",
|
|
13
13
|
"exports": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"vega-scale": "^7.1.1",
|
|
54
54
|
"vega-util": "^1.16.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "afa6f0dad1d3b205e95a6335fd474cf7984021b3"
|
|
57
57
|
}
|
package/src/view/gridView.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
FlexDimensions,
|
|
4
4
|
getLargestSize,
|
|
5
5
|
mapToPixelCoords,
|
|
6
|
+
parseSizeDef,
|
|
6
7
|
ZERO_SIZEDEF,
|
|
7
8
|
} from "../utils/layout/flexLayout";
|
|
8
9
|
import Grid from "../utils/layout/grid";
|
|
@@ -429,6 +430,13 @@ export default class GridView extends ContainerView {
|
|
|
429
430
|
let grow = 0;
|
|
430
431
|
let px = 0;
|
|
431
432
|
|
|
433
|
+
const explicitSize =
|
|
434
|
+
(direction == "row" && this.spec.height) ??
|
|
435
|
+
(direction == "column" && this.spec.width);
|
|
436
|
+
if (explicitSize || explicitSize === 0) {
|
|
437
|
+
return parseSizeDef(explicitSize);
|
|
438
|
+
}
|
|
439
|
+
|
|
432
440
|
const sizes = this.#getSizes(direction);
|
|
433
441
|
|
|
434
442
|
for (const [i, size] of sizes.entries()) {
|
|
@@ -499,14 +507,14 @@ export default class GridView extends ContainerView {
|
|
|
499
507
|
* @returns {FlexDimensions}
|
|
500
508
|
*/
|
|
501
509
|
getSize() {
|
|
502
|
-
return this._cache("size", () =>
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
);
|
|
510
|
+
//return this._cache("size", () =>
|
|
511
|
+
return new FlexDimensions(
|
|
512
|
+
this.#getFlexSize("column"),
|
|
513
|
+
this.#getFlexSize("row")
|
|
514
|
+
)
|
|
515
|
+
.subtractPadding(this.getOverhang())
|
|
516
|
+
.addPadding(this.getPadding());
|
|
517
|
+
//);
|
|
510
518
|
}
|
|
511
519
|
|
|
512
520
|
/**
|