This commit is contained in:
X1627315083
2024-03-12 09:42:08 +08:00
parent c43763ad0a
commit d725bc7d71
3 changed files with 27 additions and 17 deletions

View File

@@ -884,17 +884,17 @@ export default defineComponent({
polyLineBtn.on('mousedown',()=>{
canvas.skipTargetFind = true
let points = currentPatterning.points
currentPatterning.points.pop()
currentPatterning.points.pop()
// canvas.remove(currentPatterning)
// let polyline = new fabric.Polyline(points, {
// fill: 'transparent',
// stroke: canvasPencilColor.value,
// strokeWidth:canvasPencilWidth.value,
// selection:false,
// })
// canvas.add(polyline)
currentPatterning.set({stroke: canvasPencilColor.value})
points.pop()
points.pop()
canvas.remove(currentPatterning)
let polyline = new fabric.Polyline(points, {
fill: 'transparent',
stroke: canvasPencilColor.value,
strokeWidth:canvasPencilWidth.value,
selection:false,
})
canvas.add(polyline)
// currentPatterning.set({stroke: canvasPencilColor.value})
createPatterningIs = false
clearPatterning()//临时图形置为空并且添加撤回对象里面
})