同步印花的缩放偏移显示
This commit is contained in:
@@ -736,15 +736,40 @@ export class ToolManager {
|
||||
if (!isExecute && this.canvasManager && this.canvasManager.partManager) {
|
||||
this.canvasManager.partManager.setCurrentTool(OperationType.PART_BRUSH);
|
||||
}
|
||||
const greenColor = "#0f0";
|
||||
// 确保有笔刷管理器
|
||||
if (this.brushManager) {
|
||||
// 设置绿色笔刷
|
||||
this.brushManager.setBrushColor(greenColor); // 纯绿色
|
||||
this.brushManager.setBrushOpacity(200/255); // 完全不透明
|
||||
this.brushManager.setBrushType("pencil"); // 铅笔类型
|
||||
|
||||
// 更新笔刷大小(使用当前大小)
|
||||
if (BrushStore && BrushStore.state.size) {
|
||||
this.brushManager.setBrushSize(BrushStore.state.size);
|
||||
}
|
||||
|
||||
// 更新应用到画布
|
||||
this.brushManager.updateBrush();
|
||||
}
|
||||
|
||||
// 启用笔刷指示器并设置绿色
|
||||
this._enableBrushIndicator(greenColor);
|
||||
}
|
||||
/**
|
||||
* 设置部件选取工具--橡皮擦
|
||||
*/
|
||||
setupPartEraserTool(isExecute = false) {
|
||||
if (!this.canvas) return;
|
||||
this.canvas.isDrawingMode = false;
|
||||
this.canvas.isDrawingMode = true;
|
||||
this.canvas.selection = false;
|
||||
if (!isExecute && this.canvasManager && this.canvasManager.partManager) {
|
||||
if (this.brushManager) {
|
||||
this.brushManager.createEraser();
|
||||
}
|
||||
// 启用笔刷指示器
|
||||
this._enableBrushIndicator();
|
||||
|
||||
if (!isExecute && this.canvasManager && this.canvasManager.partManager) {
|
||||
this.canvasManager.partManager.setCurrentTool(OperationType.PART_ERASER);
|
||||
}
|
||||
}
|
||||
@@ -1602,7 +1627,9 @@ export class ToolManager {
|
||||
OperationType.ERASER,
|
||||
OperationType.RED_BRUSH,
|
||||
OperationType.GREEN_BRUSH,
|
||||
OperationType.LIQUIFY,
|
||||
OperationType.LIQUIFY,
|
||||
OperationType.PART_BRUSH,
|
||||
OperationType.PART_ERASER,
|
||||
];
|
||||
|
||||
return brushTools.includes(currentTool);
|
||||
|
||||
Reference in New Issue
Block a user