|
@@ -1024,7 +1024,12 @@ export class ImageEditor {
|
|
|
this.needUndoRec = true
|
|
|
}
|
|
|
|
|
|
- if (item === 'opacity' && this.opacity !== props.opacity / 100) {
|
|
|
+ if (item === 'opacity') {
|
|
|
+ if (this.opacity * 100 === props.opacity) return
|
|
|
+
|
|
|
+ const opacity = await this.messageHandler.sendWithPromise('GetImageTransparency', this.editAreaPtr)
|
|
|
+ if (opacity * 100 === props.opacity) return
|
|
|
+
|
|
|
await this.messageHandler.sendWithPromise('SetImageTransparency', {
|
|
|
editAreaPtr: this.editAreaPtr,
|
|
|
opacity: props.opacity / 100
|
|
@@ -1262,7 +1267,7 @@ export class ImageEditor {
|
|
|
})
|
|
|
|
|
|
this.imageUrl = this.imageArrayToUrl(imageArray, width, height)
|
|
|
- this.eventBus.dispatch('contentPropertyChange', { type: 'image', imageUrl: this.imageUrl })
|
|
|
+ this.eventBus.dispatch('contentPropertyChange', { type: 'image', imageUrl: this.imageUrl, opacity: this.opacity * 100 })
|
|
|
}
|
|
|
|
|
|
// 更新点的位置
|