feat: 实时更新背景色+选取剪切+选取删除初步开发完成
This commit is contained in:
@@ -1753,7 +1753,7 @@ export class LayerManager {
|
||||
* 更新背景图层颜色
|
||||
* @param {string} backgroundColor 背景颜色
|
||||
*/
|
||||
updateBackgroundColor(backgroundColor) {
|
||||
updateBackgroundColor(backgroundColor, options = {}) {
|
||||
const backgroundLayer = this.layers.value.find(
|
||||
(layer) => layer.isBackground
|
||||
);
|
||||
@@ -1768,10 +1768,14 @@ export class LayerManager {
|
||||
canvas: this.canvas,
|
||||
layers: this.layers,
|
||||
canvasManager: this.canvasManager,
|
||||
layerManger: this,
|
||||
backgroundColor,
|
||||
backgroundColorValue: this.backgroundColor,
|
||||
oldColor: options.oldColor,
|
||||
});
|
||||
|
||||
command.undoable = isBoolean(options.undoable) ? options.undoable : true; // 设置为可撤销
|
||||
|
||||
// 执行命令
|
||||
if (this.commandManager) {
|
||||
this.commandManager.execute(command);
|
||||
|
||||
Reference in New Issue
Block a user