Browse Source

Don't copy the component only when the editor is in text editing mode

pull/1229/head
Artur Arseniev 8 years ago
parent
commit
1874fe8a23
  1. 2
      src/commands/view/CopyComponent.js
  2. 2
      src/commands/view/PasteComponent.js

2
src/commands/view/CopyComponent.js

@ -3,7 +3,7 @@ module.exports = {
const em = ed.getModel();
const models = [...ed.getSelectedAll()];
if (models.length && !ed.Canvas.isInputFocused()) {
if (models.length && !em.isEditing()) {
em.set('clipboard', models);
}
}

2
src/commands/view/PasteComponent.js

@ -6,7 +6,7 @@ module.exports = {
const clp = em.get('clipboard');
const selected = ed.getSelected();
if (clp && selected && !ed.Canvas.isInputFocused()) {
if (clp && selected && !em.isEditing()) {
ed.getSelectedAll().forEach(comp => {
if (!comp) return;
const coll = comp.collection;

Loading…
Cancel
Save