This commit is contained in:
parent
1543523159
commit
9010399d76
2 changed files with 2 additions and 1 deletions
|
@ -320,6 +320,7 @@ export const alignImgLeft = (protyle: IProtyle, nodeElement: Element, assetEleme
|
|||
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
assetElements.forEach((item: HTMLElement) => {
|
||||
item.style.minWidth = "";
|
||||
// 兼容历史居中问题
|
||||
item.style.display = "";
|
||||
});
|
||||
updateTransaction(protyle, id, nodeElement.outerHTML, html);
|
||||
|
|
|
@ -630,7 +630,7 @@ export class WYSIWYG {
|
|||
dragElement.parentElement.parentElement.style.width = "";
|
||||
}
|
||||
if (moveEvent.clientX > x - dragWidth + 8 && moveEvent.clientX < mostRight) {
|
||||
if ((dragElement.tagName === "IMG" && dragElement.parentElement.parentElement.style.display !== "block") || !isCenter) {
|
||||
if ((dragElement.tagName === "IMG" && !dragElement.parentElement.parentElement.style.minWidth) || !isCenter) {
|
||||
dragElement.style.width = Math.max(17, dragWidth + (moveEvent.clientX - x)) + "px";
|
||||
} else {
|
||||
dragElement.style.width = Math.max(17, dragWidth + (moveEvent.clientX - x) * 2) + "px";
|
||||
|
|
Loading…
Add table
Reference in a new issue