new_item = new @target_model(item.attributes)\r
new_item.unset('id', {silent: true})\r
new_item.set({panel_id: @editor().item.get('id')}, {silent: true})\r
- balloon.unset('id', {silent: true})\r
- balloon.unset('speech_balloon_id', {silent: true})\r
- speech.unset('id', {silent: true})\r
- speech.unset('speech_balloon_id', {silent: true})\r
+ new_balloon = balloon.clone()\r
+ new_balloon.unset('id', {silent: true})\r
+ new_balloon.unset('speech_balloon_id', {silent: true})\r
+ new_speech = speech.clone()\r
+ new_speech.unset('id', {silent: true})\r
+ new_speech.unset('speech_balloon_id', {silent: true})\r
new_item.boosts 'post'\r
- balloon.boosts 'post'\r
- speech.boosts 'post'\r
- new_item.set({balloon: balloon, speech: speech}, {silent: true})\r
+ new_balloon.boosts 'post'\r
+ new_speech.boosts 'post'\r
+ new_item.set({balloon: new_balloon, speech: new_speech}, {silent: true})\r
@trigger('ready', new_item)\r
})\r
})\r