Fix:修复开启maxImgResizeWidthInheritTheme选项后第一次上传图片拖动图片到最大值会导致后续调整按钮无法显示的问题
This commit is contained in:
parent
34d7c6fed2
commit
e24fd9bdbb
@ -289,11 +289,14 @@ class NodeImgAdjust {
|
|||||||
// 隐藏自定义元素
|
// 隐藏自定义元素
|
||||||
this.hideHandleEl()
|
this.hideHandleEl()
|
||||||
// 更新节点图片为新的大小
|
// 更新节点图片为新的大小
|
||||||
const { image, imageTitle, imageSize } = this.node.getData()
|
const { image, imageTitle } = this.node.getData()
|
||||||
const { scaleX, scaleY } = this.mousedownDrawTransform
|
const { scaleX, scaleY } = this.mousedownDrawTransform
|
||||||
const newWidth = this.currentImgWidth / scaleX
|
const newWidth = this.currentImgWidth / scaleX
|
||||||
const newHeight = this.currentImgHeight / scaleY
|
const newHeight = this.currentImgHeight / scaleY
|
||||||
if (newWidth !== imageSize.width || newHeight !== imageSize.height) {
|
if (
|
||||||
|
Math.abs(newWidth - this.rect.width) > 1 ||
|
||||||
|
Math.abs(newHeight - this.rect.height) > 1
|
||||||
|
) {
|
||||||
this.mindMap.execCommand('SET_NODE_IMAGE', this.node, {
|
this.mindMap.execCommand('SET_NODE_IMAGE', this.node, {
|
||||||
url: image,
|
url: image,
|
||||||
title: imageTitle,
|
title: imageTitle,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user