This commit is contained in:
parent
9010399d76
commit
22b0bd2e90
1 changed files with 2 additions and 2 deletions
|
@ -1464,11 +1464,11 @@ const genImageWidthMenu = (label: string, assetElement: HTMLElement, imgElement:
|
|||
click() {
|
||||
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
if (label === window.siyuan.languages.default) {
|
||||
const isCenter = assetElement.style.display === "block";
|
||||
const isCenter = assetElement.style.display === "block" || assetElement.style.minWidth;
|
||||
assetElement.removeAttribute("style");
|
||||
imgElement.removeAttribute("style");
|
||||
if (isCenter) {
|
||||
assetElement.style.display = "block";
|
||||
assetElement.style.minWidth = "calc(100% - 0.1em)";
|
||||
}
|
||||
} else {
|
||||
assetElement.style.width = label;
|
||||
|
|
Loading…
Add table
Reference in a new issue