feat:add control readonly
This commit is contained in:
@@ -79,6 +79,8 @@ export class Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public initControl() {
|
public initControl() {
|
||||||
|
const isReadonly = this.draw.isReadonly()
|
||||||
|
if (isReadonly) return
|
||||||
const elementList = this.getElementList()
|
const elementList = this.getElementList()
|
||||||
const range = this.getRange()
|
const range = this.getRange()
|
||||||
const element = elementList[range.startIndex]
|
const element = elementList[range.startIndex]
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export class CanvasEvent {
|
|||||||
y: evt.offsetY
|
y: evt.offsetY
|
||||||
})
|
})
|
||||||
// 激活控件
|
// 激活控件
|
||||||
if (positionResult.isControl) {
|
if (positionResult.isControl && !isReadonly) {
|
||||||
const {
|
const {
|
||||||
index,
|
index,
|
||||||
isTable,
|
isTable,
|
||||||
|
|||||||
Reference in New Issue
Block a user