Skip to content

Commit

Permalink
feat: optimize previewer interactive in readonly mode #875
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Nov 8, 2024
1 parent 5cc4f13 commit 09b8bac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/editor/core/draw/particle/previewer/Previewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ export class Previewer {

public _updateResizerRect(width: number, height: number) {
const { resizerSize: handleSize, scale } = this.options
const isReadonly = this.draw.isReadonly()
this.resizerSelection.style.width = `${width}px`
this.resizerSelection.style.height = `${height}px`
// handle
Expand All @@ -409,6 +410,7 @@ export class Previewer {
this.resizerHandleList[i].style.transform = `scale(${scale})`
this.resizerHandleList[i].style.left = `${left}px`
this.resizerHandleList[i].style.top = `${top}px`
this.resizerHandleList[i].style.display = isReadonly ? 'none' : 'block'
}
}

Expand Down

0 comments on commit 09b8bac

Please sign in to comment.