mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 新增图层
This commit is contained in:
@@ -23,8 +23,7 @@ export const handleDrop = async (e: DragEvent) => {
|
||||
// 创建新图表组件
|
||||
let newComponent = await createComponent(dropData)
|
||||
|
||||
const { w, h } = dropData.chartData.chartSize
|
||||
newComponent.setPosition(e.offsetX - w / 2, e.offsetY - h / 2)
|
||||
newComponent.setPosition(e.offsetX - newComponent.attr.w / 2, e.offsetY - newComponent.attr.h / 2)
|
||||
chartEditStore.addComponentList(newComponent)
|
||||
|
||||
loadingFinish()
|
||||
|
||||
Reference in New Issue
Block a user