@openfin/core 30.73.3 → 30.73.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -15,11 +15,18 @@ export declare class TabDragController {
|
|
|
15
15
|
* Additionally, if there is a new view to show in the stack, it will be shown at the position specified by
|
|
16
16
|
* containerBounds
|
|
17
17
|
*
|
|
18
|
+
* As drag interactions can under extreme circumstances complete before this chain of promises has completed,
|
|
19
|
+
* we need to pass in a isDragging() function which returns whether the drag is in progress.
|
|
20
|
+
* This allows us to cancel any layout affecting operations.
|
|
21
|
+
*
|
|
18
22
|
* @param draggingView The view which is currently being dragged
|
|
23
|
+
* @param isLastViewInWindow Whether the draggin view is the last view in a window or not. If false, the dragging view will not hide.
|
|
24
|
+
* @param isDragging A function which returns true if the drag is still in progress. As we chain some async calls here, we want to avoid
|
|
25
|
+
* modifying any views if the drag has completed (as the post drag procedure will have taken care of it.)
|
|
19
26
|
* @param containerBounds The bounds of the container of the view to be shown in the stack
|
|
20
27
|
* @param nextView The view which has become active after dragging the draggingView out.
|
|
21
28
|
*/
|
|
22
|
-
handleTabStackActiveView: (draggingView: View, containerBounds?: OpenFin.Bounds, nextView?: View) => Promise<void>;
|
|
29
|
+
handleTabStackActiveView: (draggingView: View, isLastViewInWindow: boolean, isDragging: () => boolean, containerBounds?: OpenFin.Bounds, nextView?: View) => Promise<void>;
|
|
23
30
|
/**
|
|
24
31
|
* Extracts the border and backgroundColor css values from the drop zone preview,
|
|
25
32
|
* and sets the viewOverlay to match them.
|
|
@@ -17,22 +17,30 @@ class TabDragController {
|
|
|
17
17
|
* Additionally, if there is a new view to show in the stack, it will be shown at the position specified by
|
|
18
18
|
* containerBounds
|
|
19
19
|
*
|
|
20
|
+
* As drag interactions can under extreme circumstances complete before this chain of promises has completed,
|
|
21
|
+
* we need to pass in a isDragging() function which returns whether the drag is in progress.
|
|
22
|
+
* This allows us to cancel any layout affecting operations.
|
|
23
|
+
*
|
|
20
24
|
* @param draggingView The view which is currently being dragged
|
|
25
|
+
* @param isLastViewInWindow Whether the draggin view is the last view in a window or not. If false, the dragging view will not hide.
|
|
26
|
+
* @param isDragging A function which returns true if the drag is still in progress. As we chain some async calls here, we want to avoid
|
|
27
|
+
* modifying any views if the drag has completed (as the post drag procedure will have taken care of it.)
|
|
21
28
|
* @param containerBounds The bounds of the container of the view to be shown in the stack
|
|
22
29
|
* @param nextView The view which has become active after dragging the draggingView out.
|
|
23
30
|
*/
|
|
24
|
-
this.handleTabStackActiveView = async (draggingView, containerBounds, nextView) => {
|
|
31
|
+
this.handleTabStackActiveView = async (draggingView, isLastViewInWindow, isDragging, containerBounds, nextView) => {
|
|
25
32
|
if (this.dropZonePreview) {
|
|
26
33
|
if (nextView && containerBounds) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
if (isDragging()) {
|
|
35
|
+
await (nextView === null || nextView === void 0 ? void 0 : nextView.show());
|
|
36
|
+
}
|
|
37
|
+
if (isDragging()) {
|
|
38
|
+
await (nextView === null || nextView === void 0 ? void 0 : nextView.setBounds(containerBounds));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (isDragging() && !isLastViewInWindow) {
|
|
42
|
+
await draggingView.hide();
|
|
34
43
|
}
|
|
35
|
-
await draggingView.hide();
|
|
36
44
|
}
|
|
37
45
|
};
|
|
38
46
|
/**
|