publ-echo-test 0.0.30 → 0.0.32
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.
@@ -52,11 +52,18 @@ var GridItem = function (_a) {
|
|
52
52
|
for (var _i = 0, mutationsList_1 = mutationsList; _i < mutationsList_1.length; _i++) {
|
53
53
|
var mutation = mutationsList_1[_i];
|
54
54
|
var isCharacterChanged = mutation.type === 'characterData';
|
55
|
+
var keepWidth = true;
|
55
56
|
var height = isCharacterChanged ? mutation.target.parentNode.clientHeight : mutation.target.clientHeight;
|
56
|
-
|
57
|
-
|
57
|
+
console.log('mutation.target.clientWidth', mutation.target.clientWidth);
|
58
|
+
console.log('mutation.target.parentNode.clientWidth', mutation.target.parentNode.clientWidth);
|
59
|
+
console.log('targetNode.clientWidth', targetNode.clientWidth);
|
60
|
+
var width = targetNode.clientWidth;
|
61
|
+
if (!isCharacterChanged && mutation.target instanceof Element) {
|
58
62
|
var styles = getComputedStyle(mutation.target);
|
59
|
-
|
63
|
+
var minWidth = parseFloat(styles.minWidth);
|
64
|
+
if (minWidth > width) {
|
65
|
+
keepWidth = false;
|
66
|
+
}
|
60
67
|
}
|
61
68
|
var prevW = props.w;
|
62
69
|
var prevH = props.h;
|
@@ -64,7 +71,7 @@ var GridItem = function (_a) {
|
|
64
71
|
width: width,
|
65
72
|
height: height,
|
66
73
|
}, x, y, 'e', props.w, props.h, true), w_1 = _a.w, h_1 = _a.h;
|
67
|
-
if (
|
74
|
+
if (keepWidth) {
|
68
75
|
w_1 = prevW;
|
69
76
|
}
|
70
77
|
if (prevH > h_1) {
|