widget fresh copy also resets path and doesn't leave extra commas throwing errors
This commit is contained in:
parent
9d2e5de17f
commit
2ac88a1e8d
2 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## 0.3.1
|
||||
|
||||
- editor paste menu lets you choose between `Same ID` (cloned widgets) or `New ID`
|
||||
- editor paste menu lets you choose between `Same ID` (cloned widgets) or `New ID` (resets id, label, linkId, and path)
|
||||
- example update
|
||||
- minor style updates
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ var init = function(){
|
|||
actions['<i class="fa fa-paste"></i> Paste'] = {
|
||||
'<i class="fa fa-object-ungroup"></i> New ID':function(){
|
||||
data.widgets = data.widgets || []
|
||||
var newData = JSON.parse(JSON.stringify(CLIPBOARD).replace(/\"(id|label|linkId)\"\:\"([^\"]*)\"\,?/g,''))
|
||||
var newData = JSON.parse(JSON.stringify(CLIPBOARD).replace(/\"(id|label|linkId|path)\"\:\"([^\"]*)\"\,?/g,'').replace(/\,\}/g,'\}'))
|
||||
data.widgets.push(newData)
|
||||
updateDom(container,data)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue