深度画布
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { fabric } from 'fabric-with-all'
|
||||
import { OperationType } from '../tools/layerHelper'
|
||||
import { OperationType, AI_SELECTBOX_TYPE } from '../tools/layerHelper'
|
||||
import { getObjectAlphaToCanvas, traceImageContour } from '../tools/canvasMethod'
|
||||
|
||||
/** 智能框选工具管理器 */
|
||||
@@ -20,6 +20,15 @@ export class AISelectboxToolManager {
|
||||
this.layerManager = options.layerManager
|
||||
this.toolManager = options.toolManager
|
||||
}
|
||||
/** 处理切换工具 */
|
||||
handleToolChange(oldTool: string, newTool: string) {
|
||||
if (newTool === OperationType.SELECTBOX) {
|
||||
// 切换到智能框选工具
|
||||
} else {
|
||||
// 切换到普通框选工具
|
||||
|
||||
}
|
||||
}
|
||||
mouseDownEvent(e) {
|
||||
this.isDragging = true
|
||||
this.startX = e.absolutePointer.x
|
||||
@@ -65,7 +74,7 @@ export class AISelectboxToolManager {
|
||||
this.canvasManager.canvas.remove(this.demoObject)
|
||||
this.canvasManager.canvas.renderAll()
|
||||
|
||||
this.createSelectbox()
|
||||
// this.createSelectbox()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user