@vaadin/vaadin-overlay 23.3.0-alpha1 → 23.3.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-overlay",
|
|
3
|
-
"version": "23.3.0-
|
|
3
|
+
"version": "23.3.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "23.3.0-
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "23.3.0-
|
|
40
|
-
"@vaadin/vaadin-material-styles": "23.3.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "23.3.0-
|
|
38
|
+
"@vaadin/component-base": "23.3.0-alpha2",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha2",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha2",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@polymer/iron-overlay-behavior": "^3.0.0",
|
|
46
|
-
"@vaadin/button": "23.3.0-
|
|
47
|
-
"@vaadin/radio-group": "23.3.0-
|
|
46
|
+
"@vaadin/button": "23.3.0-alpha2",
|
|
47
|
+
"@vaadin/radio-group": "23.3.0-alpha2",
|
|
48
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
49
|
-
"@vaadin/text-field": "23.3.0-
|
|
49
|
+
"@vaadin/text-field": "23.3.0-alpha2",
|
|
50
50
|
"lit": "^2.0.0",
|
|
51
51
|
"sinon": "^13.0.2"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
|
|
54
54
|
}
|
|
@@ -182,6 +182,17 @@ export const PositionMixin = (superClass) =>
|
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
// Cleanup styles to avoid wrong values after window resize
|
|
186
|
+
// See https://github.com/vaadin/web-components/issues/4604
|
|
187
|
+
Object.assign(this.style, {
|
|
188
|
+
top: '',
|
|
189
|
+
right: '',
|
|
190
|
+
bottom: '',
|
|
191
|
+
left: '',
|
|
192
|
+
justifyContent: '',
|
|
193
|
+
alignItems: '',
|
|
194
|
+
});
|
|
195
|
+
|
|
185
196
|
const targetRect = this.positionTarget.getBoundingClientRect();
|
|
186
197
|
|
|
187
198
|
// Detect the desired alignment and update the layout accordingly
|
|
@@ -283,12 +294,11 @@ export const PositionMixin = (superClass) =>
|
|
|
283
294
|
|
|
284
295
|
/**
|
|
285
296
|
* Returns an object with CSS position properties to set,
|
|
286
|
-
* e.g. { top: "100px"
|
|
297
|
+
* e.g. { top: "100px" }
|
|
287
298
|
*/
|
|
288
299
|
// eslint-disable-next-line max-params
|
|
289
300
|
__calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {
|
|
290
301
|
const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;
|
|
291
|
-
const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;
|
|
292
302
|
|
|
293
303
|
const currentValue = parseFloat(overlay.style[cssPropNameToSet] || getComputedStyle(overlay)[cssPropNameToSet]);
|
|
294
304
|
|
|
@@ -298,7 +308,6 @@ export const PositionMixin = (superClass) =>
|
|
|
298
308
|
|
|
299
309
|
return {
|
|
300
310
|
[cssPropNameToSet]: `${currentValue + diff * (shouldAlignStart ? -1 : 1)}px`,
|
|
301
|
-
[cssPropNameToClear]: '',
|
|
302
311
|
};
|
|
303
312
|
}
|
|
304
313
|
};
|