修复bug

This commit is contained in:
X1627315083
2025-01-17 17:16:01 +08:00
parent a3ca957c87
commit b5124abbfa
19 changed files with 896 additions and 46 deletions

View File

@@ -683,6 +683,11 @@ class MyCanvas {
}
await obj.clone((cloned)=>{
let {width,height,left,top} = position
cloned.set({
custom:{
dashed:true
}
})
// cloned.set({left:cloned.strokeWidth/2,top:cloned.strokeWidth/2})
let group = new fabric.Group([cloned],{
left:left + cloned.strokeWidth/2,
@@ -1471,7 +1476,8 @@ class MyCanvas {
if(!options?.target?.custom?.dashed && this.layer.selectLayer.group.custom.groupType == 'Grid'){
await new Promise((resolve, reject) => {
let clipPathElement = this.clipPath.clipGroup._objects.filter(obj => obj.custom)[0]
console.log(this.clipPath.clipGroup);
let clipPathElement = this.clipPath.clipGroup._objects.filter(obj => obj.custom?.dashed)[0]
let clipPathLect = this.clipPath.clipGroup.left
let clipPathTop = this.clipPath.clipGroup.top