@vaadin/board 24.1.0-alpha9 → 24.1.0-beta2
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/package.json +4 -3
- package/src/vaadin-board-row.js +15 -6
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/board",
|
|
3
|
-
"version": "24.1.0-
|
|
3
|
+
"version": "24.1.0-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/
|
|
42
|
+
"@vaadin/a11y-base": "24.1.0-beta2",
|
|
43
|
+
"@vaadin/component-base": "24.1.0-beta2"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"web-types.json",
|
|
52
53
|
"web-types.lit.json"
|
|
53
54
|
],
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "83536fcc7d6661a593b2713cb99a8cb74f2fd868"
|
|
55
56
|
}
|
package/src/vaadin-board-row.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
11
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
12
|
+
import { isElementHidden } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
12
13
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
13
14
|
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
14
15
|
|
|
@@ -232,12 +233,7 @@ class BoardRow extends ResizeMixin(ElementMixin(PolymerElement)) {
|
|
|
232
233
|
_recalculateFlexBasis(forceResize) {
|
|
233
234
|
const width = this.getBoundingClientRect().width;
|
|
234
235
|
const breakpoints = this._measureBreakpointsInPx();
|
|
235
|
-
if (
|
|
236
|
-
forceResize ||
|
|
237
|
-
width !== this._oldWidth ||
|
|
238
|
-
breakpoints.smallSize !== this._oldBreakpoints.smallSize ||
|
|
239
|
-
breakpoints.mediumSize !== this._oldBreakpoints.mediumSize
|
|
240
|
-
) {
|
|
236
|
+
if (forceResize || this._shouldRecalculate(width, breakpoints)) {
|
|
241
237
|
const nodes = this.$.insertionPoint.assignedNodes({ flatten: true });
|
|
242
238
|
const filteredNodes = nodes.filter((node) => node.nodeType === Node.ELEMENT_NODE);
|
|
243
239
|
this._addStyleNames(width, breakpoints);
|
|
@@ -255,6 +251,19 @@ class BoardRow extends ResizeMixin(ElementMixin(PolymerElement)) {
|
|
|
255
251
|
}
|
|
256
252
|
}
|
|
257
253
|
|
|
254
|
+
/** @private */
|
|
255
|
+
_shouldRecalculate(width, breakpoints) {
|
|
256
|
+
// Should not recalculate if row is invisible
|
|
257
|
+
if (isElementHidden(this)) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
return (
|
|
261
|
+
width !== this._oldWidth ||
|
|
262
|
+
breakpoints.smallSize !== this._oldBreakpoints.smallSize ||
|
|
263
|
+
breakpoints.mediumSize !== this._oldBreakpoints.mediumSize
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
258
267
|
/**
|
|
259
268
|
* Measure the breakpoints in pixels.
|
|
260
269
|
*
|
package/web-types.json
CHANGED