|
@@ -43,6 +43,7 @@ export const create = (store, canvas) => {
|
|
|
]
|
|
|
shape.data.content = data
|
|
|
shape.setContent = (newData) => {
|
|
|
+ console.log(newData)
|
|
|
shape.data.content = newData
|
|
|
update(newData)
|
|
|
}
|
|
@@ -83,16 +84,13 @@ export const create = (store, canvas) => {
|
|
|
const board = {
|
|
|
bus: refs.bus,
|
|
|
el: canvas,
|
|
|
- getCurrentStore:() => ({ ...store, ...toStore(refs) }),
|
|
|
- drawStore(newStore) {
|
|
|
- refs.ctx.clearRect(0,0, canvas.width, canvas.height)
|
|
|
- refs.shapes = []
|
|
|
- refs.baseMap = null
|
|
|
- generateRefs(newStore)
|
|
|
- },
|
|
|
getStore() {
|
|
|
+ console.log(layer.uiControl.exportJSON())
|
|
|
return store
|
|
|
},
|
|
|
+ viewInit() {
|
|
|
+ layer.uiControl.menu_flex()
|
|
|
+ },
|
|
|
unSelectShape() {
|
|
|
layer.uiControl.clearUI()
|
|
|
},
|
|
@@ -116,6 +114,7 @@ export const create = (store, canvas) => {
|
|
|
refs.bus.emit('storeChange')
|
|
|
},
|
|
|
export() {
|
|
|
+ layer.uiControl.menu_screenShot()
|
|
|
return new Promise(resolve => canvas.toBlob(resolve))
|
|
|
},
|
|
|
destroy() {
|