Browse Source
Merge pull request #1644 from david-polak/component-clone-propagate
Add component:clone propagation
pull/1656/head
Artur Arseniev
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
src/dom_components/model/Component.js
|
|
|
@ -704,7 +704,11 @@ const Component = Backbone.Model.extend(Styleable).extend( |
|
|
|
attr.style = style; |
|
|
|
} |
|
|
|
|
|
|
|
return new this.constructor(attr, opts); |
|
|
|
const cloned = new this.constructor(attr, opts); |
|
|
|
if (em) { |
|
|
|
em.trigger('component:clone', cloned); |
|
|
|
} |
|
|
|
return cloned; |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|