feat(image-annotate): v1.2.11 选中框手柄/旋转手柄/顶栏与选项栏打磨

- 缩放手柄 17px→11px(形状/文字/位图/放置四处统一),命中半径同步收小
- 旋转手柄重绘:细弧+末端小箭头(旋转语义更直观),线更细、色 #f0b34e
- Shift+X 切换选中形状 描边/实心(箭头无实心给提示);isTyping 放行 Shift 组合键,
  参数数字框里按 Shift+X 不再被吞
- 硬度:滑杆 84→140px + 5 个快捷点(0/25/50/75/100);笔刷推荐大小 7→4 个
- 顶栏:标题在最前,新建/覆盖/退出跟其后且三键统一中性色;标题后与撤销组后各加竖分隔
- harness 更新/新增断言(115 项全绿)
This commit is contained in:
qiqi committed 2026-11-04 23:06:39 +08:00
1 parent 0d161d6ded
commit c176744846
10 files changed
+153 -59

No files matched your search

+47 -20
View File
@@ -9,7 +9,7 @@
var __IWB_ANNOTATE_MANIFEST__ = {
id: 'image-annotate',
name: '标注 / 修图',
version: '1.2.10',
version: '1.2.11',
apiVersion: 1,
capabilities: ['commands', 'nodeActions', 'canvas', 'canvasWrite'],
settings: {
@@ -253,7 +253,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
ctx.closePath();
ctx.stroke();
ctx.setLineDash([]);
const hs = 8 / S.zoom;
const hs = 5.5 / S.zoom;
ctx.fillStyle = "#fff";
ctx.strokeStyle = "#4488ff";
ctx.lineWidth = 1.5 / S.zoom;
@@ -1114,7 +1114,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
if (hitRotationHandle(lp, b)) return "rotate";
const pts = shapeHandlePoints(s);
const offset = 8 / S.zoom;
const R = Math.max(18 / S.zoom, 11);
const R = Math.max(14 / S.zoom, 9);
let best = null, bestDist = 1e9;
for (const name in pts) {
const px = pts[name][0] + (name.includes("w") ? -offset : name.includes("e") ? offset : 0);
@@ -1225,7 +1225,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
octx.closePath();
octx.stroke();
octx.setLineDash([]);
const hs = 8.5 / S.zoom;
const hs = 5.5 / S.zoom;
octx.fillStyle = "#ffffff";
octx.strokeStyle = "#e8a735";
const pts = shapeHandleWorld(s);
@@ -1276,7 +1276,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
octx.closePath();
octx.stroke();
octx.setLineDash([]);
const hs = 7 / S.zoom;
const hs = 5.5 / S.zoom;
octx.fillStyle = "#ffffff";
octx.strokeStyle = "#e8a735";
const pts = textHandlePoints(sel);
@@ -1667,7 +1667,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
if (!(box.w > 0 && box.h > 0)) return;
const ctx = S.overlayCtx;
const rot = layer.rotation || 0;
const hs = 7 / S.zoom;
const hs = 5.5 / S.zoom;
ctx.save();
ctx.strokeStyle = "#e8a735";
ctx.lineWidth = 1.5 / S.zoom;
@@ -2673,18 +2673,19 @@ var __IWB_ANNOTATE_MANIFEST__ = {
runtime.el.innerHTML = `
<div class="iwb-editor-modal">
<div class="iwb-editor-header">
<!-- 会话组(v1.2.9):新建/覆盖/退出从顶栏最右移到最左(用户裁定 2026-11-04) -->
<span class="iwb-editor-title">图片编辑 <em class="iwb-editor-doc-size">—</em></span>
<!-- 会话组(v1.2.9):标题是标题、按钮是按钮 —— 新建/覆盖/退出跟在标题后(用户裁定 2026-11-04 晚) -->
<div class="iwb-editor-session">
<button class="iwb-editor-btn iwb-editor-btn-new" data-action="newNode" title="把当前编辑结果新建为节点(不关闭编辑器)">新建</button>
<button class="iwb-editor-btn iwb-editor-btn-replace" data-action="replace" title="用当前编辑结果覆盖原图">覆盖</button>
<button class="iwb-editor-btn iwb-editor-btn-cancel" data-action="cancel" title="放弃修改并退出">退出</button>
</div>
<span class="iwb-editor-title">图片编辑 <em class="iwb-editor-doc-size">—</em></span>
<div class="iwb-editor-history">
<button class="iwb-editor-action" data-action="undo" title="撤销 (Ctrl+Z)"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg></button>
<button class="iwb-editor-action" data-action="redo" title="重做 (Ctrl+Shift+Z)"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/></svg></button>
<button class="iwb-editor-action iwb-editor-action-reset" data-action="reset" title="还原原图:删掉所有标注/图层,回到打开时的样子(Ctrl+Z 可撤销)"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/></svg></button>
</div>
<span class="iwb-editor-divider"></span>
<!-- 顶栏命令带(v1.2.6):撤销/重做/还原 | 顺序 | 视图;图层新建/导入回图层面板标题栏 -->
<div class="iwb-editor-commands">
<div class="iwb-editor-cmdgroup" data-group="order" title="调整选中元素的图层顺序">
@@ -3705,8 +3706,8 @@ var __IWB_ANNOTATE_MANIFEST__ = {
function fillStyleHTML(owner) {
const fill = owner === "pen" ? S.penFill : S.rectFill;
return `<span class="iwb-opt-label">样式</span>
<button class="iwb-opt-btn${fill ? "" : " active"}" data-opt-toggle="stroke" data-fill-owner="${owner}" data-value="stroke">描边</button>
<button class="iwb-opt-btn${fill ? " active" : ""}" data-opt-toggle="fill" data-fill-owner="${owner}" data-value="fill">实心</button>`;
<button class="iwb-opt-btn${fill ? "" : " active"}" data-opt-toggle="stroke" data-fill-owner="${owner}" data-value="stroke" title="描边 (Shift+X 切换)">描边</button>
<button class="iwb-opt-btn${fill ? " active" : ""}" data-opt-toggle="fill" data-fill-owner="${owner}" data-value="fill" title="实心 (Shift+X 切换)">实心</button>`;
}
var SHAPE_NAMES = { rect: "矩形", circle: "圆形", arrow: "箭头", pen: "钢笔路径" };
var SELCMD_SVGS = {
@@ -3739,12 +3740,12 @@ var __IWB_ANNOTATE_MANIFEST__ = {
if (tool === "crop") return cropOptionHTML();
if (tool === "select") return selectOptionHTML();
if (tool === "brush" || tool === "eraser") {
return rangeOpt("brushSize", "大小", 1, 300, S.brushSize, "") + presetDots("brushSize", [2, 4, 8, 12, 16, 24, 32]) + `<span class="iwb-opt-label">硬度</span>
<input type="range" class="iwb-opt-range" data-opt="brushHardness" min="0" max="100" step="1" value="${S.brushHardness}">
return rangeOpt("brushSize", "大小", 1, 300, S.brushSize, "") + presetDots("brushSize", [2, 4, 8, 12]) + `<span class="iwb-opt-label">硬度</span>
<input type="range" class="iwb-opt-range iwb-opt-range-wide" data-opt="brushHardness" min="0" max="100" step="1" value="${S.brushHardness}">
<span class="iwb-opt-val" data-opt-val="brushHardness">${S.brushHardness}</span>
<span class="iwb-opt-label">透明</span>
<input type="range" class="iwb-opt-range" data-opt="brushOpacity" min="5" max="100" step="1" value="${Math.round(S.brushOpacity * 100)}">
<span class="iwb-opt-val" data-opt-val="brushOpacity">${Math.round(S.brushOpacity * 100)}%</span>`;
<span class="iwb-opt-val" data-opt-val="brushOpacity">${Math.round(S.brushOpacity * 100)}%</span>` + presetDots("brushHardness", [0, 25, 50, 75, 100]);
}
if (tool === "rect" || tool === "circle") {
return rangeOpt("shapeLineWidth", "线宽", 1, 60, S.shapeLineWidth, "") + presetDots("shapeLineWidth", [1, 2, 3, 6, 10, 16, 24]) + fillStyleHTML("rect");
@@ -4468,7 +4469,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
if (t.tagName !== "INPUT") return false;
const cls = t.classList;
if (cls && (cls.contains("iwb-editor-text-input") || cls.contains("iwb-editor-color-hex-input"))) return true;
if (e.ctrlKey || e.metaKey || e.altKey) return false;
if (e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) return false;
if (e.key === "Delete" || e.key === "Escape") return false;
return true;
}
@@ -4567,6 +4568,18 @@ var __IWB_ANNOTATE_MANIFEST__ = {
togglePanelsCollapsed();
return;
}
if (!mod && e.shiftKey && key === "x") {
const sh = getSelectedShape();
if (sh && !sh.locked) {
e.preventDefault();
if (sh.type === "arrow") {
toast("箭头没有实心样式", "info");
return;
}
setShapeFill(!sh.fill, sh.type === "pen" ? "pen" : "rect");
}
return;
}
const isBracket = e.key === "[" || e.key === "]" || e.code === "BracketLeft" || e.code === "BracketRight";
if (!mod && !e.altKey && isBracket) {
e.preventDefault();
@@ -4959,7 +4972,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
}
function hitRotationHandle(lp, b) {
const pts = rotationHandlesLocal(b);
const R = Math.max(13 / Math.max(S.zoom, 1e-4), 9);
const R = Math.max(11 / Math.max(S.zoom, 1e-4), 8);
for (const pt of pts) {
if (Math.hypot(lp[0] - pt[0], lp[1] - pt[1]) < R) return true;
}
@@ -4968,15 +4981,29 @@ var __IWB_ANNOTATE_MANIFEST__ = {
function drawRotationHandles(ctx, b, rot) {
const cx = b.x + b.w / 2, cy = b.y + b.h / 2;
const pts = rotationHandlesLocal(b);
const r = Math.max(8 / Math.max(S.zoom, 1e-4), 6);
const k = Math.max(S.zoom, 1e-4);
const r = Math.max(6.5 / k, 5);
const lw = 1.5 / k;
const ah = Math.max(3 / k, 2.6);
const A0 = Math.PI * 0.2, A1 = Math.PI * 1.72;
ctx.save();
ctx.strokeStyle = "#e8a735";
ctx.lineWidth = 2 / Math.max(S.zoom, 1e-4);
ctx.strokeStyle = "#f0b34e";
ctx.fillStyle = "#f0b34e";
ctx.lineWidth = lw;
ctx.lineCap = "round";
for (const pt of pts) {
const w = rotPt(pt[0], pt[1], cx, cy, rot || 0);
ctx.beginPath();
ctx.arc(w[0], w[1], r, Math.PI * 0.15, Math.PI * 1.85);
ctx.arc(w[0], w[1], r, A0, A1);
ctx.stroke();
const ex = w[0] + Math.cos(A1) * r, ey = w[1] + Math.sin(A1) * r;
const ta = A1 + Math.PI / 2;
ctx.beginPath();
ctx.moveTo(ex + Math.cos(ta) * ah * 1.4, ey + Math.sin(ta) * ah * 1.4);
ctx.lineTo(ex + Math.cos(ta + 2.4) * ah, ey + Math.sin(ta + 2.4) * ah);
ctx.lineTo(ex + Math.cos(ta - 2.4) * ah, ey + Math.sin(ta - 2.4) * ah);
ctx.closePath();
ctx.fill();
}
ctx.restore();
}
@@ -6204,7 +6231,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
};
// image-annotate/plugin/editor.css
var editor_default = '/* IWB 鲜艺抠图节点 - 注入样式 */\n\n/* 抠图按钮 */\n.iwb-cutout-btn {\n cursor: pointer;\n opacity: 0.7;\n transition: opacity 0.15s, transform 0.15s;\n}\n\n.iwb-cutout-btn:hover {\n opacity: 1;\n transform: scale(1.15);\n}\n\n.iwb-cutout-btn svg {\n width: 14px;\n height: 14px;\n display: block;\n}\n\n/* 正在处理中的按钮状态 */\n.iwb-cutout-btn.processing {\n animation: iwb-cutout-pulse 1s infinite;\n pointer-events: none;\n}\n\n@keyframes iwb-cutout-pulse {\n 0%, 100% { opacity: 0.4; }\n 50% { opacity: 1; }\n}\n\n/* 全屏遮罩 */\n.iwb-cutout-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.25);\n display: none;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n gap: 12px;\n z-index: 999999;\n pointer-events: all;\n backdrop-filter: blur(2px);\n}\n\n/* 自定义按钮提示(挂在 body,最高层级,不会被图片遮挡) */\n#iwb-cutout-tip {\n position: fixed;\n z-index: 2147483647;\n background: rgba(30, 30, 46, 0.95);\n color: #fff;\n padding: 5px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n pointer-events: none;\n display: none;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);\n border: 1px solid rgba(255, 255, 255, 0.14);\n font-family: system-ui, -apple-system, "Segoe UI", sans-serif;\n max-width: 320px;\n white-space: normal;\n word-break: break-all;\n}\n\n/* 加载动画 */\n.iwb-cutout-spinner {\n width: 48px;\n height: 48px;\n border: 4px solid rgba(255, 255, 255, 0.3);\n border-top-color: #e8a735;\n border-radius: 50%;\n animation: iwb-cutout-spin 0.8s linear infinite;\n}\n\n@keyframes iwb-cutout-spin {\n to { transform: rotate(360deg); }\n}\n\n/* 遮罩文字 */\n.iwb-cutout-text {\n color: #fff;\n font-size: 14px;\n font-weight: 500;\n text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);\n background: rgba(0, 0, 0, 0.6);\n padding: 8px 16px;\n border-radius: 6px;\n}\n\n/* Toast 提示 */\n.iwb-cutout-toast {\n position: fixed;\n bottom: 24px;\n left: 50%;\n transform: translateX(-50%);\n padding: 10px 20px;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 500;\n z-index: 999999;\n transition: opacity 0.3s;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n display: none;\n max-width: 400px;\n}\n\n.iwb-cutout-toast-success {\n background: #1a7f37;\n color: #fff;\n}\n\n.iwb-cutout-toast-error {\n background: #cf222e;\n color: #fff;\n}\n\n.iwb-cutout-toast-info {\n background: #1f6feb;\n color: #fff;\n}\n\n/* 白底按钮 */\n.iwb-whitebg-btn {\n cursor: pointer;\n opacity: 0.7;\n transition: opacity 0.15s, transform 0.15s;\n}\n.iwb-whitebg-btn:hover { opacity: 1; transform: scale(1.15); }\n.iwb-whitebg-btn svg { width: 14px; height: 14px; display: block; }\n.iwb-whitebg-btn.processing { animation: iwb-cutout-pulse 1s infinite; pointer-events: none; }\n\n/* 编辑按钮 */\n.iwb-editor-btn-icon {\n cursor: pointer;\n opacity: 0.7;\n transition: opacity 0.15s, transform 0.15s;\n}\n.iwb-editor-btn-icon:hover { opacity: 1; transform: scale(1.15); }\n.iwb-editor-btn-icon svg { width: 14px; height: 14px; display: block; }\n\n/* ==================== 图片编辑器 ==================== */\n\n.iwb-editor-overlay {\n position: fixed;\n top: 0; left: 0;\n width: 100%; height: 100%;\n background: rgba(0, 0, 0, 0.6);\n display: none;\n align-items: center;\n justify-content: center;\n z-index: 999998;\n backdrop-filter: blur(3px);\n}\n\n.iwb-editor-modal {\n background: #1e1e2e;\n border-radius: 0;\n box-shadow: none;\n display: flex;\n flex-direction: column;\n width: 100vw;\n height: 100vh;\n max-width: none;\n max-height: none;\n overflow: visible;\n}\n\n/* 新增:主区域(画布 + 图层面板)flex 布局 */\n.iwb-editor-main {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n overflow: visible;\n}\n\n.iwb-editor-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n background: #181825;\n border-bottom: 1px solid #313244;\n flex-wrap: nowrap;\n}\n.iwb-editor-header > .iwb-editor-tools {\n position: absolute;\n left: 12px;\n top: 68px;\n width: 44px;\n flex-direction: column;\n padding: 6px;\n background: #181825;\n border: 1px solid #313244;\n border-radius: 8px;\n z-index: 20;\n}\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action { position: static; }\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="undo"],\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="redo"],\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="reset"],\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="restore"] {\n position: absolute;\n top: -54px;\n left: auto;\n}\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="undo"] { right: 154px; }\n.iwb-editor-header > .iwb-edLine truncated
var editor_default = '/* IWB 鲜艺抠图节点 - 注入样式 */\n\n/* 抠图按钮 */\n.iwb-cutout-btn {\n cursor: pointer;\n opacity: 0.7;\n transition: opacity 0.15s, transform 0.15s;\n}\n\n.iwb-cutout-btn:hover {\n opacity: 1;\n transform: scale(1.15);\n}\n\n.iwb-cutout-btn svg {\n width: 14px;\n height: 14px;\n display: block;\n}\n\n/* 正在处理中的按钮状态 */\n.iwb-cutout-btn.processing {\n animation: iwb-cutout-pulse 1s infinite;\n pointer-events: none;\n}\n\n@keyframes iwb-cutout-pulse {\n 0%, 100% { opacity: 0.4; }\n 50% { opacity: 1; }\n}\n\n/* 全屏遮罩 */\n.iwb-cutout-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.25);\n display: none;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n gap: 12px;\n z-index: 999999;\n pointer-events: all;\n backdrop-filter: blur(2px);\n}\n\n/* 自定义按钮提示(挂在 body,最高层级,不会被图片遮挡) */\n#iwb-cutout-tip {\n position: fixed;\n z-index: 2147483647;\n background: rgba(30, 30, 46, 0.95);\n color: #fff;\n padding: 5px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n pointer-events: none;\n display: none;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);\n border: 1px solid rgba(255, 255, 255, 0.14);\n font-family: system-ui, -apple-system, "Segoe UI", sans-serif;\n max-width: 320px;\n white-space: normal;\n word-break: break-all;\n}\n\n/* 加载动画 */\n.iwb-cutout-spinner {\n width: 48px;\n height: 48px;\n border: 4px solid rgba(255, 255, 255, 0.3);\n border-top-color: #e8a735;\n border-radius: 50%;\n animation: iwb-cutout-spin 0.8s linear infinite;\n}\n\n@keyframes iwb-cutout-spin {\n to { transform: rotate(360deg); }\n}\n\n/* 遮罩文字 */\n.iwb-cutout-text {\n color: #fff;\n font-size: 14px;\n font-weight: 500;\n text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);\n background: rgba(0, 0, 0, 0.6);\n padding: 8px 16px;\n border-radius: 6px;\n}\n\n/* Toast 提示 */\n.iwb-cutout-toast {\n position: fixed;\n bottom: 24px;\n left: 50%;\n transform: translateX(-50%);\n padding: 10px 20px;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 500;\n z-index: 999999;\n transition: opacity 0.3s;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n display: none;\n max-width: 400px;\n}\n\n.iwb-cutout-toast-success {\n background: #1a7f37;\n color: #fff;\n}\n\n.iwb-cutout-toast-error {\n background: #cf222e;\n color: #fff;\n}\n\n.iwb-cutout-toast-info {\n background: #1f6feb;\n color: #fff;\n}\n\n/* 白底按钮 */\n.iwb-whitebg-btn {\n cursor: pointer;\n opacity: 0.7;\n transition: opacity 0.15s, transform 0.15s;\n}\n.iwb-whitebg-btn:hover { opacity: 1; transform: scale(1.15); }\n.iwb-whitebg-btn svg { width: 14px; height: 14px; display: block; }\n.iwb-whitebg-btn.processing { animation: iwb-cutout-pulse 1s infinite; pointer-events: none; }\n\n/* 编辑按钮 */\n.iwb-editor-btn-icon {\n cursor: pointer;\n opacity: 0.7;\n transition: opacity 0.15s, transform 0.15s;\n}\n.iwb-editor-btn-icon:hover { opacity: 1; transform: scale(1.15); }\n.iwb-editor-btn-icon svg { width: 14px; height: 14px; display: block; }\n\n/* ==================== 图片编辑器 ==================== */\n\n.iwb-editor-overlay {\n position: fixed;\n top: 0; left: 0;\n width: 100%; height: 100%;\n background: rgba(0, 0, 0, 0.6);\n display: none;\n align-items: center;\n justify-content: center;\n z-index: 999998;\n backdrop-filter: blur(3px);\n}\n\n.iwb-editor-modal {\n background: #1e1e2e;\n border-radius: 0;\n box-shadow: none;\n display: flex;\n flex-direction: column;\n width: 100vw;\n height: 100vh;\n max-width: none;\n max-height: none;\n overflow: visible;\n}\n\n/* 新增:主区域(画布 + 图层面板)flex 布局 */\n.iwb-editor-main {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n overflow: visible;\n}\n\n.iwb-editor-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n background: #181825;\n border-bottom: 1px solid #313244;\n flex-wrap: nowrap;\n}\n.iwb-editor-header > .iwb-editor-tools {\n position: absolute;\n left: 12px;\n top: 68px;\n width: 44px;\n flex-direction: column;\n padding: 6px;\n background: #181825;\n border: 1px solid #313244;\n border-radius: 8px;\n z-index: 20;\n}\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action { position: static; }\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="undo"],\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="redo"],\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="reset"],\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="restore"] {\n position: absolute;\n top: -54px;\n left: auto;\n}\n.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="undo"] { right: 154px; }\n.iwb-editor-header > .iwb-edLine truncated
// image-annotate/plugin/glue.js
function createGlue(ctx, css) {