You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
429 B

2 years ago
// @flow
import type { DragImpact, DraggableLocation, Combine } from '../types';
export function tryGetDestination(impact: DragImpact): ?DraggableLocation {
if (impact.at && impact.at.type === 'REORDER') {
return impact.at.destination;
}
return null;
}
export function tryGetCombine(impact: DragImpact): ?Combine {
if (impact.at && impact.at.type === 'COMBINE') {
return impact.at.combine;
}
return null;
}