verstak 0.24.310 → 0.24.311
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.
|
@@ -8,12 +8,12 @@ export type El<T = any, M = any> = {
|
|
|
8
8
|
place: ElPlace;
|
|
9
9
|
width: Range;
|
|
10
10
|
height: Range;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
horizontally: Horizontal | undefined;
|
|
12
|
+
contentHorizontally: Horizontal | undefined;
|
|
13
|
+
vertically: Vertical | undefined;
|
|
14
|
+
contentVertically: Vertical | undefined;
|
|
15
|
+
stretchingStrengthHorizontally: number | undefined;
|
|
16
|
+
stretchingStrengthVertically: number | undefined;
|
|
17
17
|
contentWrapping: boolean;
|
|
18
18
|
overlayVisible: boolean | undefined;
|
|
19
19
|
sealed: Direction | undefined;
|
|
@@ -132,18 +132,18 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
132
132
|
minPx: number;
|
|
133
133
|
maxPx: number;
|
|
134
134
|
});
|
|
135
|
-
get
|
|
136
|
-
set
|
|
137
|
-
get
|
|
138
|
-
set
|
|
139
|
-
get
|
|
140
|
-
set
|
|
141
|
-
get
|
|
142
|
-
set
|
|
143
|
-
get
|
|
144
|
-
set
|
|
145
|
-
get
|
|
146
|
-
set
|
|
135
|
+
get horizontally(): Horizontal | undefined;
|
|
136
|
+
set horizontally(value: Horizontal | undefined);
|
|
137
|
+
get vertically(): Vertical | undefined;
|
|
138
|
+
set vertically(value: Vertical | undefined);
|
|
139
|
+
get contentHorizontally(): Horizontal | undefined;
|
|
140
|
+
set contentHorizontally(value: Horizontal | undefined);
|
|
141
|
+
get contentVertically(): Vertical | undefined;
|
|
142
|
+
set contentVertically(value: Vertical | undefined);
|
|
143
|
+
get stretchingStrengthHorizontally(): number | undefined;
|
|
144
|
+
set stretchingStrengthHorizontally(value: number | undefined);
|
|
145
|
+
get stretchingStrengthVertically(): number | undefined;
|
|
146
|
+
set stretchingStrengthVertically(value: number | undefined);
|
|
147
147
|
get contentWrapping(): boolean;
|
|
148
148
|
set contentWrapping(value: boolean);
|
|
149
149
|
get overlayVisible(): boolean | undefined;
|
|
@@ -150,48 +150,48 @@ export class ElImpl {
|
|
|
150
150
|
if (value.maxPx !== w.maxPx)
|
|
151
151
|
this._height.maxPx = value.maxPx;
|
|
152
152
|
}
|
|
153
|
-
get
|
|
154
|
-
set
|
|
153
|
+
get horizontally() { return this._horizontal; }
|
|
154
|
+
set horizontally(value) {
|
|
155
155
|
const existing = this._horizontal;
|
|
156
156
|
if (value !== existing) {
|
|
157
157
|
ElImpl.applyHorizontal(this, existing, value, this._contentHorizontal, this._contentHorizontal, this._stretchingStrengthH);
|
|
158
158
|
this._horizontal = value;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
get
|
|
162
|
-
set
|
|
161
|
+
get vertically() { return this._vertical; }
|
|
162
|
+
set vertically(value) {
|
|
163
163
|
const existing = this._vertical;
|
|
164
164
|
if (value !== existing) {
|
|
165
165
|
ElImpl.applyVertical(this, existing, value, this._contentVertical, this._contentVertical, this._stretchingStrengthV);
|
|
166
166
|
this._vertical = value;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
get
|
|
170
|
-
set
|
|
169
|
+
get contentHorizontally() { return this._contentHorizontal; }
|
|
170
|
+
set contentHorizontally(value) {
|
|
171
171
|
const existing = this._contentHorizontal;
|
|
172
172
|
if (value !== existing) {
|
|
173
173
|
ElImpl.applyHorizontal(this, this._horizontal, this._horizontal, existing, value, this._stretchingStrengthH);
|
|
174
174
|
this._contentHorizontal = value;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
get
|
|
178
|
-
set
|
|
177
|
+
get contentVertically() { return this._contentVertical; }
|
|
178
|
+
set contentVertically(value) {
|
|
179
179
|
const existing = this._contentVertical;
|
|
180
180
|
if (value !== existing) {
|
|
181
181
|
ElImpl.applyVertical(this, this._vertical, this._vertical, existing, value, this._stretchingStrengthV);
|
|
182
182
|
this._contentVertical = value;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
get
|
|
186
|
-
set
|
|
185
|
+
get stretchingStrengthHorizontally() { return this._stretchingStrengthH; }
|
|
186
|
+
set stretchingStrengthHorizontally(value) {
|
|
187
187
|
const existing = this._stretchingStrengthH;
|
|
188
188
|
if (value !== existing) {
|
|
189
189
|
ElImpl.applyStretchingStrengthH(this, existing, value);
|
|
190
190
|
this._stretchingStrengthH = value;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
get
|
|
194
|
-
set
|
|
193
|
+
get stretchingStrengthVertically() { return this._stretchingStrengthV; }
|
|
194
|
+
set stretchingStrengthVertically(value) {
|
|
195
195
|
const existing = this._stretchingStrengthV;
|
|
196
196
|
if (value !== existing) {
|
|
197
197
|
ElImpl.applyStretchingStrengthV(this, existing, value);
|
|
@@ -410,7 +410,7 @@ export class ElImpl {
|
|
|
410
410
|
const isAligner = newPrimary === Vertical.center ||
|
|
411
411
|
newPrimary === Vertical.bottom;
|
|
412
412
|
isEffectiveAlignerY = isAligner && (hostLayout.alignerY === undefined ||
|
|
413
|
-
hostLayout.alignerY.
|
|
413
|
+
hostLayout.alignerY.vertically !== Vertical.center);
|
|
414
414
|
if (hostLayout.alignerY === element) {
|
|
415
415
|
if (!isEffectiveAlignerY) {
|
|
416
416
|
hostCss.marginTop = "";
|
|
@@ -189,7 +189,7 @@ export function getPrioritiesForSizeChanging(isHorizontal, children, indexes) {
|
|
|
189
189
|
const items = Array.from(children.items()).filter(x => isSplitViewPartition(x.instance.driver));
|
|
190
190
|
for (let i = items.length - 1; i >= 0; i--) {
|
|
191
191
|
const el = items[i].instance.element;
|
|
192
|
-
const strength = (_a = (isHorizontal ? el.
|
|
192
|
+
const strength = (_a = (isHorizontal ? el.stretchingStrengthHorizontally : el.stretchingStrengthVertically)) !== null && _a !== void 0 ? _a : 1;
|
|
193
193
|
if (!indexes.includes(i)) {
|
|
194
194
|
if (strength > 0)
|
|
195
195
|
resizable.push(1 << i);
|
|
@@ -201,7 +201,7 @@ export function getPrioritiesForSizeChanging(isHorizontal, children, indexes) {
|
|
|
201
201
|
let mr = 0;
|
|
202
202
|
for (const i of indexes) {
|
|
203
203
|
const el = items[i].instance.element;
|
|
204
|
-
const strength = (_b = (isHorizontal ? el.
|
|
204
|
+
const strength = (_b = (isHorizontal ? el.stretchingStrengthHorizontally : el.stretchingStrengthVertically)) !== null && _b !== void 0 ? _b : 1;
|
|
205
205
|
if (strength > 0)
|
|
206
206
|
r |= 1 << i;
|
|
207
207
|
else
|
|
@@ -221,7 +221,7 @@ export function getPrioritiesForEmptySpaceDistribution(isHorizontal, children) {
|
|
|
221
221
|
for (const child of children.items()) {
|
|
222
222
|
if (isSplitViewPartition(child.instance.driver)) {
|
|
223
223
|
const el = child.instance.element;
|
|
224
|
-
const strength = (_a = (isHorizontal ? el.
|
|
224
|
+
const strength = (_a = (isHorizontal ? el.stretchingStrengthHorizontally : el.stretchingStrengthVertically)) !== null && _a !== void 0 ? _a : 1;
|
|
225
225
|
if (strength > 0)
|
|
226
226
|
r |= 1 << i;
|
|
227
227
|
else
|
|
@@ -235,7 +235,7 @@ function getFractionCount(isHorizontal, children, vector, index, force = false)
|
|
|
235
235
|
var _a;
|
|
236
236
|
let result = 0;
|
|
237
237
|
for (const i of indexes(vector, index)) {
|
|
238
|
-
const growth = (_a = (isHorizontal ? children[i].element.
|
|
238
|
+
const growth = (_a = (isHorizontal ? children[i].element.stretchingStrengthHorizontally : children[i].element.stretchingStrengthVertically)) !== null && _a !== void 0 ? _a : 1;
|
|
239
239
|
result += growth > 0 ? growth : (force ? 1 : 0);
|
|
240
240
|
}
|
|
241
241
|
return result;
|
|
@@ -280,7 +280,7 @@ function distribute(sign, deltaPx, index, priorities, sizesPx, isHorizontal, for
|
|
|
280
280
|
for (const i of indexes(vector, sign * index)) {
|
|
281
281
|
const child = sizesPx[i].node;
|
|
282
282
|
const initialSizePx = sizesPx[i].sizePx;
|
|
283
|
-
const strength = isHorizontal ? ((_a = child.element.
|
|
283
|
+
const strength = isHorizontal ? ((_a = child.element.stretchingStrengthHorizontally) !== null && _a !== void 0 ? _a : 1) : ((_b = child.element.stretchingStrengthVertically) !== null && _b !== void 0 ? _b : 1);
|
|
284
284
|
const growth = strength > 0 ? strength : (force ? 1 : 0);
|
|
285
285
|
const newSizePx = initialSizePx + sign * (growth * fractionSizePx);
|
|
286
286
|
const size = isHorizontal ? sizesPx[i].node.element.widthPx : sizesPx[i].node.element.heightPx;
|