@vaadin/board 23.0.0-alpha1 → 23.0.0-alpha2
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 +3 -3
- package/src/vaadin-board-row.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/board",
|
|
3
|
-
"version": "23.0.0-
|
|
3
|
+
"version": "23.0.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/iron-resizable-behavior": "^3.0.0",
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/component-base": "23.0.0-
|
|
40
|
+
"@vaadin/component-base": "23.0.0-alpha2",
|
|
41
41
|
"@vaadin/vaadin-license-checker": "^2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
46
|
"sinon": "^9.2.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "070f586dead02ca41b66717820c647f48bf1665f"
|
|
49
49
|
}
|
package/src/vaadin-board-row.js
CHANGED
|
@@ -94,7 +94,7 @@ class BoardRow extends ElementMixin(mixinBehaviors([IronResizableBehavior], Poly
|
|
|
94
94
|
this.addEventListener('iron-resize', this._onIronResize, true);
|
|
95
95
|
this.$.insertionPoint.addEventListener('slotchange', this.redraw.bind(this));
|
|
96
96
|
afterNextRender(this, function () {
|
|
97
|
-
//force this as an interested resizable of parent
|
|
97
|
+
// force this as an interested resizable of parent
|
|
98
98
|
this.dispatchEvent(
|
|
99
99
|
new CustomEvent('iron-request-resize-notifications', {
|
|
100
100
|
node: this,
|
|
@@ -203,7 +203,7 @@ class BoardRow extends ElementMixin(mixinBehaviors([IronResizableBehavior], Poly
|
|
|
203
203
|
_removeExtraNodesFromDOM(boardCols, nodes) {
|
|
204
204
|
let isErrorReported = false;
|
|
205
205
|
let spaceLeft = 4;
|
|
206
|
-
|
|
206
|
+
const returnNodes = [];
|
|
207
207
|
nodes.forEach((node, i) => {
|
|
208
208
|
spaceLeft = spaceLeft - boardCols[i];
|
|
209
209
|
if (spaceLeft < 0) {
|
|
@@ -245,7 +245,7 @@ class BoardRow extends ElementMixin(mixinBehaviors([IronResizableBehavior], Poly
|
|
|
245
245
|
breakpoints.mediumSize != this._oldBreakpoints.mediumSize
|
|
246
246
|
) {
|
|
247
247
|
const nodes = this.$.insertionPoint.assignedNodes({ flatten: true });
|
|
248
|
-
const isElementNode =
|
|
248
|
+
const isElementNode = (node) => {
|
|
249
249
|
return !(node.nodeType === node.TEXT_NODE || node instanceof DomRepeat || node instanceof DomIf);
|
|
250
250
|
};
|
|
251
251
|
const filteredNodes = nodes.filter(isElementNode);
|
|
@@ -253,7 +253,7 @@ class BoardRow extends ElementMixin(mixinBehaviors([IronResizableBehavior], Poly
|
|
|
253
253
|
const boardCols = this._parseBoardCols(filteredNodes);
|
|
254
254
|
const colsInRow = boardCols.reduce((a, b) => a + b, 0);
|
|
255
255
|
this._removeExtraNodesFromDOM(boardCols, filteredNodes).forEach((e, i) => {
|
|
256
|
-
|
|
256
|
+
const newFlexBasis = this._calculateFlexBasis(boardCols[i], width, colsInRow, breakpoints);
|
|
257
257
|
if (forceResize || !this._oldFlexBasis[i] || this._oldFlexBasis[i] != newFlexBasis) {
|
|
258
258
|
this._oldFlexBasis[i] = newFlexBasis;
|
|
259
259
|
e.style.flexBasis = newFlexBasis;
|