bwin 0.2.2 → 0.2.4
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/dist/bwin.js +234 -222
- package/package.json +1 -1
package/dist/bwin.js
CHANGED
|
@@ -2,34 +2,34 @@ var B = Object.defineProperty;
|
|
|
2
2
|
var $ = (e, t, i) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
3
|
var f = (e, t, i) => $(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
4
|
function W(e = 0.7, t = 128) {
|
|
5
|
-
const i = 256 - t, n = Math.floor(Math.random() * i + t),
|
|
6
|
-
return `rgba(${n}, ${
|
|
5
|
+
const i = 256 - t, n = Math.floor(Math.random() * i + t), o = Math.floor(Math.random() * i + t), s = Math.floor(Math.random() * i + t), h = Math.max(0.5, Math.random() * e);
|
|
6
|
+
return `rgba(${n}, ${o}, ${s}, ${h})`;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function C(e = 2, t = 3) {
|
|
9
9
|
if (e < 0 || t < 0)
|
|
10
10
|
throw new Error("Parameters must be non-negative numbers");
|
|
11
11
|
const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", n = "0123456789";
|
|
12
|
-
let
|
|
13
|
-
for (let
|
|
12
|
+
let o = "";
|
|
13
|
+
for (let s = 0; s < e; s++) {
|
|
14
14
|
const h = Math.floor(Math.random() * i.length);
|
|
15
|
-
|
|
15
|
+
o += i[h];
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
for (let
|
|
17
|
+
o += "-";
|
|
18
|
+
for (let s = 0; s < t; s++) {
|
|
19
19
|
const h = Math.floor(Math.random() * n.length);
|
|
20
|
-
|
|
20
|
+
o += n[h];
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return o;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function R(e, t) {
|
|
25
25
|
for (; t.firstChild; )
|
|
26
26
|
e.append(t.firstChild);
|
|
27
27
|
}
|
|
28
28
|
function H(e, t) {
|
|
29
29
|
const i = document.createElement("div");
|
|
30
|
-
|
|
30
|
+
R(i, e), R(e, t), R(t, i);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function b(e) {
|
|
33
33
|
if (typeof e == "number" && !isNaN(e))
|
|
34
34
|
return e;
|
|
35
35
|
if (typeof e == "string") {
|
|
@@ -53,7 +53,7 @@ function C(e) {
|
|
|
53
53
|
function I(e) {
|
|
54
54
|
return e !== null && typeof e == "object" && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function P(e, t) {
|
|
57
57
|
for (const i in t) {
|
|
58
58
|
if (Object.hasOwn(e, i))
|
|
59
59
|
throw new Error(`Key "${i}" already exists in target object`);
|
|
@@ -61,7 +61,7 @@ function O(e, t) {
|
|
|
61
61
|
}
|
|
62
62
|
return e;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function O(e) {
|
|
65
65
|
const t = document.createElement("template");
|
|
66
66
|
return t.innerHTML = e.trim(), t.content;
|
|
67
67
|
}
|
|
@@ -70,16 +70,16 @@ function m(e) {
|
|
|
70
70
|
return null;
|
|
71
71
|
if (typeof e == "string")
|
|
72
72
|
try {
|
|
73
|
-
const t =
|
|
73
|
+
const t = O(e);
|
|
74
74
|
return t.childNodes.length === 1 ? t.firstChild : t;
|
|
75
75
|
} catch {
|
|
76
76
|
return document.createTextNode(e);
|
|
77
77
|
}
|
|
78
78
|
return e instanceof Node ? e : document.createTextNode(String(e));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
const t = parseFloat(e.style.left) || 0, i = parseFloat(e.style.top) || 0, n = parseFloat(e.style.width) || 0,
|
|
82
|
-
return { left: t, top: i, width: n, height:
|
|
80
|
+
function M(e) {
|
|
81
|
+
const t = parseFloat(e.style.left) || 0, i = parseFloat(e.style.top) || 0, n = parseFloat(e.style.width) || 0, o = parseFloat(e.style.height) || 0;
|
|
82
|
+
return { left: t, top: i, width: n, height: o };
|
|
83
83
|
}
|
|
84
84
|
const r = {
|
|
85
85
|
Top: "top",
|
|
@@ -91,7 +91,7 @@ const r = {
|
|
|
91
91
|
Unknown: "unknown",
|
|
92
92
|
Outside: "outside"
|
|
93
93
|
};
|
|
94
|
-
function
|
|
94
|
+
function G(e) {
|
|
95
95
|
switch (e) {
|
|
96
96
|
case r.Top:
|
|
97
97
|
return r.Bottom;
|
|
@@ -105,50 +105,50 @@ function F(e) {
|
|
|
105
105
|
throw new Error(`[bwin] Invalid position: ${e}`);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function F({ width: e, height: t, x: i }) {
|
|
109
109
|
return t / e * i;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function _({ width: e, height: t, y: i }) {
|
|
112
112
|
return e / t * i;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function k({ width: e, height: t, x: i }) {
|
|
115
115
|
return t - t / e * i;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function U({ width: e, height: t, y: i }) {
|
|
118
118
|
return e - e / t * i;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const n = e.getBoundingClientRect(), { width:
|
|
122
|
-
if (h < 0 || h >
|
|
120
|
+
function Y(e, { clientX: t, clientY: i }) {
|
|
121
|
+
const n = e.getBoundingClientRect(), { width: o, height: s } = n, h = t - n.left, l = i - n.top;
|
|
122
|
+
if (h < 0 || h > o || l < 0 || l > s)
|
|
123
123
|
return r.Outside;
|
|
124
|
-
const
|
|
125
|
-
return h <
|
|
124
|
+
const d = 0.3, a = F({ width: o, height: s, x: h }), c = k({ width: o, height: s, x: h }), p = _({ width: o, height: s, y: l }), u = U({ width: o, height: s, y: l });
|
|
125
|
+
return h < o * (0.5 - d / 2) && l > a && l < c ? r.Left : h > o * (0.5 + d / 2) && l < a && l > c ? r.Right : l < s * (0.5 - d / 2) && h > p && h < u ? r.Top : l > s * (0.5 + d / 2) && h < p && h > u ? r.Bottom : h > o * (0.5 - d / 2) && h < o * (0.5 + d / 2) && l > s * (0.5 - d / 2) && l < s * (0.5 + d / 2) ? r.Center : r.Unknown;
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const X = 100, q = 100, w = {
|
|
128
128
|
left: 0,
|
|
129
129
|
top: 0,
|
|
130
130
|
width: 150,
|
|
131
131
|
height: 150,
|
|
132
132
|
// Initial min values, real min width/height is calculated based on children
|
|
133
|
-
minWidth:
|
|
134
|
-
minHeight:
|
|
133
|
+
minWidth: X,
|
|
134
|
+
minHeight: q
|
|
135
135
|
};
|
|
136
|
-
class
|
|
136
|
+
class g {
|
|
137
137
|
constructor({
|
|
138
138
|
left: t = w.left,
|
|
139
139
|
top: i = w.top,
|
|
140
140
|
width: n = w.width,
|
|
141
|
-
height:
|
|
142
|
-
minWidth:
|
|
141
|
+
height: o = w.height,
|
|
142
|
+
minWidth: s = w.minWidth,
|
|
143
143
|
minHeight: h = w.minHeight,
|
|
144
144
|
domNode: l = null,
|
|
145
|
-
store:
|
|
146
|
-
position:
|
|
145
|
+
store: d = {},
|
|
146
|
+
position: a,
|
|
147
147
|
id: c
|
|
148
148
|
} = w) {
|
|
149
|
-
if (this.id = c ??
|
|
149
|
+
if (this.id = c ?? C(), !a)
|
|
150
150
|
throw new Error("[bwin] Sash position is required");
|
|
151
|
-
this.position =
|
|
151
|
+
this.position = a, this.domNode = l, this._top = i, this._left = t, this._width = n, this._height = o, this.children = [], this.minWidth = s, this.minHeight = h, this.store = d;
|
|
152
152
|
}
|
|
153
153
|
walk(t) {
|
|
154
154
|
this.children.forEach((i) => i.walk(t)), t(this);
|
|
@@ -183,10 +183,10 @@ class p {
|
|
|
183
183
|
return this.children.find((t) => t.position === r.Bottom);
|
|
184
184
|
}
|
|
185
185
|
getChildren() {
|
|
186
|
-
let t = null, i = null, n = null,
|
|
187
|
-
for (const
|
|
188
|
-
|
|
189
|
-
return [n, i,
|
|
186
|
+
let t = null, i = null, n = null, o = null;
|
|
187
|
+
for (const s of this.children)
|
|
188
|
+
s.position === r.Left ? t = s : s.position === r.Right ? i = s : s.position === r.Top ? n = s : s.position === r.Bottom && (o = s);
|
|
189
|
+
return [n, i, o, t];
|
|
190
190
|
}
|
|
191
191
|
getAllLeafDescendants() {
|
|
192
192
|
const t = [];
|
|
@@ -197,27 +197,27 @@ class p {
|
|
|
197
197
|
calcMinWidth() {
|
|
198
198
|
if (this.isLeaf())
|
|
199
199
|
return this.minWidth;
|
|
200
|
-
const [t, i, n,
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
return Math.max(this.minWidth,
|
|
200
|
+
const [t, i, n, o] = this.getChildren();
|
|
201
|
+
if (o && i) {
|
|
202
|
+
const s = o.calcMinWidth() + i.calcMinWidth();
|
|
203
|
+
return Math.max(this.minWidth, s);
|
|
204
204
|
}
|
|
205
205
|
if (t && n) {
|
|
206
|
-
const
|
|
207
|
-
return Math.max(this.minWidth,
|
|
206
|
+
const s = Math.max(t.calcMinWidth(), n.calcMinWidth());
|
|
207
|
+
return Math.max(this.minWidth, s);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
calcMinHeight() {
|
|
211
211
|
if (this.isLeaf())
|
|
212
212
|
return this.minHeight;
|
|
213
|
-
const [t, i, n,
|
|
214
|
-
if (
|
|
215
|
-
const
|
|
216
|
-
return Math.max(this.minHeight,
|
|
213
|
+
const [t, i, n, o] = this.getChildren();
|
|
214
|
+
if (o && i) {
|
|
215
|
+
const s = Math.max(o.calcMinHeight(), i.calcMinHeight());
|
|
216
|
+
return Math.max(this.minHeight, s);
|
|
217
217
|
}
|
|
218
218
|
if (t && n) {
|
|
219
|
-
const
|
|
220
|
-
return Math.max(this.minHeight,
|
|
219
|
+
const s = t.calcMinHeight() + n.calcMinHeight();
|
|
220
|
+
return Math.max(this.minHeight, s);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
// Get self or descendant by id
|
|
@@ -262,8 +262,8 @@ class p {
|
|
|
262
262
|
set top(t) {
|
|
263
263
|
const i = t - this._top;
|
|
264
264
|
this._top = t;
|
|
265
|
-
const [n,
|
|
266
|
-
n &&
|
|
265
|
+
const [n, o, s, h] = this.getChildren();
|
|
266
|
+
n && s && (n.top += i, s.top += i), h && o && (h.top += i, o.top += i);
|
|
267
267
|
}
|
|
268
268
|
get left() {
|
|
269
269
|
return this._left;
|
|
@@ -271,8 +271,8 @@ class p {
|
|
|
271
271
|
set left(t) {
|
|
272
272
|
const i = t - this._left;
|
|
273
273
|
this._left = t;
|
|
274
|
-
const [n,
|
|
275
|
-
h &&
|
|
274
|
+
const [n, o, s, h] = this.getChildren();
|
|
275
|
+
h && o && (h.left += i, o.left += i), n && s && (n.left += i, s.left += i);
|
|
276
276
|
}
|
|
277
277
|
get width() {
|
|
278
278
|
return this._width;
|
|
@@ -280,14 +280,14 @@ class p {
|
|
|
280
280
|
set width(t) {
|
|
281
281
|
const i = t - this._width;
|
|
282
282
|
this._width = t;
|
|
283
|
-
const [n,
|
|
284
|
-
if (h &&
|
|
285
|
-
const l = h.width +
|
|
286
|
-
let c = h.width +
|
|
287
|
-
const E = h.calcMinWidth(), y =
|
|
288
|
-
i < 0 && (c < E &&
|
|
283
|
+
const [n, o, s, h] = this.getChildren();
|
|
284
|
+
if (h && o) {
|
|
285
|
+
const l = h.width + o.width, d = i * (h.width / l), a = l + i;
|
|
286
|
+
let c = h.width + d, p = a - c, u = o.left + d;
|
|
287
|
+
const E = h.calcMinWidth(), y = o.calcMinWidth();
|
|
288
|
+
i < 0 && (c < E && p > y ? (c = h.width, p = a - c, u = h.left + c) : p < y && c > E && (p = o.width, c = a - p, u = h.left + c)), h.width = c, o.width = p, o.left = u;
|
|
289
289
|
}
|
|
290
|
-
n &&
|
|
290
|
+
n && s && (n.width += i, s.width += i);
|
|
291
291
|
}
|
|
292
292
|
get height() {
|
|
293
293
|
return this._height;
|
|
@@ -295,17 +295,17 @@ class p {
|
|
|
295
295
|
set height(t) {
|
|
296
296
|
const i = t - this._height;
|
|
297
297
|
this._height = t;
|
|
298
|
-
const [n,
|
|
299
|
-
if (n &&
|
|
300
|
-
const l = n.height +
|
|
301
|
-
let c = n.height +
|
|
298
|
+
const [n, o, s, h] = this.getChildren();
|
|
299
|
+
if (n && s) {
|
|
300
|
+
const l = n.height + s.height, d = i * (n.height / l), a = l + i;
|
|
301
|
+
let c = n.height + d, p = a - c, u = s.top + d;
|
|
302
302
|
if (i < 0) {
|
|
303
|
-
const E = n.calcMinHeight(), y =
|
|
304
|
-
c < E &&
|
|
303
|
+
const E = n.calcMinHeight(), y = s.calcMinHeight();
|
|
304
|
+
c < E && p > y ? (c = n.height, p = a - c, u = n.top + c) : p < y && c > E && (p = s.height, c = a - p, u = n.top + c);
|
|
305
305
|
}
|
|
306
|
-
n.height = c,
|
|
306
|
+
n.height = c, s.height = p, s.top = u;
|
|
307
307
|
}
|
|
308
|
-
h &&
|
|
308
|
+
h && o && (h.height += i, o.height += i);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
const S = {
|
|
@@ -317,23 +317,23 @@ class A {
|
|
|
317
317
|
parentRect: t,
|
|
318
318
|
children: i,
|
|
319
319
|
siblingConfigNode: n,
|
|
320
|
-
id:
|
|
321
|
-
minWidth:
|
|
320
|
+
id: o,
|
|
321
|
+
minWidth: s,
|
|
322
322
|
minHeight: h,
|
|
323
323
|
position: l,
|
|
324
|
-
size:
|
|
325
|
-
...
|
|
324
|
+
size: d,
|
|
325
|
+
...a
|
|
326
326
|
}) {
|
|
327
327
|
f(this, "left");
|
|
328
328
|
f(this, "top");
|
|
329
329
|
f(this, "width");
|
|
330
330
|
f(this, "height");
|
|
331
|
-
this.parentRect = t, this.children = i, this.siblingConfigNode = n, this.id =
|
|
331
|
+
this.parentRect = t, this.children = i, this.siblingConfigNode = n, this.id = o, this.minWidth = s, this.minHeight = h, this.position = this.getPosition(l), this.size = this.getSize(d), this.nonCoreData = a, this.setBounds();
|
|
332
332
|
}
|
|
333
333
|
getPosition(t) {
|
|
334
334
|
if (!this.siblingConfigNode)
|
|
335
335
|
return t;
|
|
336
|
-
const i =
|
|
336
|
+
const i = G(this.siblingConfigNode.position);
|
|
337
337
|
if (!t)
|
|
338
338
|
return i;
|
|
339
339
|
if (t !== i)
|
|
@@ -342,7 +342,7 @@ class A {
|
|
|
342
342
|
}
|
|
343
343
|
getSize(t) {
|
|
344
344
|
if (!this.siblingConfigNode)
|
|
345
|
-
return
|
|
345
|
+
return b(t);
|
|
346
346
|
if (!t) {
|
|
347
347
|
if (this.siblingConfigNode.size < 1)
|
|
348
348
|
return 1 - this.siblingConfigNode.size;
|
|
@@ -351,7 +351,7 @@ class A {
|
|
|
351
351
|
if (this.siblingConfigNode.position === r.Top || this.siblingConfigNode.position === r.Bottom)
|
|
352
352
|
return this.parentRect.height - this.siblingConfigNode.height;
|
|
353
353
|
}
|
|
354
|
-
const i =
|
|
354
|
+
const i = b(t);
|
|
355
355
|
if (i < 1) {
|
|
356
356
|
if (i + this.siblingConfigNode.size !== 1)
|
|
357
357
|
throw new Error("[bwin] Sum of sibling sizes is not equal to 1");
|
|
@@ -381,7 +381,7 @@ class A {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
createSash() {
|
|
384
|
-
return new
|
|
384
|
+
return new g({
|
|
385
385
|
left: this.left,
|
|
386
386
|
top: this.top,
|
|
387
387
|
width: this.width,
|
|
@@ -401,7 +401,7 @@ class A {
|
|
|
401
401
|
children: t
|
|
402
402
|
};
|
|
403
403
|
if (typeof t == "string" || typeof t == "number") {
|
|
404
|
-
const i =
|
|
404
|
+
const i = b(t);
|
|
405
405
|
if (isNaN(i))
|
|
406
406
|
throw new Error(`[bwin] Invalid size value: ${i}`);
|
|
407
407
|
return {
|
|
@@ -413,27 +413,27 @@ class A {
|
|
|
413
413
|
throw new Error(`[bwin] Invalid config value: ${t}`);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
createPrimaryConfigNode({ size: t, position: i, children: n, id:
|
|
416
|
+
createPrimaryConfigNode({ size: t, position: i, children: n, id: o, minWidth: s, minHeight: h, ...l }) {
|
|
417
417
|
return new A({
|
|
418
418
|
parentRect: this,
|
|
419
419
|
size: t ?? S.size,
|
|
420
420
|
position: i ?? S.position,
|
|
421
421
|
children: n,
|
|
422
|
-
id:
|
|
423
|
-
minWidth:
|
|
422
|
+
id: o,
|
|
423
|
+
minWidth: s,
|
|
424
424
|
minHeight: h,
|
|
425
425
|
...l
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
createSecondaryConfigNode({ size: t, position: i, children: n, id:
|
|
428
|
+
createSecondaryConfigNode({ size: t, position: i, children: n, id: o, minWidth: s, minHeight: h, ...l }, d) {
|
|
429
429
|
return new A({
|
|
430
430
|
parentRect: this,
|
|
431
431
|
size: t,
|
|
432
432
|
position: i,
|
|
433
433
|
children: n,
|
|
434
|
-
siblingConfigNode:
|
|
435
|
-
id:
|
|
436
|
-
minWidth:
|
|
434
|
+
siblingConfigNode: d,
|
|
435
|
+
id: o,
|
|
436
|
+
minWidth: s,
|
|
437
437
|
minHeight: h,
|
|
438
438
|
...l
|
|
439
439
|
});
|
|
@@ -443,32 +443,32 @@ class A {
|
|
|
443
443
|
if (!Array.isArray(this.children) || this.children.length === 0)
|
|
444
444
|
return t;
|
|
445
445
|
const i = this.normConfig(this.children[0]), n = this.normConfig(this.children.at(1));
|
|
446
|
-
let
|
|
447
|
-
return !i.size && !i.position && n ? (n.position || (n.position = r.Right),
|
|
446
|
+
let o, s;
|
|
447
|
+
return !i.size && !i.position && n ? (n.position || (n.position = r.Right), o = this.createPrimaryConfigNode(n), s = this.createSecondaryConfigNode(
|
|
448
448
|
i,
|
|
449
|
-
|
|
450
|
-
)) : (
|
|
449
|
+
o
|
|
450
|
+
)) : (o = this.createPrimaryConfigNode(i), s = this.createSecondaryConfigNode(
|
|
451
451
|
n,
|
|
452
|
-
|
|
453
|
-
)),
|
|
452
|
+
o
|
|
453
|
+
)), o && s && (t.children.push(o.buildSashTree()), t.children.push(s.buildSashTree())), t;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
456
|
+
const z = {
|
|
457
457
|
width: 333,
|
|
458
458
|
height: 333
|
|
459
459
|
}, D = {
|
|
460
460
|
fitContainer: !1
|
|
461
461
|
};
|
|
462
|
-
class
|
|
462
|
+
class j extends A {
|
|
463
463
|
constructor({
|
|
464
464
|
id: t,
|
|
465
465
|
children: i,
|
|
466
|
-
width: n =
|
|
467
|
-
height:
|
|
468
|
-
fitContainer:
|
|
466
|
+
width: n = z.width,
|
|
467
|
+
height: o = z.height,
|
|
468
|
+
fitContainer: s = D.fitContainer,
|
|
469
469
|
...h
|
|
470
470
|
} = {
|
|
471
|
-
...
|
|
471
|
+
...z,
|
|
472
472
|
...D
|
|
473
473
|
}) {
|
|
474
474
|
super({
|
|
@@ -476,17 +476,17 @@ class K extends A {
|
|
|
476
476
|
children: i,
|
|
477
477
|
size: NaN,
|
|
478
478
|
position: r.Root,
|
|
479
|
-
parentRect: { width: n, height:
|
|
479
|
+
parentRect: { width: n, height: o },
|
|
480
480
|
...h
|
|
481
|
-
}), this.fitContainer =
|
|
481
|
+
}), this.fitContainer = s;
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
class
|
|
484
|
+
class K extends g {
|
|
485
485
|
constructor(t = w) {
|
|
486
486
|
super({ ...t, position: r.Root }), Object.assign(this, D);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function V(e) {
|
|
490
490
|
const t = document.createElement("bw-pane");
|
|
491
491
|
return t.style.top = `${e.top}px`, t.style.left = `${e.left}px`, t.style.width = `${e.width}px`, t.style.height = `${e.height}px`, t.setAttribute("sash-id", e.id), t.setAttribute("position", e.position), t;
|
|
492
492
|
}
|
|
@@ -494,95 +494,107 @@ function J(e) {
|
|
|
494
494
|
const t = e.domNode;
|
|
495
495
|
return t.style.top = `${e.top}px`, t.style.left = `${e.left}px`, t.style.width = `${e.width}px`, t.style.height = `${e.height}px`, t.setAttribute("position", e.position), t;
|
|
496
496
|
}
|
|
497
|
-
function Q(e, { size: t }) {
|
|
498
|
-
const
|
|
499
|
-
let
|
|
500
|
-
|
|
501
|
-
const s = new
|
|
497
|
+
function Q(e, { size: t, id: i }) {
|
|
498
|
+
const n = b(t);
|
|
499
|
+
let o = e.width / 2;
|
|
500
|
+
n && (n < 1 ? o = e.width * n : o = n);
|
|
501
|
+
const s = new g({
|
|
502
|
+
id: i,
|
|
502
503
|
top: e.top,
|
|
503
504
|
left: e.left,
|
|
504
|
-
width:
|
|
505
|
+
width: o,
|
|
505
506
|
height: e.height,
|
|
506
507
|
position: r.Left
|
|
507
|
-
}),
|
|
508
|
+
}), h = new g({
|
|
509
|
+
id: e.id,
|
|
508
510
|
top: e.top,
|
|
509
511
|
left: e.left + s.width,
|
|
510
|
-
width: e.width -
|
|
512
|
+
width: e.width - o,
|
|
511
513
|
height: e.height,
|
|
512
|
-
position: r.Right
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
514
|
+
position: r.Right,
|
|
515
|
+
domNode: e.domNode
|
|
516
|
+
});
|
|
517
|
+
return e.addChild(s), e.addChild(h), e.domNode = null, e.id = C(), s;
|
|
518
|
+
}
|
|
519
|
+
function Z(e, { size: t, id: i }) {
|
|
520
|
+
const n = b(t);
|
|
521
|
+
let o = e.width / 2;
|
|
522
|
+
n && (n < 1 ? o = e.width * n : o = n);
|
|
523
|
+
const s = new g({
|
|
524
|
+
id: e.id,
|
|
521
525
|
left: e.left,
|
|
522
526
|
top: e.top,
|
|
523
|
-
width: e.width -
|
|
527
|
+
width: e.width - o,
|
|
524
528
|
height: e.height,
|
|
525
|
-
position: r.Left
|
|
526
|
-
|
|
529
|
+
position: r.Left,
|
|
530
|
+
domNode: e.domNode
|
|
531
|
+
}), h = new g({
|
|
532
|
+
id: i,
|
|
527
533
|
left: e.left + s.width,
|
|
528
534
|
top: e.top,
|
|
529
|
-
width:
|
|
535
|
+
width: o,
|
|
530
536
|
height: e.height,
|
|
531
537
|
position: r.Right
|
|
532
|
-
})
|
|
533
|
-
return s
|
|
534
|
-
}
|
|
535
|
-
function tt(e, { size: t }) {
|
|
536
|
-
const
|
|
537
|
-
let
|
|
538
|
-
|
|
539
|
-
const s = new
|
|
538
|
+
});
|
|
539
|
+
return e.addChild(s), e.addChild(h), e.domNode = null, e.id = C(), h;
|
|
540
|
+
}
|
|
541
|
+
function tt(e, { size: t, id: i }) {
|
|
542
|
+
const n = b(t);
|
|
543
|
+
let o = e.height / 2;
|
|
544
|
+
n && (n < 1 ? o = e.height * n : o = n);
|
|
545
|
+
const s = new g({
|
|
546
|
+
id: i,
|
|
540
547
|
left: e.left,
|
|
541
548
|
top: e.top,
|
|
542
549
|
width: e.width,
|
|
543
|
-
height:
|
|
550
|
+
height: o,
|
|
544
551
|
position: r.Top
|
|
545
|
-
}),
|
|
552
|
+
}), h = new g({
|
|
553
|
+
id: e.id,
|
|
546
554
|
left: e.left,
|
|
547
555
|
top: e.top + s.height,
|
|
548
556
|
width: e.width,
|
|
549
|
-
height: e.height -
|
|
550
|
-
position: r.Bottom
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
557
|
+
height: e.height - o,
|
|
558
|
+
position: r.Bottom,
|
|
559
|
+
domNode: e.domNode
|
|
560
|
+
});
|
|
561
|
+
return e.addChild(s), e.addChild(h), e.domNode = null, e.id = C(), s;
|
|
562
|
+
}
|
|
563
|
+
function et(e, { size: t, id: i }) {
|
|
564
|
+
const n = b(t);
|
|
565
|
+
let o = e.height / 2;
|
|
566
|
+
n && (n < 1 ? o = e.height * n : o = n);
|
|
567
|
+
const s = new g({
|
|
568
|
+
id: e.id,
|
|
559
569
|
top: e.top,
|
|
560
570
|
left: e.left,
|
|
561
571
|
width: e.width,
|
|
562
|
-
height: e.height -
|
|
563
|
-
position: r.Top
|
|
564
|
-
|
|
572
|
+
height: e.height - o,
|
|
573
|
+
position: r.Top,
|
|
574
|
+
domNode: e.domNode
|
|
575
|
+
}), h = new g({
|
|
576
|
+
id: i,
|
|
565
577
|
top: e.top + s.height,
|
|
566
578
|
left: e.left,
|
|
567
579
|
width: e.width,
|
|
568
|
-
height:
|
|
580
|
+
height: o,
|
|
569
581
|
position: r.Bottom
|
|
570
|
-
})
|
|
571
|
-
return s
|
|
582
|
+
});
|
|
583
|
+
return e.addChild(s), e.addChild(h), e.domNode = null, e.id = C(), h;
|
|
572
584
|
}
|
|
573
|
-
function it(e, { position: t, size: i,
|
|
585
|
+
function it(e, { position: t, size: i, id: n, minWidth: o, minHeight: s }) {
|
|
574
586
|
if (t === r.Left)
|
|
575
|
-
return Q(e, { size: i });
|
|
587
|
+
return Q(e, { size: i, id: n });
|
|
576
588
|
if (t === r.Right)
|
|
577
|
-
return Z(e, { size: i });
|
|
589
|
+
return Z(e, { size: i, id: n });
|
|
578
590
|
if (t === r.Top)
|
|
579
|
-
return tt(e, { size: i });
|
|
591
|
+
return tt(e, { size: i, id: n });
|
|
580
592
|
if (t === r.Bottom)
|
|
581
|
-
return et(e, { size: i });
|
|
593
|
+
return et(e, { size: i, id: n });
|
|
582
594
|
}
|
|
583
595
|
const nt = {
|
|
584
596
|
createPane(e) {
|
|
585
|
-
const t =
|
|
597
|
+
const t = V(e);
|
|
586
598
|
return e.store.droppable === !1 && t.setAttribute("can-drop", "false"), t;
|
|
587
599
|
},
|
|
588
600
|
// Intended to be overridden
|
|
@@ -603,12 +615,12 @@ const nt = {
|
|
|
603
615
|
* @param {'top'|'right'|'bottom'|'left'} position - The position of the new pane relative to the target pane
|
|
604
616
|
* @returns {Sash} - The newly created sash
|
|
605
617
|
*/
|
|
606
|
-
addPane(e, { position: t, size: i }) {
|
|
618
|
+
addPane(e, { position: t, size: i, id: n }) {
|
|
607
619
|
if (!t) throw new Error("[bwin] Position is required when adding pane");
|
|
608
|
-
const
|
|
609
|
-
if (!
|
|
610
|
-
const s = it(
|
|
611
|
-
return
|
|
620
|
+
const o = this.rootSash.getById(e);
|
|
621
|
+
if (!o) throw new Error("[bwin] Parent sash not found when adding pane");
|
|
622
|
+
const s = it(o, { position: t, size: i, id: n });
|
|
623
|
+
return this.update(), s;
|
|
612
624
|
},
|
|
613
625
|
/**
|
|
614
626
|
* Remove a pane
|
|
@@ -619,7 +631,7 @@ const nt = {
|
|
|
619
631
|
const t = this.rootSash.getDescendantParentById(e);
|
|
620
632
|
if (!t) throw new Error("[bwin] Parent sash not found when removing pane");
|
|
621
633
|
const i = t.getChildSiblingById(e);
|
|
622
|
-
|
|
634
|
+
i.children.length === 0 ? (t.id = i.id, t.domNode = i.domNode, t.domNode.setAttribute("sash-id", i.id), t.children = []) : (t.id = C(), t.children = i.children, i.position === r.Left ? i.width = t.width : i.position === r.Right ? (i.width = t.width, i.left = t.left) : i.position === r.Top ? i.height = t.height : i.position === r.Bottom && (i.height = t.height, i.top = t.top)), this.update();
|
|
623
635
|
}
|
|
624
636
|
};
|
|
625
637
|
function v(e) {
|
|
@@ -635,7 +647,7 @@ height: ${e.style.height}
|
|
|
635
647
|
`;
|
|
636
648
|
return t.innerHTML = i.trim(), t;
|
|
637
649
|
}
|
|
638
|
-
const
|
|
650
|
+
const ot = {
|
|
639
651
|
createWindow() {
|
|
640
652
|
const e = document.createElement("bw-window");
|
|
641
653
|
return e.style.width = `${this.rootSash.width}px`, e.style.height = `${this.rootSash.height}px`, e.setAttribute("root-sash-id", this.rootSash.id), e;
|
|
@@ -656,7 +668,7 @@ const st = {
|
|
|
656
668
|
i.children.length > 0 ? t.includes(i.id) ? (this.updateMuntin(i), this.onMuntinUpdate(i.domNode, i)) : (i.domNode = this.createMuntin(i), this.windowElement.append(i.domNode)) : t.includes(i.id) ? (this.updatePane(i), this.onPaneUpdate(i.domNode, i)) : (i.domNode || (i.domNode = this.createPane(i)), this.windowElement.prepend(i.domNode));
|
|
657
669
|
});
|
|
658
670
|
}
|
|
659
|
-
},
|
|
671
|
+
}, st = {
|
|
660
672
|
muntinSize: 4,
|
|
661
673
|
createMuntin(e) {
|
|
662
674
|
const t = document.createElement("bw-muntin"), i = e.leftChild, n = e.topChild;
|
|
@@ -700,15 +712,15 @@ const st = {
|
|
|
700
712
|
this.activeMuntinSash = this.rootSash.getById(t), this.activeMuntinSash && (this.isResizeStarted = !0, this.lastX = e.pageX, this.lastY = e.pageY, this.applyResizeStyles());
|
|
701
713
|
}), document.addEventListener("mousemove", (e) => {
|
|
702
714
|
if (!this.isResizeStarted || !this.activeMuntinSash) return;
|
|
703
|
-
const [t, i, n,
|
|
704
|
-
if (
|
|
705
|
-
const l = e.pageX - this.lastX,
|
|
706
|
-
if (l > 0 &&
|
|
707
|
-
|
|
715
|
+
const [t, i, n, o] = this.activeMuntinSash.getChildren(), s = this.activeMuntinSash.isLeftRightSplit(), h = this.activeMuntinSash.isTopBottomSplit();
|
|
716
|
+
if (s && o && i) {
|
|
717
|
+
const l = e.pageX - this.lastX, d = o.width + l, a = i.width - l;
|
|
718
|
+
if (l > 0 && a <= i.calcMinWidth() || l < 0 && d <= o.calcMinWidth()) return;
|
|
719
|
+
o.width = d, i.width = a, i.left = i.left + l, this.update(), this.lastX = e.pageX;
|
|
708
720
|
} else if (h && t && n) {
|
|
709
|
-
const l = e.pageY - this.lastY,
|
|
710
|
-
if (l > 0 &&
|
|
711
|
-
t.height =
|
|
721
|
+
const l = e.pageY - this.lastY, d = t.height + l, a = n.height - l;
|
|
722
|
+
if (l > 0 && a <= n.calcMinHeight() || l < 0 && d <= t.calcMinHeight()) return;
|
|
723
|
+
t.height = d, n.height = a, n.top = n.top + l, this.update(), this.lastY = e.pageY;
|
|
712
724
|
}
|
|
713
725
|
}), document.addEventListener("mouseup", () => {
|
|
714
726
|
this.isResizeStarted = !1, this.activeMuntinSash = null, this.revertResizeStyles();
|
|
@@ -724,7 +736,7 @@ const st = {
|
|
|
724
736
|
e.preventDefault();
|
|
725
737
|
const t = e.target.matches("bw-pane") ? e.target : e.target.closest("bw-pane");
|
|
726
738
|
if (!t || (t !== this.activeDropPaneEl && (this.activeDropPaneEl && this.activeDropPaneEl.removeAttribute("drop-area"), this.activeDropPaneEl = t), t.getAttribute("can-drop") === "false")) return;
|
|
727
|
-
const i =
|
|
739
|
+
const i = Y(t, e);
|
|
728
740
|
t.setAttribute("drop-area", i);
|
|
729
741
|
}), this.windowElement.addEventListener("dragleave", (e) => {
|
|
730
742
|
e.currentTarget.contains(e.relatedTarget) && e.currentTarget !== e.relatedTarget || this.activeDropPaneEl && (this.activeDropPaneEl.removeAttribute("drop-area"), this.activeDropPaneEl = null);
|
|
@@ -734,14 +746,14 @@ const st = {
|
|
|
734
746
|
this.onPaneDrop(e, i), typeof i.store.onDrop == "function" && i.store.onDrop(e, i), this.activeDropPaneEl.removeAttribute("drop-area"), this.activeDropPaneEl = null;
|
|
735
747
|
});
|
|
736
748
|
}
|
|
737
|
-
},
|
|
749
|
+
}, dt = !1;
|
|
738
750
|
class T {
|
|
739
751
|
constructor(t) {
|
|
740
752
|
f(this, "windowElement", null);
|
|
741
753
|
f(this, "containerElement", null);
|
|
742
|
-
f(this, "debug",
|
|
754
|
+
f(this, "debug", dt);
|
|
743
755
|
let i = null;
|
|
744
|
-
t instanceof
|
|
756
|
+
t instanceof K ? (i = t, this.rootSash = t) : (i = new j(t), this.rootSash = i.buildSashTree()), this.fitContainer = i.fitContainer;
|
|
745
757
|
}
|
|
746
758
|
frame(t) {
|
|
747
759
|
this.containerElement = t, this.windowElement = this.createWindow(), this.glaze(), this.containerElement.append(this.windowElement);
|
|
@@ -755,13 +767,13 @@ class T {
|
|
|
755
767
|
}
|
|
756
768
|
static assemble(...t) {
|
|
757
769
|
t.forEach((i) => {
|
|
758
|
-
|
|
770
|
+
P(this.prototype, i);
|
|
759
771
|
});
|
|
760
772
|
}
|
|
761
773
|
}
|
|
762
774
|
T.assemble(
|
|
763
|
-
st,
|
|
764
775
|
ot,
|
|
776
|
+
st,
|
|
765
777
|
nt,
|
|
766
778
|
ht,
|
|
767
779
|
lt,
|
|
@@ -775,7 +787,7 @@ function L(e) {
|
|
|
775
787
|
throw new Error("[bwin] Pane element not found");
|
|
776
788
|
return t.getAttribute("sash-id");
|
|
777
789
|
}
|
|
778
|
-
const
|
|
790
|
+
const at = {
|
|
779
791
|
label: "",
|
|
780
792
|
className: "bw-glass-action--close",
|
|
781
793
|
onClick: (e, t) => {
|
|
@@ -790,54 +802,54 @@ const dt = {
|
|
|
790
802
|
if (!i) throw new Error("[bwin] Sill element not found when minimizing");
|
|
791
803
|
const n = m('<button class="bw-minimized-glass" />');
|
|
792
804
|
i.append(n);
|
|
793
|
-
const
|
|
794
|
-
n.bwGlassElement =
|
|
805
|
+
const o = e.target.closest("bw-pane"), s = e.target.closest("bw-glass"), h = o.getAttribute("sash-id"), l = o.getAttribute("position");
|
|
806
|
+
n.bwGlassElement = s, n.bwOriginalPosition = l, n.bwOriginalBoundingRect = M(o), t.removePane(h);
|
|
795
807
|
}
|
|
796
|
-
},
|
|
808
|
+
}, pt = {
|
|
797
809
|
label: "",
|
|
798
810
|
className: "bw-glass-action--maximize",
|
|
799
811
|
onClick: (e) => {
|
|
800
812
|
const t = e.target.closest("bw-pane");
|
|
801
|
-
t.hasAttribute("maximized") ? (t.removeAttribute("maximized"), t.style.left = `${t.bwOriginalBoundingRect.left}px`, t.style.top = `${t.bwOriginalBoundingRect.top}px`, t.style.width = `${t.bwOriginalBoundingRect.width}px`, t.style.height = `${t.bwOriginalBoundingRect.height}px`) : (t.setAttribute("maximized", ""), t.bwOriginalBoundingRect =
|
|
813
|
+
t.hasAttribute("maximized") ? (t.removeAttribute("maximized"), t.style.left = `${t.bwOriginalBoundingRect.left}px`, t.style.top = `${t.bwOriginalBoundingRect.top}px`, t.style.width = `${t.bwOriginalBoundingRect.width}px`, t.style.height = `${t.bwOriginalBoundingRect.height}px`) : (t.setAttribute("maximized", ""), t.bwOriginalBoundingRect = M(t), t.style.left = "0", t.style.top = "0", t.style.width = "100%", t.style.height = "100%");
|
|
802
814
|
}
|
|
803
815
|
};
|
|
804
816
|
function ut(e, t) {
|
|
805
|
-
const i = e.left + e.width, n = e.top + e.height,
|
|
806
|
-
if (e.left >=
|
|
817
|
+
const i = e.left + e.width, n = e.top + e.height, o = t.left + t.width, s = t.top + t.height;
|
|
818
|
+
if (e.left >= o || t.left >= i || e.top >= s || t.top >= n)
|
|
807
819
|
return null;
|
|
808
|
-
const h = Math.max(e.left, t.left), l = Math.max(e.top, t.top),
|
|
820
|
+
const h = Math.max(e.left, t.left), l = Math.max(e.top, t.top), d = Math.min(i, o), a = Math.min(n, s);
|
|
809
821
|
return {
|
|
810
822
|
left: h,
|
|
811
823
|
top: l,
|
|
812
|
-
width:
|
|
813
|
-
height:
|
|
824
|
+
width: d - h,
|
|
825
|
+
height: a - l
|
|
814
826
|
};
|
|
815
827
|
}
|
|
816
|
-
const ft = [ct,
|
|
828
|
+
const ft = [ct, pt, at], gt = {
|
|
817
829
|
enableActions() {
|
|
818
830
|
this.handleMinimizedGlassClick(), this.observeActionButtons();
|
|
819
831
|
},
|
|
820
832
|
restoreGlass(e) {
|
|
821
833
|
const t = e.bwOriginalBoundingRect;
|
|
822
834
|
let i = 0, n = null;
|
|
823
|
-
if (this.windowElement.querySelectorAll("bw-pane").forEach((
|
|
824
|
-
const
|
|
835
|
+
if (this.windowElement.querySelectorAll("bw-pane").forEach((o) => {
|
|
836
|
+
const s = M(o), h = ut(t, s);
|
|
825
837
|
if (h) {
|
|
826
838
|
const l = h.width * h.height;
|
|
827
|
-
l > i && (i = l, n =
|
|
839
|
+
l > i && (i = l, n = o);
|
|
828
840
|
}
|
|
829
841
|
}), n) {
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
if (
|
|
833
|
-
|
|
834
|
-
else if (
|
|
835
|
-
|
|
842
|
+
const o = e.bwOriginalPosition, s = M(n), h = n.getAttribute("sash-id"), l = this.rootSash.getById(h);
|
|
843
|
+
let d = 0;
|
|
844
|
+
if (o === r.Left || o === r.Right)
|
|
845
|
+
d = s.width - t.width < l.minWidth ? s.width / 2 : t.width;
|
|
846
|
+
else if (o === r.Top || o === r.Bottom)
|
|
847
|
+
d = s.height - t.height < l.minHeight ? s.height / 2 : t.height;
|
|
836
848
|
else
|
|
837
849
|
throw new Error("[bwin] Invalid position when restoring glass");
|
|
838
850
|
this.addPane(n.getAttribute("sash-id"), {
|
|
839
|
-
position:
|
|
840
|
-
size:
|
|
851
|
+
position: o,
|
|
852
|
+
size: d
|
|
841
853
|
}).domNode.append(e.bwGlassElement);
|
|
842
854
|
}
|
|
843
855
|
},
|
|
@@ -881,21 +893,21 @@ class x {
|
|
|
881
893
|
title: t = N.title,
|
|
882
894
|
content: i = N.content,
|
|
883
895
|
tabs: n = N.tabs,
|
|
884
|
-
actions:
|
|
885
|
-
draggable:
|
|
896
|
+
actions: o = N.actions,
|
|
897
|
+
draggable: s = N.draggable,
|
|
886
898
|
sash: h,
|
|
887
899
|
binaryWindow: l
|
|
888
900
|
}) {
|
|
889
901
|
f(this, "domNode");
|
|
890
|
-
this.title = t, this.content = i, this.tabs = n, this.actions =
|
|
902
|
+
this.title = t, this.content = i, this.tabs = n, this.actions = o, this.sash = h, this.draggable = s, this.binaryWindow = l, this.build();
|
|
891
903
|
}
|
|
892
904
|
build() {
|
|
893
905
|
const t = document.createElement("bw-glass-header");
|
|
894
906
|
if (Array.isArray(this.tabs) && this.tabs.length > 0)
|
|
895
907
|
t.append(this.createTabs());
|
|
896
908
|
else if (this.title) {
|
|
897
|
-
const
|
|
898
|
-
|
|
909
|
+
const o = document.createElement("bw-glass-title");
|
|
910
|
+
o.append(m(this.title)), t.append(o);
|
|
899
911
|
}
|
|
900
912
|
t.setAttribute("can-drag", this.draggable), t.append(this.createActions());
|
|
901
913
|
const i = document.createElement("bw-glass-content"), n = m(this.content);
|
|
@@ -904,15 +916,15 @@ class x {
|
|
|
904
916
|
createTabs() {
|
|
905
917
|
const t = document.createElement("bw-glass-tab-container");
|
|
906
918
|
for (const i of this.tabs) {
|
|
907
|
-
const n = (i == null ? void 0 : i.label) ?? i,
|
|
908
|
-
t.append(
|
|
919
|
+
const n = (i == null ? void 0 : i.label) ?? i, o = m(`<button class="bw-glass-tab">${n}</button>`);
|
|
920
|
+
t.append(o);
|
|
909
921
|
}
|
|
910
922
|
return t;
|
|
911
923
|
}
|
|
912
924
|
createActions() {
|
|
913
925
|
const t = document.createElement("bw-glass-action-container"), i = this.actions === void 0 ? ft : Array.isArray(this.actions) ? this.actions : [];
|
|
914
926
|
for (const n of i) {
|
|
915
|
-
const
|
|
927
|
+
const o = (n == null ? void 0 : n.label) ?? n, s = n.className ? `bw-glass-action ${n.className}` : "bw-glass-action", h = m(`<button class="${s}">${o}</button>`);
|
|
916
928
|
typeof n.onClick == "function" && h.addEventListener("click", (l) => {
|
|
917
929
|
n.onClick(l, this.binaryWindow);
|
|
918
930
|
}), t.append(h);
|
|
@@ -933,8 +945,8 @@ const wt = {
|
|
|
933
945
|
if (!this.activeDragGlassEl) return;
|
|
934
946
|
const i = this.activeDropPaneEl.getAttribute("drop-area");
|
|
935
947
|
if (i === "center") {
|
|
936
|
-
const n = this.activeDragGlassEl.closest("bw-pane"),
|
|
937
|
-
H(n, this.activeDropPaneEl), n.setAttribute("can-drop",
|
|
948
|
+
const n = this.activeDragGlassEl.closest("bw-pane"), o = this.activeDropPaneEl.getAttribute("can-drop") !== "false";
|
|
949
|
+
H(n, this.activeDropPaneEl), n.setAttribute("can-drop", o);
|
|
938
950
|
return;
|
|
939
951
|
} else {
|
|
940
952
|
const n = L(this.activeDragGlassEl);
|
|
@@ -987,8 +999,8 @@ class bt extends T {
|
|
|
987
999
|
super.enableFeatures(), this.enableDrag(), this.enableActions();
|
|
988
1000
|
}
|
|
989
1001
|
onPaneCreate(i, n) {
|
|
990
|
-
const
|
|
991
|
-
i.innerHTML = "", i.append(
|
|
1002
|
+
const o = new x({ ...n.store, sash: n, binaryWindow: this });
|
|
1003
|
+
i.innerHTML = "", i.append(o.domNode), this.debug && o.contentElement.prepend(`${n.id}`);
|
|
992
1004
|
}
|
|
993
1005
|
onPaneUpdate() {
|
|
994
1006
|
}
|
|
@@ -1000,17 +1012,17 @@ class bt extends T {
|
|
|
1000
1012
|
* @returns {Sash} - The newly created Sash
|
|
1001
1013
|
*/
|
|
1002
1014
|
addPane(i, n) {
|
|
1003
|
-
const { position:
|
|
1004
|
-
return
|
|
1015
|
+
const { position: o, size: s, id: h, ...l } = n, d = super.addPane(i, { position: o, size: s, id: h }), a = new x({ ...l, sash: d, binaryWindow: this });
|
|
1016
|
+
return d.domNode.append(a.domNode), d;
|
|
1005
1017
|
}
|
|
1006
1018
|
}
|
|
1007
|
-
bt.assemble(wt, mt,
|
|
1019
|
+
bt.assemble(wt, mt, gt);
|
|
1008
1020
|
export {
|
|
1009
1021
|
ft as BUILTIN_ACTIONS,
|
|
1010
1022
|
bt as BinaryWindow,
|
|
1011
|
-
|
|
1023
|
+
j as ConfigRoot,
|
|
1012
1024
|
T as Frame,
|
|
1013
1025
|
r as Position,
|
|
1014
|
-
|
|
1015
|
-
|
|
1026
|
+
g as Sash,
|
|
1027
|
+
K as SashConfig
|
|
1016
1028
|
};
|