选择工具开发一半, 修改新建图层顺序名称
This commit is contained in:
@@ -910,6 +910,17 @@ export class LayerManager {
|
||||
return layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据name获取图层
|
||||
* @param {string} layerName 图层名称
|
||||
* @returns {Object|null} 图层对象或null
|
||||
*/
|
||||
getLayerByName(layerName) {
|
||||
const layer = this.layers.value.find((layer) => layer.name === layerName);
|
||||
return layer || null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前图层对象的列表
|
||||
* @param {string} layerId 可选,指定图层ID,默认使用当前活动图层
|
||||
|
||||
@@ -181,10 +181,15 @@ export class CanvasEventManager {
|
||||
setupMouseEvents() {
|
||||
// 鼠标按下事件
|
||||
this.canvas.on("mouse:down", (opt) => {
|
||||
// console.log("==========鼠标按下",opt)
|
||||
// 平滑停止任何正在进行的惯性动画
|
||||
this.stopInertiaAnimation(true);
|
||||
|
||||
if (
|
||||
// if (opt.e.which === 3 && this.editorMode === OperationType.SELECT) {
|
||||
// console.log("==========选择模式鼠标右击画布对象")
|
||||
|
||||
// } else
|
||||
if (
|
||||
opt.e.altKey ||
|
||||
opt.e.which === 2 ||
|
||||
this.editorMode === OperationType.PAN
|
||||
|
||||
Reference in New Issue
Block a user