fix(image-annotate): 图层 z 序统一 + 排序按钮/选中修复(1.0.5)

- 根因:粘贴图片用 S.layers.length 当 z,矢量用 ++S.zCounter ⇒ z 撞车;
  面板/DOM/合成/命中四处各自排序,导致排序按钮交换 z 无效、截图选不中、双高亮
- objects.js 新增 layerUnits()/layerUnitsDesc()/assignLayerZ()/selectUnit()/hitTopmost():
  图层顺序唯一真源、连续 z、选中态唯一、统一 z 降序命中
- moveLayer 改为统一列表重排(置顶/上移/下移/置底全部生效,base 固定在最底不吞元素)
- placement 改 ++S.zCounter;deleteLayer 不再重置位图 z;面板高亮与画笔目标(✎)分离
- 形状/文字/钢笔创建、裁剪、清空标注、重开编辑器均清旧位图选中 id
- e2e 补 9 条回归断言(真站 22/22 通过);README 记录与上游的偏离,防回灌覆盖
This commit is contained in:
qiqi committed 2026-11-04 16:14:57 +08:00
1 parent 5f9303986a
commit b9ace636ef
13 files changed
+432 -398

No files matched your search

+2
View File
@@ -772,6 +772,8 @@
.iwb-layer-item[draggable="true"] { cursor: grab; }
.iwb-layer-item.dragging { opacity: 0.45; }
.iwb-layer-item.drop-target { outline: 1px dashed #e8a735; background: rgba(232, 167, 53, 0.16); }
/* 画笔/橡皮作用目标:与「选中」分离,避免出现两个图层同时高亮 */
.iwb-layer-paint { flex: 0 0 auto; color: #a6adc8; font-size: 11px; opacity: 0.85; }
.iwb-layer-color { width: 22px; height: 22px; padding: 0; border: 1px solid #45475a; border-radius: 50%; background: transparent; cursor: pointer; flex: 0 0 auto; }
.iwb-layer-width { width: 42px; height: 22px; padding: 2px 3px; border: 1px solid #45475a; border-radius: 4px; background: #1e1e2e; color: #e8a735; font-size: 11px; text-align: center; flex: 0 0 auto; }
.iwb-layer-width:focus { outline: none; border-color: #e8a735; }