|
@@ -32,7 +32,6 @@ export const create = (store, canvas) => {
|
|
|
}
|
|
|
}
|
|
|
const update = (newData) => {
|
|
|
- shape.data.content = newData
|
|
|
layer.uiControl.setAttributes(type, 'update', newData)
|
|
|
}
|
|
|
switch (type) {
|
|
@@ -42,13 +41,19 @@ export const create = (store, canvas) => {
|
|
|
{ width: 160, height: 60, value: '', colIndex: 1, rowIndex: 0 },
|
|
|
]
|
|
|
shape.data.content = data
|
|
|
- shape.setContent = update
|
|
|
+ shape.setContent = (newData) => {
|
|
|
+ shape.data.content = newData
|
|
|
+ update(newData)
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
case text: {
|
|
|
data = data || ''
|
|
|
shape.data.text = data
|
|
|
- shape.setText = update
|
|
|
+ shape.setText = (newData) => {
|
|
|
+ shape.data.text = newData
|
|
|
+ update(newData)
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -92,7 +97,6 @@ export const create = (store, canvas) => {
|
|
|
forward() {
|
|
|
history.handleRedo()
|
|
|
},
|
|
|
-
|
|
|
setImage(url) {
|
|
|
refs.baseMap.changeImage(url)
|
|
|
refs.bus.emit('storeChange')
|