Browse Source

Move last selected component (#5847)

pull/5899/head
Stefano Azzalini 2 years ago
committed by GitHub
parent
commit
5aef0b9db6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/commands/index.ts

2
src/commands/index.ts

@ -141,7 +141,7 @@ export default class CommandsModule extends Module<CommandsConfig & { pStylePref
const trg = opts.target as Component | undefined;
const trgs = trg ? [trg] : [...ed.getSelectedAll()];
const targets = trgs.map(trg => trg.delegate?.move?.(trg) || trg).filter(Boolean);
const target = targets[0] as Component | undefined;
const target = targets[targets.length - 1] as Component | undefined;
const nativeDrag = event?.type === 'dragstart';
const modes = ['absolute', 'translate'];

Loading…
Cancel
Save