11 lines
464 B
TypeScript
11 lines
464 B
TypeScript
|
export function getActiveProperties(position: any): [string, string] {
|
||
|
if (position.top !== "auto" && position.left !== "auto") {
|
||
|
return ["top", "left"]; // Top-left
|
||
|
} else if (position.top !== "auto" && position.right !== "auto") {
|
||
|
return ["top", "right"]; // Top-right
|
||
|
} else if (position.bottom !== "auto" && position.left !== "auto") {
|
||
|
return ["bottom", "left"]; // Bottom-left
|
||
|
} else {
|
||
|
return ["bottom", "right"]; // Bottom-right
|
||
|
}
|
||
|
}
|