From 0bd29cc3ea6ec24c2467943a723bc8c398282d71 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 13 Oct 2018 16:49:53 +0200 Subject: [PATCH] clone: don't reset auto ids (maybe to be added as an option) --- src/browser/js/app/widgets/containers/clone.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/browser/js/app/widgets/containers/clone.js b/src/browser/js/app/widgets/containers/clone.js index 107ad956..b0e223bd 100644 --- a/src/browser/js/app/widgets/containers/clone.js +++ b/src/browser/js/app/widgets/containers/clone.js @@ -130,14 +130,6 @@ class Clone extends Widget { this.container.classList.remove('empty') this.container.classList.add(...this.cloneClass) let clonedProps = deepCopy(this.cloneTarget.props) - function resetAutoIds(ob){ - if(ob.widgets) - for (const o of ob.widgets){resetAutoIds(o)} - if( ob.id && ob.id.startsWith(ob.type+'_')){ - ob.id = "auto" - } - } - resetAutoIds(clonedProps) var clone = parser.parse([{...clonedProps, ...this.getProp('props')}], this.widget, this) if (clone.getProp('id') === this.cloneTarget.getProp('id')) {