@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
10 lines • 475 B
JavaScript
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
export const getDragBehaviour = ({
altKey,
ctrlKey
}) => {
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
const isCloneModifierKeyPressed = browser.mac ? altKey : ctrlKey;
return isCloneModifierKeyPressed ? 'clone' : 'move';
};