Skip to content

Commit

Permalink
feat: set control properties in read-only mode #679
Browse files Browse the repository at this point in the history
  • Loading branch information
baseWalker authored Jul 15, 2024
1 parent 2d2ceea commit 26a3468
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/editor/core/command/CommandAdapt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2453,20 +2453,14 @@ export class CommandAdapt {
}

public setControlValue(payload: ISetControlValueOption) {
const isReadonly = this.draw.isReadonly()
if (isReadonly) return
this.draw.getControl().setValueByConceptId(payload)
}

public setControlExtension(payload: ISetControlExtensionOption) {
const isReadonly = this.draw.isReadonly()
if (isReadonly) return
this.draw.getControl().setExtensionByConceptId(payload)
}

public setControlProperties(payload: ISetControlProperties) {
const isReadonly = this.draw.isReadonly()
if (isReadonly) return
this.draw.getControl().setPropertiesByConceptId(payload)
}

Expand Down
6 changes: 0 additions & 6 deletions src/editor/core/draw/control/Control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,6 @@ export class Control {
}

public setValueByConceptId(payload: ISetControlValueOption) {
const isReadonly = this.draw.isReadonly()
if (isReadonly) return
let isExistSet = false
const { conceptId, value } = payload
// 设置值
Expand Down Expand Up @@ -761,8 +759,6 @@ export class Control {
}

public setExtensionByConceptId(payload: ISetControlExtensionOption) {
const isReadonly = this.draw.isReadonly()
if (isReadonly) return
const { conceptId, extension } = payload
const setExtension = (elementList: IElement[]) => {
let i = 0
Expand Down Expand Up @@ -803,8 +799,6 @@ export class Control {
}

public setPropertiesByConceptId(payload: ISetControlProperties) {
const isReadonly = this.draw.isReadonly()
if (isReadonly) return
const { conceptId, properties } = payload
let isExistUpdate = false
function setProperties(elementList: IElement[]) {
Expand Down

0 comments on commit 26a3468

Please sign in to comment.