fix: Codify component weights with toolbox in front of flyouts. (#8432)

This commit is contained in:
John Nesky
2024-07-29 10:30:29 -07:00
committed by GitHub
parent 0f74186227
commit e2310a4fed
5 changed files with 16 additions and 4 deletions

View File

@@ -224,6 +224,16 @@ export class ComponentManager {
}
export namespace ComponentManager {
export enum ComponentWeight {
// The toolbox weight is lower (higher precedence) than the flyout, so that
// if both are under the pointer, the toolbox takes precedence even though
// the flyout's drag target area is large enough to include the toolbox.
TOOLBOX_WEIGHT = 0,
FLYOUT_WEIGHT = 1,
TRASHCAN_WEIGHT = 2,
ZOOM_CONTROLS_WEIGHT = 3,
}
/** An object storing component information. */
export interface ComponentDatum {
component: IComponent;
@@ -232,4 +242,6 @@ export namespace ComponentManager {
}
}
export type ComponentWeight = ComponentManager.ComponentWeight;
export const ComponentWeight = ComponentManager.ComponentWeight;
export type ComponentDatum = ComponentManager.ComponentDatum;