mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-11-04 12:54:23 +01:00 
			
		
		
		
	fix zindex to account for group boundaries (#2065)
This commit is contained in:
		@@ -45,10 +45,17 @@ export function isSelectedViaGroup(
 | 
			
		||||
  appState: AppState,
 | 
			
		||||
  element: ExcalidrawElement,
 | 
			
		||||
) {
 | 
			
		||||
  return !!element.groupIds
 | 
			
		||||
  return getSelectedGroupForElement(appState, element) != null;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const getSelectedGroupForElement = (
 | 
			
		||||
  appState: AppState,
 | 
			
		||||
  element: ExcalidrawElement,
 | 
			
		||||
) => {
 | 
			
		||||
  return element.groupIds
 | 
			
		||||
    .filter((groupId) => groupId !== appState.editingGroupId)
 | 
			
		||||
    .find((groupId) => appState.selectedGroupIds[groupId]);
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export function getSelectedGroupIds(appState: AppState): GroupId[] {
 | 
			
		||||
  return Object.entries(appState.selectedGroupIds)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user