mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
2ffbf573ba
commit
6f6fe27891
3 files changed
+14
-4
No files matched your search
@@ -41,7 +41,7 @@
|
|||||||
<button id="rotateButton" class="button" type="button" data-short="转" title="顺时针旋转90°" aria-label="旋转" disabled>旋转</button>
|
<button id="rotateButton" class="button" type="button" data-short="转" title="顺时针旋转90°" aria-label="旋转" disabled>旋转</button>
|
||||||
<button id="panButton" class="button" type="button" data-short="拖" title="拖动页面" aria-label="拖动" aria-pressed="false" disabled>拖动</button>
|
<button id="panButton" class="button" type="button" data-short="拖" title="拖动页面" aria-label="拖动" aria-pressed="false" disabled>拖动</button>
|
||||||
<button id="continuousButton" class="button" type="button" data-short="连" title="连续显示" aria-label="连续显示" aria-pressed="false" disabled>连续</button>
|
<button id="continuousButton" class="button" type="button" data-short="连" title="连续显示" aria-label="连续显示" aria-pressed="false" disabled>连续</button>
|
||||||
<button id="annotationButton" class="button" type="button" data-short="注" title="关闭注解" aria-label="关闭注解" aria-pressed="true">注解</button>
|
<button id="annotationButton" class="button" type="button" data-short="注" title="隐藏注解" aria-label="隐藏注解" aria-pressed="true">注解</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-group">
|
<div class="tool-group">
|
||||||
<select id="exportFormat" class="format-select" title="导出格式" aria-label="导出格式" disabled></select>
|
<select id="exportFormat" class="format-select" title="导出格式" aria-label="导出格式" disabled></select>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<div id="editorTools" class="editor-toolbar" role="toolbar" aria-label="编辑工具" hidden>
|
<div id="editorTools" class="editor-toolbar" role="toolbar" aria-label="编辑工具" hidden>
|
||||||
<div class="editor-group editor-file">
|
<div class="editor-group editor-file">
|
||||||
<button id="saveButton" class="button" type="button" title="另存为OFD" aria-label="保存OFD" aria-keyshortcuts="Control+S Meta+S">保存</button>
|
<button id="saveButton" class="button" type="button" title="另存为OFD" aria-label="另存为OFD" aria-keyshortcuts="Control+S Meta+S">保存</button>
|
||||||
<button id="undoButton" class="button" type="button" disabled>撤销</button>
|
<button id="undoButton" class="button" type="button" disabled>撤销</button>
|
||||||
<button id="redoButton" class="button" type="button" disabled>重做</button>
|
<button id="redoButton" class="button" type="button" disabled>重做</button>
|
||||||
<span>文件</span>
|
<span>文件</span>
|
||||||
|
|||||||
@@ -798,6 +798,10 @@ button:not(:disabled):hover {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-actions > button:only-child {
|
||||||
|
grid-column: -2;
|
||||||
|
}
|
||||||
|
|
||||||
.form-actions button[type="submit"] {
|
.form-actions button[type="submit"] {
|
||||||
border-color: var(--accent);
|
border-color: var(--accent);
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
@@ -1795,6 +1799,7 @@ button.outline-link:hover {
|
|||||||
.annotation-detail {
|
.annotation-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
margin-bottom: 12px;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1306,7 +1306,7 @@ async function toggleEditor() {
|
|||||||
|
|
||||||
function confirmTextReflow(item) {
|
function confirmTextReflow(item) {
|
||||||
return canEditObject(item, "reflow") && (canEditObject(item, "layoutKnown")
|
return canEditObject(item, "reflow") && (canEditObject(item, "layoutKnown")
|
||||||
|| window.confirm("原文排版未知,此操作将重新排版。继续?"));
|
|| window.confirm("原文排版未知,将重新排版。继续?"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function openCreatePanel() {
|
function openCreatePanel() {
|
||||||
@@ -5688,6 +5688,9 @@ function updateObjectControls(item, reset = false) {
|
|||||||
el.objectDistribute.disabled = el.objectAlign.disabled || !item.items || item.items.length < 3;
|
el.objectDistribute.disabled = el.objectAlign.disabled || !item.items || item.items.length < 3;
|
||||||
el.editObjectButton.disabled = disabled || Boolean(item.items) || !canEditObject(item, "enter") && (item.type === "PathObject"
|
el.editObjectButton.disabled = disabled || Boolean(item.items) || !canEditObject(item, "enter") && (item.type === "PathObject"
|
||||||
|| !canEditObject(item, item.type === "TextObject" ? "reflow" : item.type === "ImageObject" ? "replaceImage" : "update"));
|
|| !canEditObject(item, item.type === "TextObject" ? "reflow" : item.type === "ImageObject" ? "replaceImage" : "update"));
|
||||||
|
el.editObjectButton.textContent = canEditObject(item, "enter") ? "进入" : item?.type === "ImageObject" ? "替换" : "修改";
|
||||||
|
el.editObjectButton.title = canEditObject(item, "enter") ? "进入组合" : item?.type === "ImageObject" ? "替换图片" : "修改对象";
|
||||||
|
el.editObjectButton.setAttribute("aria-label", el.editObjectButton.title);
|
||||||
el.multiSelectButton.disabled = !state.editing || !canvasEditor.enabled || !state.ready || state.exporting;
|
el.multiSelectButton.disabled = !state.editing || !canvasEditor.enabled || !state.ready || state.exporting;
|
||||||
const selection = selectedText(item);
|
const selection = selectedText(item);
|
||||||
const text = selection ? currentTextStyle() : state.textDefaults;
|
const text = selection ? currentTextStyle() : state.textDefaults;
|
||||||
@@ -5753,7 +5756,7 @@ function updateObjectControls(item, reset = false) {
|
|||||||
|
|
||||||
function updateAnnotationButton() {
|
function updateAnnotationButton() {
|
||||||
el.annotationButton.setAttribute("aria-pressed", String(state.renderAnnotations));
|
el.annotationButton.setAttribute("aria-pressed", String(state.renderAnnotations));
|
||||||
el.annotationButton.title = state.renderAnnotations ? "关闭注解" : "开启注解";
|
el.annotationButton.title = state.renderAnnotations ? "隐藏注解" : "显示注解";
|
||||||
el.annotationButton.setAttribute("aria-label", el.annotationButton.title);
|
el.annotationButton.setAttribute("aria-label", el.annotationButton.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5772,6 +5775,8 @@ async function callWASM(name, ...args) {
|
|||||||
state.exportRequestID = id;
|
state.exportRequestID = id;
|
||||||
el.cancelExportButton.hidden = false;
|
el.cancelExportButton.hidden = false;
|
||||||
el.cancelExportButton.disabled = false;
|
el.cancelExportButton.disabled = false;
|
||||||
|
el.cancelExportButton.title = { ofdgoSaveDocument: "取消保存", ofdgoImportPages: "取消导入", ofdgoExportAttachment: "取消下载" }[name] || "取消导出";
|
||||||
|
el.cancelExportButton.setAttribute("aria-label", el.cancelExportButton.title);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const transfer = [];
|
const transfer = [];
|
||||||
|
|||||||
Reference in new issue
Block a user