@finsemble/finsemble-ui 8.0.2 → 8.1.0-beta.2
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/FEA.d.ts +48 -3
- package/FEA.d.ts.map +1 -1
- package/FEA.js.map +1 -1
- package/clients/Interop/FinsembleDesktopAgent.js +1 -1
- package/clients/Startup/FSBLDesktop.d.ts +2 -14
- package/clients/Startup/FSBLDesktop.d.ts.map +1 -1
- package/clients/Startup/FSBLDesktop.js +4 -21
- package/clients/Startup/FSBLDesktop.js.map +1 -1
- package/clients/Startup/types.d.ts +17 -0
- package/clients/Startup/types.d.ts.map +1 -1
- package/clients/Startup/windowStartup.d.ts.map +1 -1
- package/clients/Startup/windowStartup.js +16 -14
- package/clients/Startup/windowStartup.js.map +1 -1
- package/clients/routerClient.d.ts +2 -169
- package/clients/routerClient.d.ts.map +1 -1
- package/clients/routerClient.js +4 -7
- package/clients/routerClient.js.map +1 -1
- package/common/Desktop.d.ts +8 -0
- package/common/Desktop.d.ts.map +1 -1
- package/common/Desktop.js +23 -0
- package/common/Desktop.js.map +1 -1
- package/common/FinsembleWindow.d.ts +1 -2
- package/common/FinsembleWindow.d.ts.map +1 -1
- package/common/FinsembleWindow.js +1 -1
- package/common/FinsembleWindow.js.map +1 -1
- package/common/Monitors.d.ts +6 -0
- package/common/Monitors.d.ts.map +1 -1
- package/common/Monitors.js +22 -0
- package/common/Monitors.js.map +1 -1
- package/common/system.d.ts +1 -1
- package/common/system.d.ts.map +1 -1
- package/main.d.ts +29 -29
- package/package.json +44 -44
- package/platform/services/Interop/types.d.ts +1 -0
- package/platform/services/Interop/types.d.ts.map +1 -1
- package/platform/services/Interop/types.js.map +1 -1
- package/platform/services/router/routerTransport.d.ts.map +1 -1
- package/platform/services/router/routerTransport.js +5 -7
- package/platform/services/router/routerTransport.js.map +1 -1
- package/platform/services/router/types.d.ts +214 -0
- package/platform/services/router/types.d.ts.map +1 -0
- package/platform/services/router/types.js +2 -0
- package/platform/services/router/types.js.map +1 -0
- package/platform/services/types.d.ts +1 -0
- package/platform/services/types.d.ts.map +1 -1
- package/platform/services/types.js +1 -0
- package/platform/services/types.js.map +1 -1
- package/platform/services/window/Common/Pools/ObjectPool.d.ts +11 -0
- package/platform/services/window/Common/Pools/ObjectPool.d.ts.map +1 -0
- package/platform/services/window/Common/Pools/ObjectPool.js +43 -0
- package/platform/services/window/Common/Pools/ObjectPool.js.map +1 -0
- package/platform/services/window/Common/Pools/PoolSingletons.d.ts +10 -0
- package/platform/services/window/Common/Pools/PoolSingletons.d.ts.map +1 -0
- package/platform/services/window/Common/Pools/PoolSingletons.js +10 -0
- package/platform/services/window/Common/Pools/PoolSingletons.js.map +1 -0
- package/platform/services/window/Common/Pools/WindowPool.d.ts +7 -0
- package/platform/services/window/Common/Pools/WindowPool.d.ts.map +1 -0
- package/platform/services/window/Common/Pools/WindowPool.js +16 -0
- package/platform/services/window/Common/Pools/WindowPool.js.map +1 -0
- package/platform/services/window/Docking/boxMath.d.ts +144 -0
- package/platform/services/window/Docking/boxMath.d.ts.map +1 -0
- package/platform/services/window/Docking/boxMath.js +511 -0
- package/platform/services/window/Docking/boxMath.js.map +1 -0
- package/platform/services/window/Docking/constants.d.ts +29 -0
- package/platform/services/window/Docking/constants.d.ts.map +1 -0
- package/platform/services/window/Docking/constants.js +29 -0
- package/platform/services/window/Docking/constants.js.map +1 -0
- package/platform/services/window/Docking/dockableBox.d.ts +117 -0
- package/platform/services/window/Docking/dockableBox.d.ts.map +1 -0
- package/platform/services/window/Docking/dockableBox.js +525 -0
- package/platform/services/window/Docking/dockableBox.js.map +1 -0
- package/platform/services/window/Docking/dockableGroup.d.ts +252 -0
- package/platform/services/window/Docking/dockableGroup.d.ts.map +1 -0
- package/platform/services/window/Docking/dockableGroup.js +1054 -0
- package/platform/services/window/Docking/dockableGroup.js.map +1 -0
- package/platform/services/window/Docking/dockableMonitor.d.ts +99 -0
- package/platform/services/window/Docking/dockableMonitor.d.ts.map +1 -0
- package/platform/services/window/Docking/dockableMonitor.js +427 -0
- package/platform/services/window/Docking/dockableMonitor.js.map +1 -0
- package/platform/services/window/Docking/dockableWindow.d.ts +272 -0
- package/platform/services/window/Docking/dockableWindow.d.ts.map +1 -0
- package/platform/services/window/Docking/dockableWindow.js +1239 -0
- package/platform/services/window/Docking/dockableWindow.js.map +1 -0
- package/platform/services/window/Docking/dockingCalculator.d.ts +749 -0
- package/platform/services/window/Docking/dockingCalculator.d.ts.map +1 -0
- package/platform/services/window/Docking/dockingCalculator.js +3473 -0
- package/platform/services/window/Docking/dockingCalculator.js.map +1 -0
- package/platform/services/window/Docking/dockingMain.d.ts +349 -0
- package/platform/services/window/Docking/dockingMain.d.ts.map +1 -0
- package/platform/services/window/Docking/dockingMain.js +2584 -0
- package/platform/services/window/Docking/dockingMain.js.map +1 -0
- package/platform/services/window/Docking/maskBoundsCalculator.d.ts +28 -0
- package/platform/services/window/Docking/maskBoundsCalculator.d.ts.map +1 -0
- package/platform/services/window/Docking/maskBoundsCalculator.js +67 -0
- package/platform/services/window/Docking/maskBoundsCalculator.js.map +1 -0
- package/platform/services/window/Docking/monitorUpdateHandler.d.ts +32 -0
- package/platform/services/window/Docking/monitorUpdateHandler.d.ts.map +1 -0
- package/platform/services/window/Docking/monitorUpdateHandler.js +117 -0
- package/platform/services/window/Docking/monitorUpdateHandler.js.map +1 -0
- package/platform/services/window/Docking/types.d.ts +334 -0
- package/platform/services/window/Docking/types.d.ts.map +1 -0
- package/platform/services/window/Docking/types.js +12 -0
- package/platform/services/window/Docking/types.js.map +1 -0
- package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts +90 -0
- package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts.map +1 -0
- package/platform/services/window/MultiWindowFeatures/autoArrange.js +510 -0
- package/platform/services/window/MultiWindowFeatures/autoArrange.js.map +1 -0
- package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts +411 -0
- package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts.map +1 -0
- package/platform/services/window/StackedWindowManager/stackedWindowManager.js +1641 -0
- package/platform/services/window/StackedWindowManager/stackedWindowManager.js.map +1 -0
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts +9 -0
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts.map +1 -0
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js +23 -0
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js.map +1 -0
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts +227 -0
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts.map +1 -0
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.js +1168 -0
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.js.map +1 -0
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts +121 -0
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts.map +1 -0
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.js +591 -0
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.js.map +1 -0
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts +194 -0
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts.map +1 -0
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js +680 -0
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js.map +1 -0
- package/platform/services/window/types.d.ts +13 -13
- package/platform/services/window/windowGroup.d.ts +86 -0
- package/platform/services/window/windowGroup.d.ts.map +1 -0
- package/platform/services/window/windowGroup.js +323 -0
- package/platform/services/window/windowGroup.js.map +1 -0
- package/platform/services/workspace/windowStorageManager.d.ts +178 -0
- package/platform/services/workspace/windowStorageManager.d.ts.map +1 -0
- package/platform/services/workspace/windowStorageManager.js +195 -0
- package/platform/services/workspace/windowStorageManager.js.map +1 -0
- package/platform/services/workspace/workspaceAdminAPI.d.ts +1 -1
- package/platform/services/workspace/workspaceAdminAPI.d.ts.map +1 -1
- package/react/actions/smartDesktopDesignerActions.d.ts +2 -0
- package/react/actions/smartDesktopDesignerActions.d.ts.map +1 -1
- package/react/actions/smartDesktopDesignerActions.js +1 -0
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/download.css +119 -0
- package/react/assets/css/userPreferences.css +50 -0
- package/react/assets/css/windowTitleBar.css +2 -1
- package/react/assets/icons/cancel.svg +15 -0
- package/react/assets/icons/gear.svg +9 -0
- package/react/assets/icons/pause.svg +15 -0
- package/react/assets/icons/resume.svg +17 -0
- package/react/assets/img/Finsemble-installation.gif +0 -0
- package/react/components/common/Button.d.ts +1 -0
- package/react/components/common/Button.d.ts.map +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.d.ts.map +1 -1
- package/react/components/common/ButtonIcon.js +3 -2
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.d.ts.map +1 -1
- package/react/components/common/FinsembleIcon.js +8 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/css/button.css +8 -2
- package/react/components/downloadManager/DownloadItem.d.ts +16 -0
- package/react/components/downloadManager/DownloadItem.d.ts.map +1 -0
- package/react/components/downloadManager/DownloadItem.js +74 -0
- package/react/components/downloadManager/DownloadItem.js.map +1 -0
- package/react/components/downloadManager/DownloadManager.d.ts +10 -0
- package/react/components/downloadManager/DownloadManager.d.ts.map +1 -0
- package/react/components/downloadManager/DownloadManager.js +42 -0
- package/react/components/downloadManager/DownloadManager.js.map +1 -0
- package/react/components/downloadManager/index.d.ts +2 -0
- package/react/components/downloadManager/index.d.ts.map +1 -0
- package/react/components/downloadManager/index.js +2 -0
- package/react/components/downloadManager/index.js.map +1 -0
- package/react/components/fdc3Resolver/ResolverDialog.css +1 -1
- package/react/components/index.d.ts +1 -0
- package/react/components/index.d.ts.map +1 -1
- package/react/components/index.js +1 -0
- package/react/components/index.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js +56 -75
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.d.ts +5 -7
- package/react/components/processMonitor/components/ChildWindow.d.ts.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js +30 -33
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +4 -16
- package/react/components/processMonitor/components/ListHeader.d.ts.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js +30 -39
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.d.ts +3 -6
- package/react/components/processMonitor/components/ProcessStatistics.d.ts.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +18 -23
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/sdd/Dashboard.css +21 -0
- package/react/components/sdd/css/export.css +33 -3
- package/react/components/sdd/css/nav.css +1 -1
- package/react/components/shared/DefaultDropdownButton.js +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/toolbar/DownloadButton.d.ts +8 -0
- package/react/components/toolbar/DownloadButton.d.ts.map +1 -0
- package/react/components/toolbar/DownloadButton.js +30 -0
- package/react/components/toolbar/DownloadButton.js.map +1 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +6 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.d.ts.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +72 -47
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.d.ts +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.d.ts.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +25 -4
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.d.ts +1 -0
- package/react/components/toolbar/index.d.ts.map +1 -1
- package/react/components/toolbar/index.js +1 -0
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +3 -4
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +3 -10
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/userPreferences/components/content/General.d.ts.map +1 -1
- package/react/components/userPreferences/components/content/General.js +3 -0
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/general/DownloadPreferences.d.ts +10 -0
- package/react/components/userPreferences/components/general/DownloadPreferences.d.ts.map +1 -0
- package/react/components/userPreferences/components/general/DownloadPreferences.js +111 -0
- package/react/components/userPreferences/components/general/DownloadPreferences.js.map +1 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +6 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js +11 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +2 -26
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js +8 -25
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/hooks/useDownloadItems.d.ts +24 -0
- package/react/hooks/useDownloadItems.d.ts.map +1 -0
- package/react/hooks/useDownloadItems.js +68 -0
- package/react/hooks/useDownloadItems.js.map +1 -0
- package/react/hooks/useNotifications.d.ts +1 -1
- package/react/reducers/rootReducer.d.ts +4 -0
- package/react/reducers/rootReducer.d.ts.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.d.ts.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js +4 -0
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +8 -0
- package/react/store.d.ts.map +1 -1
- package/react/types/dashbarTypes.d.ts +3 -1
- package/react/types/dashbarTypes.d.ts.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +2 -0
- package/react/types/smartDesktopDesignerTypes.d.ts.map +1 -1
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { BoundingBox, SnappingRegions, BoxCoordinates, XYCoordinates, Vertex, BetweenParams, XYOrTopLeft } from "./types";
|
|
2
|
+
import DockableBox from "./dockableBox";
|
|
3
|
+
declare class BoxMath {
|
|
4
|
+
static isPointOnSegment(point: XYCoordinates, segment: BoundingBox): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* @function {function name}
|
|
7
|
+
* @param {type} req {description}
|
|
8
|
+
* @return {type} {description}
|
|
9
|
+
*/
|
|
10
|
+
static getVertices(req: BoxCoordinates): Vertex[];
|
|
11
|
+
/**
|
|
12
|
+
* @function {function name}
|
|
13
|
+
* @param {type} bounds {description}
|
|
14
|
+
* @param {type} bufferSize {description}
|
|
15
|
+
* @return {type} {description}
|
|
16
|
+
*/
|
|
17
|
+
static getSnappingRegions(bounds: BoxCoordinates, bufferSize?: number): SnappingRegions;
|
|
18
|
+
/**
|
|
19
|
+
* @function {function name}
|
|
20
|
+
* @param {type} bounds {description}
|
|
21
|
+
* @return {type} {description}
|
|
22
|
+
*/
|
|
23
|
+
static getWindowBoundingBox(bounds: BoxCoordinates): BoundingBox;
|
|
24
|
+
static between(params: BetweenParams): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @function {function name}
|
|
27
|
+
* @param {type} window1 {description}
|
|
28
|
+
* @param {type} window2 {description}
|
|
29
|
+
* @return {type} {description}
|
|
30
|
+
*/
|
|
31
|
+
static intersectBoundingBoxes(window1: BoundingBox, window2: BoundingBox): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @function {function name}
|
|
34
|
+
* @param {type} num {description}
|
|
35
|
+
* @param {type} pct {description}
|
|
36
|
+
* @return {type} {description}
|
|
37
|
+
*/
|
|
38
|
+
static getPct(num: number, pct: number): number;
|
|
39
|
+
/**
|
|
40
|
+
* @function {function name}
|
|
41
|
+
* @param {type} num {description}
|
|
42
|
+
* @param {type} pct {description}
|
|
43
|
+
* @return {type} {description}
|
|
44
|
+
*/
|
|
45
|
+
static scaleProportionately(num: number, pct: number): number;
|
|
46
|
+
/**
|
|
47
|
+
* @function {function name}
|
|
48
|
+
* @param {type} num1 {description}
|
|
49
|
+
* @param {type} num2 {description}
|
|
50
|
+
* @return {type} {description}
|
|
51
|
+
*/
|
|
52
|
+
static getPercentChange(num1: number, num2: number): number;
|
|
53
|
+
/**
|
|
54
|
+
* Gets the area of the overlap between two rectangles.
|
|
55
|
+
* @param {*} rect1
|
|
56
|
+
* @param {*} rect2
|
|
57
|
+
*/
|
|
58
|
+
static getOverlap(rect1: BoxCoordinates, rect2: BoxCoordinates): number;
|
|
59
|
+
/**
|
|
60
|
+
* Checks if point is in box (inclusive)
|
|
61
|
+
*/
|
|
62
|
+
static isPointInBox(point: XYOrTopLeft, box: {
|
|
63
|
+
top: number;
|
|
64
|
+
left: number;
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
right?: number;
|
|
68
|
+
bottom?: number;
|
|
69
|
+
}): boolean;
|
|
70
|
+
static cornersInBox(corners: Vertex[], box: DockableBox): string[];
|
|
71
|
+
/**
|
|
72
|
+
* Going back to our example earlier. Remember, A is the larger box that encompasses B and C. In this case, only two corners are within A. (bottom left, bottom right).
|
|
73
|
+
+-------------------+
|
|
74
|
+
| |
|
|
75
|
+
| |
|
|
76
|
+
| |
|
|
77
|
+
| |
|
|
78
|
+
| B |
|
|
79
|
+
| |
|
|
80
|
+
| |
|
|
81
|
+
| |
|
|
82
|
+
+-------------------+
|
|
83
|
+
| |
|
|
84
|
+
| |
|
|
85
|
+
| |
|
|
86
|
+
| |
|
|
87
|
+
| C |
|
|
88
|
+
| |
|
|
89
|
+
| |
|
|
90
|
+
| |
|
|
91
|
+
| |
|
|
92
|
+
| |
|
|
93
|
+
+-------------------+
|
|
94
|
+
* */
|
|
95
|
+
static clipWithTwoSharedCorners({ clip, cornersInBox, box, }: {
|
|
96
|
+
clip: DockableBox;
|
|
97
|
+
cornersInBox: string[];
|
|
98
|
+
box: DockableBox;
|
|
99
|
+
}): DockableBox;
|
|
100
|
+
/** **
|
|
101
|
+
* In this case, A is the wide horizontal box. B is the tall vertical box. Their bottom left corners align at point X.
|
|
102
|
+
* In this case, only one corner (bottom left of B) is within the bounds of A.
|
|
103
|
+
|
|
104
|
+
B
|
|
105
|
+
+------------------+
|
|
106
|
+
| |
|
|
107
|
+
| |
|
|
108
|
+
| |
|
|
109
|
+
| |
|
|
110
|
+
| |
|
|
111
|
+
| |
|
|
112
|
+
| |
|
|
113
|
+
| |
|
|
114
|
+
| |
|
|
115
|
+
| |
|
|
116
|
+
| |
|
|
117
|
+
+---------------------------------------------------------------------+
|
|
118
|
+
| | |
|
|
119
|
+
| | |
|
|
120
|
+
| | |
|
|
121
|
+
| | CLIP | A
|
|
122
|
+
| | |
|
|
123
|
+
| | |
|
|
124
|
+
+------------------+--------------------------------------------------+
|
|
125
|
+
X
|
|
126
|
+
*/
|
|
127
|
+
static clipWithOneSharedCorner({ clip, cornersInBox, rectA, rectB, edge, }: {
|
|
128
|
+
clip: DockableBox;
|
|
129
|
+
cornersInBox: string[];
|
|
130
|
+
rectA: DockableBox;
|
|
131
|
+
rectB: DockableBox;
|
|
132
|
+
edge: string;
|
|
133
|
+
}): DockableBox;
|
|
134
|
+
/**
|
|
135
|
+
* Clip A with B. return where the boxes don't intersect.
|
|
136
|
+
* @param {DockableBox} rectA
|
|
137
|
+
* @param {DockableBox} rectB
|
|
138
|
+
*
|
|
139
|
+
* @memberof BoxMath
|
|
140
|
+
*/
|
|
141
|
+
static clipRect(rectA: DockableBox, rectB: DockableBox, edge: string): DockableBox;
|
|
142
|
+
}
|
|
143
|
+
export default BoxMath;
|
|
144
|
+
//# sourceMappingURL=boxMath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boxMath.d.ts","sourceRoot":"","sources":["../../../../../../src/platform/services/window/Docking/boxMath.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,EACX,MAAM,SAAS,CAAC;AACjB,OAAO,WAAW,MAAM,eAAe,CAAC;AA+CxC,cAAM,OAAO;IACZ,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO;IAwB5E;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE;IA2BjD;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,GAAE,MAAU,GAAG,eAAe;IAiJ1F;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW;IAahE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa;IAWpC;;;;;OAKG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO;IAalF;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAI/C;;;;;OAKG;IACH,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IA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AAI,EAAE,MAAM;CAgBpE;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
const clipRightToLeft = (clip, rectA, rectB) => {
|
|
2
|
+
clip.right = rectB.left;
|
|
3
|
+
if (rectB.top > rectA.bottom) {
|
|
4
|
+
clip.bottom = rectB.top;
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
const clipLeftToLeft = (clip, rectA, rectB) => {
|
|
8
|
+
clip.left = rectB.left;
|
|
9
|
+
if (rectB.top < rectA.bottom) {
|
|
10
|
+
clip.bottom = rectB.top;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const clipLeftToRight = (clip, rectA, rectB) => {
|
|
14
|
+
clip.left = rectB.right;
|
|
15
|
+
if (rectB.top > rectA.bottom) {
|
|
16
|
+
clip.bottom = rectB.top;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const clipRightToRight = (clip, rectA, rectB) => {
|
|
20
|
+
clip.right = rectB.right;
|
|
21
|
+
if (rectB.top < rectA.bottom) {
|
|
22
|
+
clip.bottom = rectB.top;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const maybeTopToBottom = (clip, rectA, rectB) => {
|
|
26
|
+
if (rectB.bottom > rectA.top) {
|
|
27
|
+
clip.top = rectB.bottom;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const clipRightToLeftMaybeTopToBottom = (clip, rectA, rectB) => {
|
|
31
|
+
clip.right = rectB.left;
|
|
32
|
+
if (rectB.bottom < rectA.top) {
|
|
33
|
+
clip.top = rectB.bottom;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const clipLeftToRightMaybeTopToBottom = (clip, rectA, rectB) => {
|
|
37
|
+
clip.left = rectB.right;
|
|
38
|
+
if (rectB.bottom < rectA.top) {
|
|
39
|
+
clip.top = rectB.bottom;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
class BoxMath {
|
|
43
|
+
static isPointOnSegment(point, segment) {
|
|
44
|
+
// y = mx + b;
|
|
45
|
+
// Equation above transforms into this:
|
|
46
|
+
// (y - y1) x - x1
|
|
47
|
+
// -------- = --------
|
|
48
|
+
// y2 - y1 x2 - x1
|
|
49
|
+
// which is this:
|
|
50
|
+
// (y - y1) * (x2 - x1) = (x - x1) * ( y2 - y1)
|
|
51
|
+
const { x } = point;
|
|
52
|
+
const { y } = point;
|
|
53
|
+
const x1 = segment.min.x;
|
|
54
|
+
const x2 = segment.max.x;
|
|
55
|
+
const y1 = segment.min.y;
|
|
56
|
+
const y2 = segment.max.y;
|
|
57
|
+
const isInBounds = x >= x1 && x <= x2 && y >= y1 && y <= y2;
|
|
58
|
+
// The equation above will tell us whether the point is on the line, assuming it has no start and end. This checks to see if the point is within the beginning and end of the segment. If not, it can't be on our segment.
|
|
59
|
+
if (!isInBounds) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return (y - y1) * (x1 - x2) === (x - x1) * (y1 - y2);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @function {function name}
|
|
66
|
+
* @param {type} req {description}
|
|
67
|
+
* @return {type} {description}
|
|
68
|
+
*/
|
|
69
|
+
static getVertices(req) {
|
|
70
|
+
return [
|
|
71
|
+
// top left
|
|
72
|
+
{
|
|
73
|
+
x: req.left,
|
|
74
|
+
y: req.top,
|
|
75
|
+
label: "topLeft",
|
|
76
|
+
},
|
|
77
|
+
// top right
|
|
78
|
+
{
|
|
79
|
+
x: req.right,
|
|
80
|
+
y: req.top,
|
|
81
|
+
label: "topRight",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
x: req.right,
|
|
85
|
+
y: req.bottom,
|
|
86
|
+
label: "bottomRight",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
x: req.left,
|
|
90
|
+
y: req.bottom,
|
|
91
|
+
label: "bottomLeft",
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @function {function name}
|
|
97
|
+
* @param {type} bounds {description}
|
|
98
|
+
* @param {type} bufferSize {description}
|
|
99
|
+
* @return {type} {description}
|
|
100
|
+
*/
|
|
101
|
+
static getSnappingRegions(bounds, bufferSize = 0) {
|
|
102
|
+
const { left, top, right, bottom } = bounds;
|
|
103
|
+
const leftMinusBuffer = left - bufferSize;
|
|
104
|
+
const leftPlusBuffer = left + bufferSize;
|
|
105
|
+
const topMinusBuffer = top - bufferSize;
|
|
106
|
+
const topPlusBuffer = top + bufferSize;
|
|
107
|
+
const rightMinusBuffer = right - bufferSize;
|
|
108
|
+
const rightPlusBuffer = right + bufferSize;
|
|
109
|
+
const bottomPlusBuffer = bottom + bufferSize;
|
|
110
|
+
const bottomMinusBuffer = bottom - bufferSize;
|
|
111
|
+
return {
|
|
112
|
+
topLeft: {
|
|
113
|
+
min: {
|
|
114
|
+
x: leftMinusBuffer,
|
|
115
|
+
y: topMinusBuffer,
|
|
116
|
+
},
|
|
117
|
+
max: {
|
|
118
|
+
x: leftPlusBuffer,
|
|
119
|
+
y: top,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
topRight: {
|
|
123
|
+
min: {
|
|
124
|
+
x: rightMinusBuffer,
|
|
125
|
+
y: topMinusBuffer,
|
|
126
|
+
},
|
|
127
|
+
max: {
|
|
128
|
+
x: rightPlusBuffer,
|
|
129
|
+
y: top,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
rightTop: {
|
|
133
|
+
min: {
|
|
134
|
+
x: right,
|
|
135
|
+
y: top,
|
|
136
|
+
},
|
|
137
|
+
max: {
|
|
138
|
+
x: rightPlusBuffer,
|
|
139
|
+
y: topPlusBuffer,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
rightBottom: {
|
|
143
|
+
min: {
|
|
144
|
+
x: right,
|
|
145
|
+
y: bottomMinusBuffer,
|
|
146
|
+
},
|
|
147
|
+
max: {
|
|
148
|
+
x: rightPlusBuffer,
|
|
149
|
+
y: bottom,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
bottomLeft: {
|
|
153
|
+
min: {
|
|
154
|
+
x: leftMinusBuffer,
|
|
155
|
+
y: bottom,
|
|
156
|
+
},
|
|
157
|
+
max: {
|
|
158
|
+
x: leftPlusBuffer,
|
|
159
|
+
y: bottomPlusBuffer,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
bottomRight: {
|
|
163
|
+
min: {
|
|
164
|
+
x: rightMinusBuffer,
|
|
165
|
+
y: bottom,
|
|
166
|
+
},
|
|
167
|
+
max: {
|
|
168
|
+
x: rightPlusBuffer,
|
|
169
|
+
y: bottomPlusBuffer,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
leftTop: {
|
|
173
|
+
min: {
|
|
174
|
+
x: leftMinusBuffer,
|
|
175
|
+
y: top,
|
|
176
|
+
},
|
|
177
|
+
max: {
|
|
178
|
+
x: left,
|
|
179
|
+
y: topPlusBuffer,
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
leftBottom: {
|
|
183
|
+
min: {
|
|
184
|
+
x: leftMinusBuffer,
|
|
185
|
+
y: bottomMinusBuffer,
|
|
186
|
+
},
|
|
187
|
+
max: {
|
|
188
|
+
x: left,
|
|
189
|
+
y: bottom,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
left: {
|
|
193
|
+
min: {
|
|
194
|
+
x: leftMinusBuffer,
|
|
195
|
+
y: topMinusBuffer,
|
|
196
|
+
},
|
|
197
|
+
max: {
|
|
198
|
+
x: leftPlusBuffer,
|
|
199
|
+
y: bottomPlusBuffer,
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
bottom: {
|
|
203
|
+
min: {
|
|
204
|
+
x: leftMinusBuffer,
|
|
205
|
+
y: bottom,
|
|
206
|
+
},
|
|
207
|
+
max: {
|
|
208
|
+
x: rightPlusBuffer,
|
|
209
|
+
y: bottomPlusBuffer,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
right: {
|
|
213
|
+
min: {
|
|
214
|
+
x: rightMinusBuffer,
|
|
215
|
+
y: topPlusBuffer,
|
|
216
|
+
},
|
|
217
|
+
max: {
|
|
218
|
+
x: rightPlusBuffer,
|
|
219
|
+
y: bottomPlusBuffer,
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
top: {
|
|
223
|
+
min: {
|
|
224
|
+
x: left,
|
|
225
|
+
y: topMinusBuffer,
|
|
226
|
+
},
|
|
227
|
+
max: {
|
|
228
|
+
x: right,
|
|
229
|
+
y: top,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
inner: {
|
|
233
|
+
min: {
|
|
234
|
+
x: left,
|
|
235
|
+
y: top,
|
|
236
|
+
},
|
|
237
|
+
max: {
|
|
238
|
+
x: right,
|
|
239
|
+
y: bottom,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* @function {function name}
|
|
246
|
+
* @param {type} bounds {description}
|
|
247
|
+
* @return {type} {description}
|
|
248
|
+
*/
|
|
249
|
+
static getWindowBoundingBox(bounds) {
|
|
250
|
+
return {
|
|
251
|
+
min: {
|
|
252
|
+
x: bounds.left,
|
|
253
|
+
y: bounds.top,
|
|
254
|
+
},
|
|
255
|
+
max: {
|
|
256
|
+
x: bounds.right,
|
|
257
|
+
y: bounds.bottom,
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
static between(params) {
|
|
262
|
+
const { min } = params;
|
|
263
|
+
const { max } = params;
|
|
264
|
+
const { num } = params;
|
|
265
|
+
const { inclusive } = params;
|
|
266
|
+
if (inclusive) {
|
|
267
|
+
return num >= min && num <= max;
|
|
268
|
+
}
|
|
269
|
+
return num > min && num < max;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @function {function name}
|
|
273
|
+
* @param {type} window1 {description}
|
|
274
|
+
* @param {type} window2 {description}
|
|
275
|
+
* @return {type} {description}
|
|
276
|
+
*/
|
|
277
|
+
static intersectBoundingBoxes(window1, window2) {
|
|
278
|
+
if (window1.max.x < window2.min.x) {
|
|
279
|
+
return false;
|
|
280
|
+
} // 1 is left of 2
|
|
281
|
+
if (window1.min.x > window2.max.x) {
|
|
282
|
+
return false;
|
|
283
|
+
} // 1 is right of 2
|
|
284
|
+
if (window1.max.y < window2.min.y) {
|
|
285
|
+
return false;
|
|
286
|
+
} // 1 is above 2
|
|
287
|
+
return window1.min.y <= window2.max.y;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @function {function name}
|
|
291
|
+
* @param {type} num {description}
|
|
292
|
+
* @param {type} pct {description}
|
|
293
|
+
* @return {type} {description}
|
|
294
|
+
*/
|
|
295
|
+
static getPct(num, pct) {
|
|
296
|
+
return pct * num;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @function {function name}
|
|
300
|
+
* @param {type} num {description}
|
|
301
|
+
* @param {type} pct {description}
|
|
302
|
+
* @return {type} {description}
|
|
303
|
+
*/
|
|
304
|
+
static scaleProportionately(num, pct) {
|
|
305
|
+
return Math.floor(num + this.getPct(num, pct));
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* @function {function name}
|
|
309
|
+
* @param {type} num1 {description}
|
|
310
|
+
* @param {type} num2 {description}
|
|
311
|
+
* @return {type} {description}
|
|
312
|
+
*/
|
|
313
|
+
static getPercentChange(num1, num2) {
|
|
314
|
+
let pctChange = Math.abs((num1 - num2) / num1);
|
|
315
|
+
if (num2 < num1) {
|
|
316
|
+
pctChange = -pctChange;
|
|
317
|
+
}
|
|
318
|
+
return pctChange;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Gets the area of the overlap between two rectangles.
|
|
322
|
+
* @param {*} rect1
|
|
323
|
+
* @param {*} rect2
|
|
324
|
+
*/
|
|
325
|
+
static getOverlap(rect1, rect2) {
|
|
326
|
+
let xOverlap;
|
|
327
|
+
if (rect1.left >= rect2.left && rect1.left <= rect2.right) {
|
|
328
|
+
xOverlap = rect2.right - rect1.left;
|
|
329
|
+
}
|
|
330
|
+
else if (rect2.left >= rect1.left && rect2.left <= rect1.right) {
|
|
331
|
+
xOverlap = rect1.right - rect2.left;
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
return 0;
|
|
335
|
+
}
|
|
336
|
+
let yOverlap;
|
|
337
|
+
if (rect1.top >= rect2.top && rect1.top <= rect2.bottom) {
|
|
338
|
+
yOverlap = rect2.bottom - rect1.top;
|
|
339
|
+
}
|
|
340
|
+
else if (rect2.top >= rect1.top && rect2.top <= rect1.bottom) {
|
|
341
|
+
yOverlap = rect1.bottom - rect2.top;
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
return 0;
|
|
345
|
+
}
|
|
346
|
+
return xOverlap * yOverlap;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Checks if point is in box (inclusive)
|
|
350
|
+
*/
|
|
351
|
+
static isPointInBox(point, box) {
|
|
352
|
+
const x = "x" in point ? point.x : point.left;
|
|
353
|
+
const y = "y" in point ? point.y : point.top;
|
|
354
|
+
if (!box.right)
|
|
355
|
+
box.right = box.left + box.width;
|
|
356
|
+
if (!box.bottom)
|
|
357
|
+
box.bottom = box.top + box.height;
|
|
358
|
+
return x >= box.left && x <= box.right && y >= box.top && y <= box.bottom;
|
|
359
|
+
}
|
|
360
|
+
static cornersInBox(corners, box) {
|
|
361
|
+
return corners.flatMap((corner) => {
|
|
362
|
+
// The goal here is to detect which edges of the clipping box exists within the clipped box's boundaries - EXCLUDING the edges of the clipped box.
|
|
363
|
+
/**
|
|
364
|
+
* The A = B + C. In other words, it's our hole. B is the window that we're using to fill the hole.
|
|
365
|
+
*
|
|
366
|
+
In this case, A and B share their top right and top left corners. ALl we care about here is the bottom left and bottom right of B.
|
|
367
|
+
The result of this function is C.
|
|
368
|
+
+-------------------+
|
|
369
|
+
| |
|
|
370
|
+
| |
|
|
371
|
+
| |
|
|
372
|
+
| |
|
|
373
|
+
| B |
|
|
374
|
+
| |
|
|
375
|
+
| |
|
|
376
|
+
| |
|
|
377
|
+
+-------------------+
|
|
378
|
+
| |
|
|
379
|
+
| |
|
|
380
|
+
| |
|
|
381
|
+
| |
|
|
382
|
+
| C |
|
|
383
|
+
| |
|
|
384
|
+
| |
|
|
385
|
+
| |
|
|
386
|
+
| |
|
|
387
|
+
| |
|
|
388
|
+
+-------------------+
|
|
389
|
+
* */
|
|
390
|
+
// The block of code below kicks out any points on B that are corners on A.
|
|
391
|
+
if (this.isPointInBox(corner, box)) {
|
|
392
|
+
const label = corner.label.toLowerCase();
|
|
393
|
+
const bottomRightMatch = label === "bottomright" && corner.y === box.bottom && corner.x === box.right;
|
|
394
|
+
const bottomLeftMatch = label === "bottomleft" && corner.y === box.bottom && corner.x === box.left;
|
|
395
|
+
const topLeftMatch = label === "topleft" && corner.x === box.left && corner.y === box.top;
|
|
396
|
+
const topRightMatch = label === "topright" && corner.x === box.right && corner.y === box.top;
|
|
397
|
+
if (!bottomRightMatch && !bottomLeftMatch && !topLeftMatch && !topRightMatch) {
|
|
398
|
+
return [label];
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return [];
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Going back to our example earlier. Remember, A is the larger box that encompasses B and C. In this case, only two corners are within A. (bottom left, bottom right).
|
|
406
|
+
+-------------------+
|
|
407
|
+
| |
|
|
408
|
+
| |
|
|
409
|
+
| |
|
|
410
|
+
| |
|
|
411
|
+
| B |
|
|
412
|
+
| |
|
|
413
|
+
| |
|
|
414
|
+
| |
|
|
415
|
+
+-------------------+
|
|
416
|
+
| |
|
|
417
|
+
| |
|
|
418
|
+
| |
|
|
419
|
+
| |
|
|
420
|
+
| C |
|
|
421
|
+
| |
|
|
422
|
+
| |
|
|
423
|
+
| |
|
|
424
|
+
| |
|
|
425
|
+
| |
|
|
426
|
+
+-------------------+
|
|
427
|
+
* */
|
|
428
|
+
static clipWithTwoSharedCorners({ clip, cornersInBox, box, }) {
|
|
429
|
+
// e.g. left edge is in box.
|
|
430
|
+
if (cornersInBox.includes("topleft") && cornersInBox.includes("bottomleft")) {
|
|
431
|
+
clip.right = box.left;
|
|
432
|
+
}
|
|
433
|
+
else if (cornersInBox.includes("topright") && cornersInBox.includes("bottomright")) {
|
|
434
|
+
clip.left = box.right;
|
|
435
|
+
}
|
|
436
|
+
else if (cornersInBox.includes("topleft") && cornersInBox.includes("topright")) {
|
|
437
|
+
clip.bottom = box.top;
|
|
438
|
+
}
|
|
439
|
+
else if (cornersInBox.includes("bottomleft") && cornersInBox.includes("bottomright")) {
|
|
440
|
+
clip.top = box.bottom;
|
|
441
|
+
}
|
|
442
|
+
return clip;
|
|
443
|
+
}
|
|
444
|
+
/** **
|
|
445
|
+
* In this case, A is the wide horizontal box. B is the tall vertical box. Their bottom left corners align at point X.
|
|
446
|
+
* In this case, only one corner (bottom left of B) is within the bounds of A.
|
|
447
|
+
|
|
448
|
+
B
|
|
449
|
+
+------------------+
|
|
450
|
+
| |
|
|
451
|
+
| |
|
|
452
|
+
| |
|
|
453
|
+
| |
|
|
454
|
+
| |
|
|
455
|
+
| |
|
|
456
|
+
| |
|
|
457
|
+
| |
|
|
458
|
+
| |
|
|
459
|
+
| |
|
|
460
|
+
| |
|
|
461
|
+
+---------------------------------------------------------------------+
|
|
462
|
+
| | |
|
|
463
|
+
| | |
|
|
464
|
+
| | |
|
|
465
|
+
| | CLIP | A
|
|
466
|
+
| | |
|
|
467
|
+
| | |
|
|
468
|
+
+------------------+--------------------------------------------------+
|
|
469
|
+
X
|
|
470
|
+
*/
|
|
471
|
+
static clipWithOneSharedCorner({ clip, cornersInBox, rectA, rectB, edge, }) {
|
|
472
|
+
const ISLEFTORRIGHT = edge === "left" || edge === "right";
|
|
473
|
+
const ISTOPORBOTTOM = edge === "top" || edge === "bottom";
|
|
474
|
+
if (cornersInBox.includes("topleft")) {
|
|
475
|
+
ISTOPORBOTTOM ? clipRightToLeft(clip, rectA, rectB) : clipLeftToLeft(clip, rectA, rectB);
|
|
476
|
+
}
|
|
477
|
+
else if (cornersInBox.includes("topright")) {
|
|
478
|
+
ISTOPORBOTTOM ? clipLeftToRight(clip, rectA, rectB) : clipRightToRight(clip, rectA, rectB);
|
|
479
|
+
}
|
|
480
|
+
else if (cornersInBox.includes("bottomleft")) {
|
|
481
|
+
ISLEFTORRIGHT ? maybeTopToBottom(clip, rectA, rectB) : clipRightToLeftMaybeTopToBottom(clip, rectA, rectB);
|
|
482
|
+
}
|
|
483
|
+
else
|
|
484
|
+
ISLEFTORRIGHT ? maybeTopToBottom(clip, rectA, rectB) : clipLeftToRightMaybeTopToBottom(clip, rectA, rectB);
|
|
485
|
+
return clip;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Clip A with B. return where the boxes don't intersect.
|
|
489
|
+
* @param {DockableBox} rectA
|
|
490
|
+
* @param {DockableBox} rectB
|
|
491
|
+
*
|
|
492
|
+
* @memberof BoxMath
|
|
493
|
+
*/
|
|
494
|
+
static clipRect(rectA, rectB, edge) {
|
|
495
|
+
let clip = rectA;
|
|
496
|
+
const corners = this.getVertices(rectB);
|
|
497
|
+
// This array will hold the corners of the clipping rectangle that are within the clipped rectangle's boundaries.
|
|
498
|
+
const cornersInBox = BoxMath.cornersInBox(corners, rectA);
|
|
499
|
+
if (cornersInBox.length === 2) {
|
|
500
|
+
clip = BoxMath.clipWithTwoSharedCorners({ clip, cornersInBox, box: rectB });
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
clip = BoxMath.clipWithOneSharedCorner({ clip, cornersInBox, rectA, rectB, edge });
|
|
504
|
+
}
|
|
505
|
+
clip.width = clip.right - clip.left;
|
|
506
|
+
clip.height = clip.bottom - clip.top;
|
|
507
|
+
return clip;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
export default BoxMath;
|
|
511
|
+
//# sourceMappingURL=boxMath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boxMath.js","sourceRoot":"","sources":["../../../../../../src/platform/services/window/Docking/boxMath.ts"],"names":[],"mappings":"AAWA,MAAM,eAAe,GAAG,CAAC,IAAiB,EAAE,KAAkB,EAAE,KAAkB,EAAE,EAAE;IACrF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC;KACxB;AACF,CAAC,CAAC;AACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,KAAkB,EAAE,KAAkB,EAAE,EAAE;IACpF,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACvB,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC;KACxB;AACF,CAAC,CAAC;AACF,MAAM,eAAe,GAAG,CAAC,IAAiB,EAAE,KAAkB,EAAE,KAAkB,EAAE,EAAE;IACrF,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;IACxB,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC;KACxB;AACF,CAAC,CAAC;AACF,MAAM,gBAAgB,GAAG,CAAC,IAAiB,EAAE,KAAkB,EAAE,KAAkB,EAAE,EAAE;IACtF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IACzB,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC;KACxB;AACF,CAAC,CAAC;AAEF,MAAM,gBAAgB,GA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