@deephaven/golden-layout 0.17.1-beta.2 → 0.17.1-beta.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/LayoutManager.js +1140 -0
- package/dist/LayoutManager.js.map +1 -0
- package/dist/base.js +16 -0
- package/dist/base.js.map +1 -0
- package/dist/config/ItemDefaultConfig.js +8 -0
- package/dist/config/ItemDefaultConfig.js.map +1 -0
- package/dist/config/defaultConfig.js +42 -0
- package/dist/config/defaultConfig.js.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/container/ItemContainer.js +192 -0
- package/dist/container/ItemContainer.js.map +1 -0
- package/dist/container/index.js +5 -0
- package/dist/container/index.js.map +1 -0
- package/dist/controls/BrowserPopout.js +260 -0
- package/dist/controls/BrowserPopout.js.map +1 -0
- package/dist/controls/DragProxy.js +236 -0
- package/dist/controls/DragProxy.js.map +1 -0
- package/dist/controls/DragSource.js +60 -0
- package/dist/controls/DragSource.js.map +1 -0
- package/dist/controls/DragSourceFromEvent.js +75 -0
- package/dist/controls/DragSourceFromEvent.js.map +1 -0
- package/dist/controls/DropTargetIndicator.js +28 -0
- package/dist/controls/DropTargetIndicator.js.map +1 -0
- package/dist/controls/Header.js +698 -0
- package/dist/controls/Header.js.map +1 -0
- package/dist/controls/HeaderButton.js +23 -0
- package/dist/controls/HeaderButton.js.map +1 -0
- package/dist/controls/Splitter.js +45 -0
- package/dist/controls/Splitter.js.map +1 -0
- package/dist/controls/Tab.js +259 -0
- package/dist/controls/Tab.js.map +1 -0
- package/dist/controls/TransitionIndicator.js +64 -0
- package/dist/controls/TransitionIndicator.js.map +1 -0
- package/dist/controls/index.js +23 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/errors/ConfigurationError.js +10 -0
- package/dist/errors/ConfigurationError.js.map +1 -0
- package/dist/errors/index.js +5 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/items/AbstractContentItem.js +617 -0
- package/dist/items/AbstractContentItem.js.map +1 -0
- package/dist/items/Component.js +84 -0
- package/dist/items/Component.js.map +1 -0
- package/dist/items/Root.js +93 -0
- package/dist/items/Root.js.map +1 -0
- package/dist/items/RowOrColumn.js +550 -0
- package/dist/items/RowOrColumn.js.map +1 -0
- package/dist/items/Stack.js +498 -0
- package/dist/items/Stack.js.map +1 -0
- package/dist/items/index.js +13 -0
- package/dist/items/index.js.map +1 -0
- package/dist/utils/BubblingEvent.js +12 -0
- package/dist/utils/BubblingEvent.js.map +1 -0
- package/dist/utils/ConfigMinifier.js +160 -0
- package/dist/utils/ConfigMinifier.js.map +1 -0
- package/dist/utils/DragListener.js +128 -0
- package/dist/utils/DragListener.js.map +1 -0
- package/dist/utils/EventEmitter.js +133 -0
- package/dist/utils/EventEmitter.js.map +1 -0
- package/dist/utils/EventHub.js +147 -0
- package/dist/utils/EventHub.js.map +1 -0
- package/dist/utils/ReactComponentHandler.js +135 -0
- package/dist/utils/ReactComponentHandler.js.map +1 -0
- package/dist/utils/index.js +22 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/utils.js +195 -0
- package/dist/utils/utils.js.map +1 -0
- package/package.json +20 -47
- package/dist/goldenlayout.js +0 -6314
- package/dist/goldenlayout.min.js +0 -1
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
import $ from 'jquery';
|
|
2
|
+
import AbstractContentItem from './AbstractContentItem.js';
|
|
3
|
+
import utils from '../utils/index.js';
|
|
4
|
+
import controls from '../controls/index.js';
|
|
5
|
+
|
|
6
|
+
var Stack = function Stack(layoutManager, config, parent) {
|
|
7
|
+
AbstractContentItem.call(this, layoutManager, config, parent);
|
|
8
|
+
this.element = $('<div class="lm_item lm_stack"></div>');
|
|
9
|
+
this._activeContentItem = null;
|
|
10
|
+
var cfg = layoutManager.config;
|
|
11
|
+
this._header = {
|
|
12
|
+
// defaults' reconstruction from old configuration style
|
|
13
|
+
show: cfg.settings.hasHeaders === true && config.hasHeaders !== false,
|
|
14
|
+
popout: cfg.settings.showPopoutIcon && cfg.labels.popout,
|
|
15
|
+
maximise: cfg.settings.showMaximiseIcon && cfg.labels.maximise,
|
|
16
|
+
close: cfg.settings.showCloseIcon && cfg.labels.close,
|
|
17
|
+
minimise: cfg.labels.minimise
|
|
18
|
+
}; // load simplified version of header configuration (https://github.com/deepstreamIO/golden-layout/pull/245)
|
|
19
|
+
|
|
20
|
+
if (cfg.header) utils.copy(this._header, cfg.header);
|
|
21
|
+
if (config.header) // load from stack
|
|
22
|
+
utils.copy(this._header, config.header);
|
|
23
|
+
if (config.content && config.content[0] && config.content[0].header) // load from component if stack omitted
|
|
24
|
+
utils.copy(this._header, config.content[0].header);
|
|
25
|
+
this._dropZones = {};
|
|
26
|
+
this._dropSegment = null;
|
|
27
|
+
this._contentAreaDimensions = null;
|
|
28
|
+
this._dropIndex = null;
|
|
29
|
+
this.isStack = true;
|
|
30
|
+
this.childElementContainer = $('<div class="lm_items"></div>');
|
|
31
|
+
this.header = new controls.Header(layoutManager, this);
|
|
32
|
+
this.element.append(this.header.element);
|
|
33
|
+
this.element.append(this.childElementContainer);
|
|
34
|
+
|
|
35
|
+
this._setupHeaderPosition();
|
|
36
|
+
|
|
37
|
+
this._$validateClosability();
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
utils.extend(Stack, AbstractContentItem);
|
|
41
|
+
utils.copy(Stack.prototype, {
|
|
42
|
+
setSize: function setSize() {
|
|
43
|
+
var i,
|
|
44
|
+
headerSize = this._header.show ? this.layoutManager.config.dimensions.headerHeight : 0,
|
|
45
|
+
contentWidth = this.element.width() - (this._sided ? headerSize : 0),
|
|
46
|
+
contentHeight = this.element.height() - (!this._sided ? headerSize : 0);
|
|
47
|
+
this.childElementContainer.width(contentWidth);
|
|
48
|
+
this.childElementContainer.height(contentHeight);
|
|
49
|
+
|
|
50
|
+
for (i = 0; i < this.contentItems.length; i++) {
|
|
51
|
+
this.contentItems[i].element.width(contentWidth).height(contentHeight);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
this.emit('resize');
|
|
55
|
+
this.emitBubblingEvent('stateChanged');
|
|
56
|
+
},
|
|
57
|
+
_$init: function _$init() {
|
|
58
|
+
var i, initialItem;
|
|
59
|
+
if (this.isInitialised === true) return;
|
|
60
|
+
|
|
61
|
+
this.header._attachWheelListener();
|
|
62
|
+
|
|
63
|
+
AbstractContentItem.prototype._$init.call(this);
|
|
64
|
+
|
|
65
|
+
for (i = 0; i < this.contentItems.length; i++) {
|
|
66
|
+
this.header.createTab(this.contentItems[i]);
|
|
67
|
+
|
|
68
|
+
this.contentItems[i]._$hide();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (this.contentItems.length > 0) {
|
|
72
|
+
initialItem = this.contentItems[this.config.activeItemIndex || 0];
|
|
73
|
+
|
|
74
|
+
if (!initialItem) {
|
|
75
|
+
throw new Error('Configured activeItemIndex out of bounds');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
this.setActiveContentItem(initialItem);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
setActiveContentItem: function setActiveContentItem(contentItem) {
|
|
82
|
+
if (utils.indexOf(contentItem, this.contentItems) === -1) {
|
|
83
|
+
throw new Error('contentItem is not a child of this stack');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (this._activeContentItem !== null) {
|
|
87
|
+
this._activeContentItem._$hide();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this._activeContentItem = contentItem;
|
|
91
|
+
this.header.setActiveContentItem(contentItem);
|
|
92
|
+
|
|
93
|
+
contentItem._$show();
|
|
94
|
+
|
|
95
|
+
this.emit('activeContentItemChanged', contentItem);
|
|
96
|
+
this.layoutManager.emit('activeContentItemChanged', contentItem);
|
|
97
|
+
this.emitBubblingEvent('stateChanged');
|
|
98
|
+
},
|
|
99
|
+
getActiveContentItem: function getActiveContentItem() {
|
|
100
|
+
return this.header.activeContentItem;
|
|
101
|
+
},
|
|
102
|
+
addChild: function addChild(contentItem, index) {
|
|
103
|
+
contentItem = this.layoutManager._$normalizeContentItem(contentItem, this);
|
|
104
|
+
AbstractContentItem.prototype.addChild.call(this, contentItem, index);
|
|
105
|
+
this.childElementContainer.append(contentItem.element);
|
|
106
|
+
this.header.createTab(contentItem, index);
|
|
107
|
+
this.setActiveContentItem(contentItem);
|
|
108
|
+
this.callDownwards('setSize');
|
|
109
|
+
|
|
110
|
+
this._$validateClosability();
|
|
111
|
+
|
|
112
|
+
this.emitBubblingEvent('stateChanged');
|
|
113
|
+
},
|
|
114
|
+
removeChild: function removeChild(contentItem, keepChild) {
|
|
115
|
+
var index = utils.indexOf(contentItem, this.contentItems);
|
|
116
|
+
AbstractContentItem.prototype.removeChild.call(this, contentItem, keepChild);
|
|
117
|
+
this.header.removeTab(contentItem);
|
|
118
|
+
|
|
119
|
+
if (this.header.activeContentItem === contentItem) {
|
|
120
|
+
if (this.contentItems.length > 0) {
|
|
121
|
+
this.setActiveContentItem(this.contentItems[Math.max(index - 1, 0)]);
|
|
122
|
+
} else {
|
|
123
|
+
this._activeContentItem = null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this._$validateClosability();
|
|
128
|
+
|
|
129
|
+
this.emitBubblingEvent('stateChanged');
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Validates that the stack is still closable or not. If a stack is able
|
|
134
|
+
* to close, but has a non closable component added to it, the stack is no
|
|
135
|
+
* longer closable until all components are closable.
|
|
136
|
+
*
|
|
137
|
+
* @returns {void}
|
|
138
|
+
*/
|
|
139
|
+
_$validateClosability: function _$validateClosability() {
|
|
140
|
+
var isClosable, len, i;
|
|
141
|
+
isClosable = this.header._isClosable();
|
|
142
|
+
|
|
143
|
+
for (i = 0, len = this.contentItems.length; i < len; i++) {
|
|
144
|
+
if (!isClosable) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
isClosable = this.contentItems[i].config.isClosable;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
this.header._$setClosable(isClosable);
|
|
152
|
+
},
|
|
153
|
+
_$destroy: function _$destroy() {
|
|
154
|
+
AbstractContentItem.prototype._$destroy.call(this);
|
|
155
|
+
|
|
156
|
+
this.header._$destroy();
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Ok, this one is going to be the tricky one: The user has dropped {contentItem} onto this stack.
|
|
161
|
+
*
|
|
162
|
+
* It was dropped on either the stacks header or the top, right, bottom or left bit of the content area
|
|
163
|
+
* (which one of those is stored in this._dropSegment). Now, if the user has dropped on the header the case
|
|
164
|
+
* is relatively clear: We add the item to the existing stack... job done (might be good to have
|
|
165
|
+
* tab reordering at some point, but lets not sweat it right now)
|
|
166
|
+
*
|
|
167
|
+
* If the item was dropped on the content part things are a bit more complicated. If it was dropped on either the
|
|
168
|
+
* top or bottom region we need to create a new column and place the items accordingly.
|
|
169
|
+
* Unless, of course if the stack is already within a column... in which case we want
|
|
170
|
+
* to add the newly created item to the existing column...
|
|
171
|
+
* either prepend or append it, depending on wether its top or bottom.
|
|
172
|
+
*
|
|
173
|
+
* Same thing for rows and left / right drop segments... so in total there are 9 things that can potentially happen
|
|
174
|
+
* (left, top, right, bottom) * is child of the right parent (row, column) + header drop
|
|
175
|
+
*
|
|
176
|
+
* @param {lm.item} contentItem
|
|
177
|
+
*
|
|
178
|
+
* @returns {void}
|
|
179
|
+
*/
|
|
180
|
+
_$onDrop: function _$onDrop(contentItem) {
|
|
181
|
+
/*
|
|
182
|
+
* The item was dropped on the header area. Just add it as a child of this stack and
|
|
183
|
+
* get the hell out of this logic
|
|
184
|
+
*/
|
|
185
|
+
if (this._dropSegment === 'header') {
|
|
186
|
+
this._resetHeaderDropZone();
|
|
187
|
+
|
|
188
|
+
this.addChild(contentItem, this._dropIndex);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
/*
|
|
192
|
+
* The stack is empty. Let's just add the element.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
if (this._dropSegment === 'body') {
|
|
197
|
+
this.addChild(contentItem);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
/*
|
|
201
|
+
* The item was dropped on the top-, left-, bottom- or right- part of the content. Let's
|
|
202
|
+
* aggregate some conditions to make the if statements later on more readable
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
var isVertical = this._dropSegment === 'top' || this._dropSegment === 'bottom',
|
|
207
|
+
isHorizontal = this._dropSegment === 'left' || this._dropSegment === 'right',
|
|
208
|
+
insertBefore = this._dropSegment === 'top' || this._dropSegment === 'left',
|
|
209
|
+
hasCorrectParent = isVertical && this.parent.isColumn || isHorizontal && this.parent.isRow,
|
|
210
|
+
type = isVertical ? 'column' : 'row',
|
|
211
|
+
dimension = isVertical ? 'height' : 'width',
|
|
212
|
+
index,
|
|
213
|
+
stack,
|
|
214
|
+
rowOrColumn;
|
|
215
|
+
/*
|
|
216
|
+
* The content item can be either a component or a stack. If it is a component, wrap it into a stack
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
if (contentItem.isComponent) {
|
|
220
|
+
stack = this.layoutManager.createContentItem({
|
|
221
|
+
type: 'stack',
|
|
222
|
+
header: contentItem.config.header || {}
|
|
223
|
+
}, this);
|
|
224
|
+
|
|
225
|
+
stack._$init();
|
|
226
|
+
|
|
227
|
+
stack.addChild(contentItem);
|
|
228
|
+
contentItem = stack;
|
|
229
|
+
}
|
|
230
|
+
/*
|
|
231
|
+
* If the item is dropped on top or bottom of a column or left and right of a row, it's already
|
|
232
|
+
* layd out in the correct way. Just add it as a child
|
|
233
|
+
*/
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
if (hasCorrectParent) {
|
|
237
|
+
index = utils.indexOf(this, this.parent.contentItems);
|
|
238
|
+
this.parent.addChild(contentItem, insertBefore ? index : index + 1, true);
|
|
239
|
+
this.config[dimension] *= 0.5;
|
|
240
|
+
contentItem.config[dimension] = this.config[dimension];
|
|
241
|
+
this.parent.callDownwards('setSize');
|
|
242
|
+
/*
|
|
243
|
+
* This handles items that are dropped on top or bottom of a row or left / right of a column. We need
|
|
244
|
+
* to create the appropriate contentItem for them to live in
|
|
245
|
+
*/
|
|
246
|
+
} else {
|
|
247
|
+
type = isVertical ? 'column' : 'row';
|
|
248
|
+
rowOrColumn = this.layoutManager.createContentItem({
|
|
249
|
+
type: type
|
|
250
|
+
}, this);
|
|
251
|
+
this.parent.replaceChild(this, rowOrColumn);
|
|
252
|
+
rowOrColumn.addChild(contentItem, insertBefore ? 0 : undefined, true);
|
|
253
|
+
rowOrColumn.addChild(this, insertBefore ? undefined : 0, true);
|
|
254
|
+
this.config[dimension] = 50;
|
|
255
|
+
contentItem.config[dimension] = 50;
|
|
256
|
+
rowOrColumn.callDownwards('setSize');
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* If the user hovers above the header part of the stack, indicate drop positions for tabs.
|
|
262
|
+
* otherwise indicate which segment of the body the dragged item would be dropped on
|
|
263
|
+
*
|
|
264
|
+
* @param {Int} x Absolute Screen X
|
|
265
|
+
* @param {Int} y Absolute Screen Y
|
|
266
|
+
*
|
|
267
|
+
* @returns {void}
|
|
268
|
+
*/
|
|
269
|
+
_$highlightDropZone: function _$highlightDropZone(x, y) {
|
|
270
|
+
var segment, area;
|
|
271
|
+
|
|
272
|
+
for (segment in this._contentAreaDimensions) {
|
|
273
|
+
area = this._contentAreaDimensions[segment].hoverArea;
|
|
274
|
+
|
|
275
|
+
if (area.x1 < x && area.x2 > x && area.y1 < y && area.y2 > y) {
|
|
276
|
+
if (segment === 'header') {
|
|
277
|
+
this._dropSegment = 'header';
|
|
278
|
+
|
|
279
|
+
this._highlightHeaderDropZone(x, y);
|
|
280
|
+
} else {
|
|
281
|
+
this._resetHeaderDropZone();
|
|
282
|
+
|
|
283
|
+
this._highlightBodyDropZone(segment);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
_$getArea: function _$getArea() {
|
|
291
|
+
if (this.element.is(':visible') === false) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var getArea = AbstractContentItem.prototype._$getArea,
|
|
296
|
+
headerArea = getArea.call(this, this.header.element),
|
|
297
|
+
contentArea = getArea.call(this, this.childElementContainer),
|
|
298
|
+
contentWidth = contentArea.x2 - contentArea.x1,
|
|
299
|
+
contentHeight = contentArea.y2 - contentArea.y1;
|
|
300
|
+
this._contentAreaDimensions = {
|
|
301
|
+
header: {
|
|
302
|
+
hoverArea: {
|
|
303
|
+
x1: headerArea.x1,
|
|
304
|
+
y1: headerArea.y1,
|
|
305
|
+
x2: headerArea.x2,
|
|
306
|
+
y2: headerArea.y2
|
|
307
|
+
},
|
|
308
|
+
highlightArea: {
|
|
309
|
+
x1: headerArea.x1,
|
|
310
|
+
y1: headerArea.y1,
|
|
311
|
+
x2: headerArea.x2,
|
|
312
|
+
y2: headerArea.y2
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* If this Stack is a parent to rows, columns or other stacks only its
|
|
318
|
+
* header is a valid dropzone.
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
if (this._activeContentItem && this._activeContentItem.isComponent === false) {
|
|
322
|
+
return headerArea;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Highlight the entire body if the stack is empty
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
if (this.contentItems.length === 0) {
|
|
330
|
+
this._contentAreaDimensions.body = {
|
|
331
|
+
hoverArea: {
|
|
332
|
+
x1: contentArea.x1,
|
|
333
|
+
y1: contentArea.y1,
|
|
334
|
+
x2: contentArea.x2,
|
|
335
|
+
y2: contentArea.y2
|
|
336
|
+
},
|
|
337
|
+
highlightArea: {
|
|
338
|
+
x1: contentArea.x1,
|
|
339
|
+
y1: contentArea.y1,
|
|
340
|
+
x2: contentArea.x2,
|
|
341
|
+
y2: contentArea.y2
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
return getArea.call(this, this.element);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
this._contentAreaDimensions.left = {
|
|
348
|
+
hoverArea: {
|
|
349
|
+
x1: contentArea.x1,
|
|
350
|
+
y1: contentArea.y1,
|
|
351
|
+
x2: contentArea.x1 + contentWidth * 0.25,
|
|
352
|
+
y2: contentArea.y2
|
|
353
|
+
},
|
|
354
|
+
highlightArea: {
|
|
355
|
+
x1: contentArea.x1,
|
|
356
|
+
y1: contentArea.y1,
|
|
357
|
+
x2: contentArea.x1 + contentWidth * 0.5,
|
|
358
|
+
y2: contentArea.y2
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
this._contentAreaDimensions.top = {
|
|
362
|
+
hoverArea: {
|
|
363
|
+
x1: contentArea.x1 + contentWidth * 0.25,
|
|
364
|
+
y1: contentArea.y1,
|
|
365
|
+
x2: contentArea.x1 + contentWidth * 0.75,
|
|
366
|
+
y2: contentArea.y1 + contentHeight * 0.5
|
|
367
|
+
},
|
|
368
|
+
highlightArea: {
|
|
369
|
+
x1: contentArea.x1,
|
|
370
|
+
y1: contentArea.y1,
|
|
371
|
+
x2: contentArea.x2,
|
|
372
|
+
y2: contentArea.y1 + contentHeight * 0.5
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
this._contentAreaDimensions.right = {
|
|
376
|
+
hoverArea: {
|
|
377
|
+
x1: contentArea.x1 + contentWidth * 0.75,
|
|
378
|
+
y1: contentArea.y1,
|
|
379
|
+
x2: contentArea.x2,
|
|
380
|
+
y2: contentArea.y2
|
|
381
|
+
},
|
|
382
|
+
highlightArea: {
|
|
383
|
+
x1: contentArea.x1 + contentWidth * 0.5,
|
|
384
|
+
y1: contentArea.y1,
|
|
385
|
+
x2: contentArea.x2,
|
|
386
|
+
y2: contentArea.y2
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
this._contentAreaDimensions.bottom = {
|
|
390
|
+
hoverArea: {
|
|
391
|
+
x1: contentArea.x1 + contentWidth * 0.25,
|
|
392
|
+
y1: contentArea.y1 + contentHeight * 0.5,
|
|
393
|
+
x2: contentArea.x1 + contentWidth * 0.75,
|
|
394
|
+
y2: contentArea.y2
|
|
395
|
+
},
|
|
396
|
+
highlightArea: {
|
|
397
|
+
x1: contentArea.x1,
|
|
398
|
+
y1: contentArea.y1 + contentHeight * 0.5,
|
|
399
|
+
x2: contentArea.x2,
|
|
400
|
+
y2: contentArea.y2
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
return getArea.call(this, this.element);
|
|
404
|
+
},
|
|
405
|
+
_highlightHeaderDropZone: function _highlightHeaderDropZone(x) {
|
|
406
|
+
var tabsLength = this.header.tabs.length;
|
|
407
|
+
var tabElement = null;
|
|
408
|
+
var tabRect = null; // I've omitted code for side edge tabs here
|
|
409
|
+
// illumon doesn't need it, will slowly pull that code out elsewhere too
|
|
410
|
+
// Empty stack
|
|
411
|
+
|
|
412
|
+
if (tabsLength === 0) {
|
|
413
|
+
var headerOffset = this.header.element.offset(); // we don't have a placeholder to measure in the dom, lets just cheat and make it 100px.
|
|
414
|
+
|
|
415
|
+
this.layoutManager.dropTargetIndicator.highlightArea({
|
|
416
|
+
x1: headerOffset.left,
|
|
417
|
+
x2: headerOffset.left + 100,
|
|
418
|
+
y1: this.header.element.offset().top,
|
|
419
|
+
y2: this.header.element.offset().top + this.header.element.innerHeight()
|
|
420
|
+
});
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
var tabsContainer = this.header.tabsContainer;
|
|
425
|
+
var tabsContainerRect = tabsContainer.get(0).getBoundingClientRect();
|
|
426
|
+
var placeholderRect = this.layoutManager.tabDropPlaceholder.get(0).getBoundingClientRect();
|
|
427
|
+
|
|
428
|
+
if (x < tabsContainerRect.left) {
|
|
429
|
+
// is over left tab controls button
|
|
430
|
+
// move x to a new point to inside left edge of container
|
|
431
|
+
x = tabsContainerRect.left + 1;
|
|
432
|
+
} else if (x > tabsContainerRect.right) {
|
|
433
|
+
// is over right tab controls button
|
|
434
|
+
// move x to a new point to inside right edge of container
|
|
435
|
+
x = tabsContainerRect.right - 1;
|
|
436
|
+
} // if its not inide a placeholder,
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
if (!(placeholderRect.left < x && x < placeholderRect.right)) {
|
|
440
|
+
// which tab is it over ...
|
|
441
|
+
for (var i = 0; i < tabsLength; i++) {
|
|
442
|
+
tabElement = this.header.tabs[i].element;
|
|
443
|
+
tabRect = tabElement.get(0).getBoundingClientRect();
|
|
444
|
+
|
|
445
|
+
if (tabRect.left < x && x < tabRect.right) {
|
|
446
|
+
this._dropIndex = i;
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
} // we have tabRect at this x,y from the loop above
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
if (tabElement && x < tabRect.left + tabRect.width * 0.5) {
|
|
453
|
+
// mostly before an element, insert placeholder before
|
|
454
|
+
tabElement.before(this.layoutManager.tabDropPlaceholder);
|
|
455
|
+
} else if (tabElement) {
|
|
456
|
+
// x is likely after the lhe last item, position after and increase drop index
|
|
457
|
+
this._dropIndex = Math.min(this._dropIndex + 1, tabsLength);
|
|
458
|
+
tabElement.after(this.layoutManager.tabDropPlaceholder);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
var placeHolderLeft = this.layoutManager.tabDropPlaceholder.offset().left;
|
|
463
|
+
placeHolderLeft = Math.max(placeHolderLeft, this.header.tabsContainer.offset().left);
|
|
464
|
+
var placeHolderRight = placeHolderLeft + this.layoutManager.tabDropPlaceholder.width();
|
|
465
|
+
placeHolderRight = Math.min(placeHolderRight, this.header.tabsContainer.offset().left + this.header.tabsContainer.innerWidth());
|
|
466
|
+
this.layoutManager.dropTargetIndicator.highlightArea({
|
|
467
|
+
x1: placeHolderLeft,
|
|
468
|
+
x2: placeHolderRight,
|
|
469
|
+
y1: this.header.element.offset().top,
|
|
470
|
+
y2: this.header.element.offset().top + this.header.element.innerHeight()
|
|
471
|
+
});
|
|
472
|
+
},
|
|
473
|
+
_resetHeaderDropZone: function _resetHeaderDropZone() {
|
|
474
|
+
this.layoutManager.tabDropPlaceholder.remove();
|
|
475
|
+
},
|
|
476
|
+
_setupHeaderPosition: function _setupHeaderPosition() {
|
|
477
|
+
var side = ['right', 'left', 'bottom'].indexOf(this._header.show) >= 0 && this._header.show;
|
|
478
|
+
|
|
479
|
+
this.header.element.toggle(!!this._header.show);
|
|
480
|
+
this._side = side;
|
|
481
|
+
this._sided = ['right', 'left'].indexOf(this._side) >= 0;
|
|
482
|
+
this.element.removeClass('lm_left lm_right lm_bottom');
|
|
483
|
+
if (this._side) this.element.addClass('lm_' + this._side);
|
|
484
|
+
|
|
485
|
+
if (this.element.find('.lm_header').length && this.childElementContainer) {
|
|
486
|
+
var headerPosition = ['right', 'bottom'].indexOf(this._side) >= 0 ? 'before' : 'after';
|
|
487
|
+
this.header.element[headerPosition](this.childElementContainer);
|
|
488
|
+
this.callDownwards('setSize');
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
_highlightBodyDropZone: function _highlightBodyDropZone(segment) {
|
|
492
|
+
var highlightArea = this._contentAreaDimensions[segment].highlightArea;
|
|
493
|
+
this.layoutManager.dropTargetIndicator.highlightArea(highlightArea);
|
|
494
|
+
this._dropSegment = segment;
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
export default Stack;
|
|
498
|
+
//# sourceMappingURL=Stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","names":["$","AbstractContentItem","utils","controls","Stack","layoutManager","config","parent","call","element","_activeContentItem","cfg","_header","show","settings","hasHeaders","popout","showPopoutIcon","labels","maximise","showMaximiseIcon","close","showCloseIcon","minimise","header","copy","content","_dropZones","_dropSegment","_contentAreaDimensions","_dropIndex","isStack","childElementContainer","Header","append","_setupHeaderPosition","_$validateClosability","extend","prototype","setSize","i","headerSize","dimensions","headerHeight","contentWidth","width","_sided","contentHeight","height","contentItems","length","emit","emitBubblingEvent","_$init","initialItem","isInitialised","_attachWheelListener","createTab","_$hide","activeItemIndex","Error","setActiveContentItem","contentItem","indexOf","_$show","getActiveContentItem","activeContentItem","addChild","index","_$normalizeContentItem","callDownwards","removeChild","keepChild","removeTab","Math","max","isClosable","len","_isClosable","_$setClosable","_$destroy","_$onDrop","_resetHeaderDropZone","isVertical","isHorizontal","insertBefore","hasCorrectParent","isColumn","isRow","type","dimension","stack","rowOrColumn","isComponent","createContentItem","replaceChild","undefined","_$highlightDropZone","x","y","segment","area","hoverArea","x1","x2","y1","y2","_highlightHeaderDropZone","_highlightBodyDropZone","_$getArea","is","getArea","headerArea","contentArea","highlightArea","body","left","top","right","bottom","tabsLength","tabs","tabElement","tabRect","headerOffset","offset","dropTargetIndicator","innerHeight","tabsContainer","tabsContainerRect","get","getBoundingClientRect","placeholderRect","tabDropPlaceholder","before","min","after","placeHolderLeft","placeHolderRight","innerWidth","remove","side","toggle","_side","removeClass","addClass","find","headerPosition"],"sources":["../../src/items/Stack.js"],"sourcesContent":["import $ from 'jquery';\nimport AbstractContentItem from './AbstractContentItem.js';\nimport utils from '../utils/index.js';\nimport controls from '../controls/index.js';\n\nconst Stack = function (layoutManager, config, parent) {\n AbstractContentItem.call(this, layoutManager, config, parent);\n\n this.element = $('<div class=\"lm_item lm_stack\"></div>');\n this._activeContentItem = null;\n\n var cfg = layoutManager.config;\n this._header = {\n // defaults' reconstruction from old configuration style\n show: cfg.settings.hasHeaders === true && config.hasHeaders !== false,\n popout: cfg.settings.showPopoutIcon && cfg.labels.popout,\n maximise: cfg.settings.showMaximiseIcon && cfg.labels.maximise,\n close: cfg.settings.showCloseIcon && cfg.labels.close,\n minimise: cfg.labels.minimise,\n };\n\n // load simplified version of header configuration (https://github.com/deepstreamIO/golden-layout/pull/245)\n if (cfg.header) utils.copy(this._header, cfg.header);\n if (config.header)\n // load from stack\n utils.copy(this._header, config.header);\n if (config.content && config.content[0] && config.content[0].header)\n // load from component if stack omitted\n utils.copy(this._header, config.content[0].header);\n\n this._dropZones = {};\n this._dropSegment = null;\n this._contentAreaDimensions = null;\n this._dropIndex = null;\n\n this.isStack = true;\n\n this.childElementContainer = $('<div class=\"lm_items\"></div>');\n this.header = new controls.Header(layoutManager, this);\n\n this.element.append(this.header.element);\n this.element.append(this.childElementContainer);\n this._setupHeaderPosition();\n this._$validateClosability();\n};\n\nutils.extend(Stack, AbstractContentItem);\n\nutils.copy(Stack.prototype, {\n setSize: function () {\n var i,\n headerSize = this._header.show\n ? this.layoutManager.config.dimensions.headerHeight\n : 0,\n contentWidth = this.element.width() - (this._sided ? headerSize : 0),\n contentHeight = this.element.height() - (!this._sided ? headerSize : 0);\n\n this.childElementContainer.width(contentWidth);\n this.childElementContainer.height(contentHeight);\n\n for (i = 0; i < this.contentItems.length; i++) {\n this.contentItems[i].element.width(contentWidth).height(contentHeight);\n }\n this.emit('resize');\n this.emitBubblingEvent('stateChanged');\n },\n\n _$init: function () {\n var i, initialItem;\n\n if (this.isInitialised === true) return;\n\n this.header._attachWheelListener();\n\n AbstractContentItem.prototype._$init.call(this);\n\n for (i = 0; i < this.contentItems.length; i++) {\n this.header.createTab(this.contentItems[i]);\n this.contentItems[i]._$hide();\n }\n\n if (this.contentItems.length > 0) {\n initialItem = this.contentItems[this.config.activeItemIndex || 0];\n\n if (!initialItem) {\n throw new Error('Configured activeItemIndex out of bounds');\n }\n\n this.setActiveContentItem(initialItem);\n }\n },\n\n setActiveContentItem: function (contentItem) {\n if (utils.indexOf(contentItem, this.contentItems) === -1) {\n throw new Error('contentItem is not a child of this stack');\n }\n\n if (this._activeContentItem !== null) {\n this._activeContentItem._$hide();\n }\n\n this._activeContentItem = contentItem;\n this.header.setActiveContentItem(contentItem);\n contentItem._$show();\n this.emit('activeContentItemChanged', contentItem);\n this.layoutManager.emit('activeContentItemChanged', contentItem);\n this.emitBubblingEvent('stateChanged');\n },\n\n getActiveContentItem: function () {\n return this.header.activeContentItem;\n },\n\n addChild: function (contentItem, index) {\n contentItem = this.layoutManager._$normalizeContentItem(contentItem, this);\n AbstractContentItem.prototype.addChild.call(this, contentItem, index);\n this.childElementContainer.append(contentItem.element);\n this.header.createTab(contentItem, index);\n this.setActiveContentItem(contentItem);\n this.callDownwards('setSize');\n this._$validateClosability();\n this.emitBubblingEvent('stateChanged');\n },\n\n removeChild: function (contentItem, keepChild) {\n var index = utils.indexOf(contentItem, this.contentItems);\n AbstractContentItem.prototype.removeChild.call(\n this,\n contentItem,\n keepChild\n );\n this.header.removeTab(contentItem);\n if (this.header.activeContentItem === contentItem) {\n if (this.contentItems.length > 0) {\n this.setActiveContentItem(this.contentItems[Math.max(index - 1, 0)]);\n } else {\n this._activeContentItem = null;\n }\n }\n\n this._$validateClosability();\n this.emitBubblingEvent('stateChanged');\n },\n\n /**\n * Validates that the stack is still closable or not. If a stack is able\n * to close, but has a non closable component added to it, the stack is no\n * longer closable until all components are closable.\n *\n * @returns {void}\n */\n _$validateClosability: function () {\n var isClosable, len, i;\n\n isClosable = this.header._isClosable();\n\n for (i = 0, len = this.contentItems.length; i < len; i++) {\n if (!isClosable) {\n break;\n }\n\n isClosable = this.contentItems[i].config.isClosable;\n }\n\n this.header._$setClosable(isClosable);\n },\n\n _$destroy: function () {\n AbstractContentItem.prototype._$destroy.call(this);\n this.header._$destroy();\n },\n\n /**\n * Ok, this one is going to be the tricky one: The user has dropped {contentItem} onto this stack.\n *\n * It was dropped on either the stacks header or the top, right, bottom or left bit of the content area\n * (which one of those is stored in this._dropSegment). Now, if the user has dropped on the header the case\n * is relatively clear: We add the item to the existing stack... job done (might be good to have\n * tab reordering at some point, but lets not sweat it right now)\n *\n * If the item was dropped on the content part things are a bit more complicated. If it was dropped on either the\n * top or bottom region we need to create a new column and place the items accordingly.\n * Unless, of course if the stack is already within a column... in which case we want\n * to add the newly created item to the existing column...\n * either prepend or append it, depending on wether its top or bottom.\n *\n * Same thing for rows and left / right drop segments... so in total there are 9 things that can potentially happen\n * (left, top, right, bottom) * is child of the right parent (row, column) + header drop\n *\n * @param {lm.item} contentItem\n *\n * @returns {void}\n */\n _$onDrop: function (contentItem) {\n /*\n * The item was dropped on the header area. Just add it as a child of this stack and\n * get the hell out of this logic\n */\n if (this._dropSegment === 'header') {\n this._resetHeaderDropZone();\n this.addChild(contentItem, this._dropIndex);\n return;\n }\n\n /*\n * The stack is empty. Let's just add the element.\n */\n if (this._dropSegment === 'body') {\n this.addChild(contentItem);\n return;\n }\n\n /*\n * The item was dropped on the top-, left-, bottom- or right- part of the content. Let's\n * aggregate some conditions to make the if statements later on more readable\n */\n var isVertical =\n this._dropSegment === 'top' || this._dropSegment === 'bottom',\n isHorizontal =\n this._dropSegment === 'left' || this._dropSegment === 'right',\n insertBefore =\n this._dropSegment === 'top' || this._dropSegment === 'left',\n hasCorrectParent =\n (isVertical && this.parent.isColumn) ||\n (isHorizontal && this.parent.isRow),\n type = isVertical ? 'column' : 'row',\n dimension = isVertical ? 'height' : 'width',\n index,\n stack,\n rowOrColumn;\n\n /*\n * The content item can be either a component or a stack. If it is a component, wrap it into a stack\n */\n if (contentItem.isComponent) {\n stack = this.layoutManager.createContentItem(\n {\n type: 'stack',\n header: contentItem.config.header || {},\n },\n this\n );\n stack._$init();\n stack.addChild(contentItem);\n contentItem = stack;\n }\n\n /*\n * If the item is dropped on top or bottom of a column or left and right of a row, it's already\n * layd out in the correct way. Just add it as a child\n */\n if (hasCorrectParent) {\n index = utils.indexOf(this, this.parent.contentItems);\n this.parent.addChild(contentItem, insertBefore ? index : index + 1, true);\n this.config[dimension] *= 0.5;\n contentItem.config[dimension] = this.config[dimension];\n this.parent.callDownwards('setSize');\n /*\n * This handles items that are dropped on top or bottom of a row or left / right of a column. We need\n * to create the appropriate contentItem for them to live in\n */\n } else {\n type = isVertical ? 'column' : 'row';\n rowOrColumn = this.layoutManager.createContentItem({ type: type }, this);\n this.parent.replaceChild(this, rowOrColumn);\n\n rowOrColumn.addChild(contentItem, insertBefore ? 0 : undefined, true);\n rowOrColumn.addChild(this, insertBefore ? undefined : 0, true);\n\n this.config[dimension] = 50;\n contentItem.config[dimension] = 50;\n rowOrColumn.callDownwards('setSize');\n }\n },\n\n /**\n * If the user hovers above the header part of the stack, indicate drop positions for tabs.\n * otherwise indicate which segment of the body the dragged item would be dropped on\n *\n * @param {Int} x Absolute Screen X\n * @param {Int} y Absolute Screen Y\n *\n * @returns {void}\n */\n _$highlightDropZone: function (x, y) {\n var segment, area;\n\n for (segment in this._contentAreaDimensions) {\n area = this._contentAreaDimensions[segment].hoverArea;\n\n if (area.x1 < x && area.x2 > x && area.y1 < y && area.y2 > y) {\n if (segment === 'header') {\n this._dropSegment = 'header';\n this._highlightHeaderDropZone(x, y);\n } else {\n this._resetHeaderDropZone();\n this._highlightBodyDropZone(segment);\n }\n\n return;\n }\n }\n },\n\n _$getArea: function () {\n if (this.element.is(':visible') === false) {\n return null;\n }\n\n var getArea = AbstractContentItem.prototype._$getArea,\n headerArea = getArea.call(this, this.header.element),\n contentArea = getArea.call(this, this.childElementContainer),\n contentWidth = contentArea.x2 - contentArea.x1,\n contentHeight = contentArea.y2 - contentArea.y1;\n\n this._contentAreaDimensions = {\n header: {\n hoverArea: {\n x1: headerArea.x1,\n y1: headerArea.y1,\n x2: headerArea.x2,\n y2: headerArea.y2,\n },\n highlightArea: {\n x1: headerArea.x1,\n y1: headerArea.y1,\n x2: headerArea.x2,\n y2: headerArea.y2,\n },\n },\n };\n\n /**\n * If this Stack is a parent to rows, columns or other stacks only its\n * header is a valid dropzone.\n */\n if (\n this._activeContentItem &&\n this._activeContentItem.isComponent === false\n ) {\n return headerArea;\n }\n\n /**\n * Highlight the entire body if the stack is empty\n */\n if (this.contentItems.length === 0) {\n this._contentAreaDimensions.body = {\n hoverArea: {\n x1: contentArea.x1,\n y1: contentArea.y1,\n x2: contentArea.x2,\n y2: contentArea.y2,\n },\n highlightArea: {\n x1: contentArea.x1,\n y1: contentArea.y1,\n x2: contentArea.x2,\n y2: contentArea.y2,\n },\n };\n\n return getArea.call(this, this.element);\n }\n\n this._contentAreaDimensions.left = {\n hoverArea: {\n x1: contentArea.x1,\n y1: contentArea.y1,\n x2: contentArea.x1 + contentWidth * 0.25,\n y2: contentArea.y2,\n },\n highlightArea: {\n x1: contentArea.x1,\n y1: contentArea.y1,\n x2: contentArea.x1 + contentWidth * 0.5,\n y2: contentArea.y2,\n },\n };\n\n this._contentAreaDimensions.top = {\n hoverArea: {\n x1: contentArea.x1 + contentWidth * 0.25,\n y1: contentArea.y1,\n x2: contentArea.x1 + contentWidth * 0.75,\n y2: contentArea.y1 + contentHeight * 0.5,\n },\n highlightArea: {\n x1: contentArea.x1,\n y1: contentArea.y1,\n x2: contentArea.x2,\n y2: contentArea.y1 + contentHeight * 0.5,\n },\n };\n\n this._contentAreaDimensions.right = {\n hoverArea: {\n x1: contentArea.x1 + contentWidth * 0.75,\n y1: contentArea.y1,\n x2: contentArea.x2,\n y2: contentArea.y2,\n },\n highlightArea: {\n x1: contentArea.x1 + contentWidth * 0.5,\n y1: contentArea.y1,\n x2: contentArea.x2,\n y2: contentArea.y2,\n },\n };\n\n this._contentAreaDimensions.bottom = {\n hoverArea: {\n x1: contentArea.x1 + contentWidth * 0.25,\n y1: contentArea.y1 + contentHeight * 0.5,\n x2: contentArea.x1 + contentWidth * 0.75,\n y2: contentArea.y2,\n },\n highlightArea: {\n x1: contentArea.x1,\n y1: contentArea.y1 + contentHeight * 0.5,\n x2: contentArea.x2,\n y2: contentArea.y2,\n },\n };\n\n return getArea.call(this, this.element);\n },\n\n _highlightHeaderDropZone: function (x) {\n var tabsLength = this.header.tabs.length;\n var tabElement = null;\n var tabRect = null;\n\n // I've omitted code for side edge tabs here\n // illumon doesn't need it, will slowly pull that code out elsewhere too\n\n // Empty stack\n if (tabsLength === 0) {\n var headerOffset = this.header.element.offset();\n\n // we don't have a placeholder to measure in the dom, lets just cheat and make it 100px.\n this.layoutManager.dropTargetIndicator.highlightArea({\n x1: headerOffset.left,\n x2: headerOffset.left + 100,\n y1: this.header.element.offset().top,\n y2:\n this.header.element.offset().top + this.header.element.innerHeight(),\n });\n\n return;\n }\n\n var tabsContainer = this.header.tabsContainer;\n var tabsContainerRect = tabsContainer.get(0).getBoundingClientRect();\n var placeholderRect = this.layoutManager.tabDropPlaceholder\n .get(0)\n .getBoundingClientRect();\n\n if (x < tabsContainerRect.left) {\n // is over left tab controls button\n // move x to a new point to inside left edge of container\n x = tabsContainerRect.left + 1;\n } else if (x > tabsContainerRect.right) {\n // is over right tab controls button\n // move x to a new point to inside right edge of container\n x = tabsContainerRect.right - 1;\n }\n\n // if its not inide a placeholder,\n if (!(placeholderRect.left < x && x < placeholderRect.right)) {\n // which tab is it over ...\n for (var i = 0; i < tabsLength; i++) {\n tabElement = this.header.tabs[i].element;\n tabRect = tabElement.get(0).getBoundingClientRect();\n if (tabRect.left < x && x < tabRect.right) {\n this._dropIndex = i;\n break;\n }\n }\n\n // we have tabRect at this x,y from the loop above\n if (tabElement && x < tabRect.left + tabRect.width * 0.5) {\n // mostly before an element, insert placeholder before\n tabElement.before(this.layoutManager.tabDropPlaceholder);\n } else if (tabElement) {\n // x is likely after the lhe last item, position after and increase drop index\n this._dropIndex = Math.min(this._dropIndex + 1, tabsLength);\n tabElement.after(this.layoutManager.tabDropPlaceholder);\n }\n }\n\n var placeHolderLeft = this.layoutManager.tabDropPlaceholder.offset().left;\n placeHolderLeft = Math.max(\n placeHolderLeft,\n this.header.tabsContainer.offset().left\n );\n var placeHolderRight =\n placeHolderLeft + this.layoutManager.tabDropPlaceholder.width();\n placeHolderRight = Math.min(\n placeHolderRight,\n this.header.tabsContainer.offset().left +\n this.header.tabsContainer.innerWidth()\n );\n this.layoutManager.dropTargetIndicator.highlightArea({\n x1: placeHolderLeft,\n x2: placeHolderRight,\n y1: this.header.element.offset().top,\n y2: this.header.element.offset().top + this.header.element.innerHeight(),\n });\n },\n\n _resetHeaderDropZone: function () {\n this.layoutManager.tabDropPlaceholder.remove();\n },\n\n _setupHeaderPosition: function () {\n var side =\n ['right', 'left', 'bottom'].indexOf(this._header.show) >= 0 &&\n this._header.show;\n this.header.element.toggle(!!this._header.show);\n this._side = side;\n this._sided = ['right', 'left'].indexOf(this._side) >= 0;\n this.element.removeClass('lm_left lm_right lm_bottom');\n if (this._side) this.element.addClass('lm_' + this._side);\n if (this.element.find('.lm_header').length && this.childElementContainer) {\n var headerPosition =\n ['right', 'bottom'].indexOf(this._side) >= 0 ? 'before' : 'after';\n this.header.element[headerPosition](this.childElementContainer);\n this.callDownwards('setSize');\n }\n },\n\n _highlightBodyDropZone: function (segment) {\n var highlightArea = this._contentAreaDimensions[segment].highlightArea;\n this.layoutManager.dropTargetIndicator.highlightArea(highlightArea);\n this._dropSegment = segment;\n },\n});\n\nexport default Stack;\n"],"mappings":"AAAA,OAAOA,CAAP,MAAc,QAAd;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,KAAP,MAAkB,mBAAlB;AACA,OAAOC,QAAP,MAAqB,sBAArB;;AAEA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAAUC,aAAV,EAAyBC,MAAzB,EAAiCC,MAAjC,EAAyC;EACrDN,mBAAmB,CAACO,IAApB,CAAyB,IAAzB,EAA+BH,aAA/B,EAA8CC,MAA9C,EAAsDC,MAAtD;EAEA,KAAKE,OAAL,GAAeT,CAAC,CAAC,sCAAD,CAAhB;EACA,KAAKU,kBAAL,GAA0B,IAA1B;EAEA,IAAIC,GAAG,GAAGN,aAAa,CAACC,MAAxB;EACA,KAAKM,OAAL,GAAe;IACb;IACAC,IAAI,EAAEF,GAAG,CAACG,QAAJ,CAAaC,UAAb,KAA4B,IAA5B,IAAoCT,MAAM,CAACS,UAAP,KAAsB,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,KAAKD,KAAT,EAAgB,KAAKtI,OAAL,CAAawI,QAAb,CAAsB,QAAQ,KAAKF,KAAnC;;IAChB,IAAI,KAAKtI,OAAL,CAAayI,IAAb,CAAkB,YAAlB,EAAgChG,MAAhC,IAA0C,KAAKlB,qBAAnD,EAA0E;MACxE,IAAImH,cAAc,GAChB,CAAC,OAAD,EAAU,QAAV,EAAoBpF,OAApB,CAA4B,KAAKgF,KAAjC,KAA2C,CAA3C,GAA+C,QAA/C,GAA0D,OAD5D;MAEA,KAAKvH,MAAL,CAAYf,OAAZ,CAAoB0I,cAApB,EAAoC,KAAKnH,qBAAzC;MACA,KAAKsC,aAAL,CAAmB,SAAnB;IACD;EACF,CAleyB;EAoe1BsC,sBAAsB,EAAE,gCAAUR,OAAV,EAAmB;IACzC,IAAIc,aAAa,GAAG,KAAKrF,sBAAL,CAA4BuE,OAA5B,EAAqCc,aAAzD;IACA,KAAK7G,aAAL,CAAmByH,mBAAnB,CAAuCZ,aAAvC,CAAqDA,aAArD;IACA,KAAKtF,YAAL,GAAoBwE,OAApB;EACD;AAxeyB,CAA5B;AA2eA,eAAehG,KAAf"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AbstractContentItem from './AbstractContentItem.js';
|
|
2
|
+
import Component from './Component.js';
|
|
3
|
+
import Root from './Root.js';
|
|
4
|
+
import RowOrColumn from './RowOrColumn.js';
|
|
5
|
+
import Stack from './Stack.js';
|
|
6
|
+
export default {
|
|
7
|
+
AbstractContentItem,
|
|
8
|
+
Component,
|
|
9
|
+
Root,
|
|
10
|
+
RowOrColumn,
|
|
11
|
+
Stack
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["AbstractContentItem","Component","Root","RowOrColumn","Stack"],"sources":["../../src/items/index.js"],"sourcesContent":["import AbstractContentItem from './AbstractContentItem.js';\nimport Component from './Component.js';\nimport Root from './Root.js';\nimport RowOrColumn from './RowOrColumn.js';\nimport Stack from './Stack.js';\n\nexport default {\n AbstractContentItem,\n Component,\n Root,\n RowOrColumn,\n Stack,\n};\n"],"mappings":"AAAA,OAAOA,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,SAAP,MAAsB,gBAAtB;AACA,OAAOC,IAAP,MAAiB,WAAjB;AACA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,OAAOC,KAAP,MAAkB,YAAlB;AAEA,eAAe;EACbJ,mBADa;EAEbC,SAFa;EAGbC,IAHa;EAIbC,WAJa;EAKbC;AALa,CAAf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var BubblingEvent = function BubblingEvent(name, origin) {
|
|
2
|
+
this.name = name;
|
|
3
|
+
this.origin = origin;
|
|
4
|
+
this.isPropagationStopped = false;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
BubblingEvent.prototype.stopPropagation = function () {
|
|
8
|
+
this.isPropagationStopped = true;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default BubblingEvent;
|
|
12
|
+
//# sourceMappingURL=BubblingEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BubblingEvent.js","names":["BubblingEvent","name","origin","isPropagationStopped","prototype","stopPropagation"],"sources":["../../src/utils/BubblingEvent.js"],"sourcesContent":["const BubblingEvent = function (name, origin) {\n this.name = name;\n this.origin = origin;\n this.isPropagationStopped = false;\n};\n\nBubblingEvent.prototype.stopPropagation = function () {\n this.isPropagationStopped = true;\n};\n\nexport default BubblingEvent;\n"],"mappings":"AAAA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAAUC,IAAV,EAAgBC,MAAhB,EAAwB;EAC5C,KAAKD,IAAL,GAAYA,IAAZ;EACA,KAAKC,MAAL,GAAcA,MAAd;EACA,KAAKC,oBAAL,GAA4B,KAA5B;AACD,CAJD;;AAMAH,aAAa,CAACI,SAAd,CAAwBC,eAAxB,GAA0C,YAAY;EACpD,KAAKF,oBAAL,GAA4B,IAA5B;AACD,CAFD;;AAIA,eAAeH,aAAf"}
|