mirror of
https://github.com/idrawjs/idraw
synced 2026-05-24 10:08:34 +00:00
feat: Set curser default when select locked element
This commit is contained in:
parent
d756fe8707
commit
fc7245e550
2 changed files with 7 additions and 0 deletions
|
|
@ -416,6 +416,10 @@ class Core {
|
|||
const index: number | null = this[_helper].getElementIndexByUUID(elementUUID);
|
||||
if (index !== null && index >= 0) {
|
||||
const elem = this[_data].elements[index];
|
||||
if (elem.lock === true) {
|
||||
this[_board].resetCursor();
|
||||
return;
|
||||
}
|
||||
if (this[_tempData].get('hoverUUID') !== elem.uuid) {
|
||||
const preIndex = this[_helper].getElementIndexByUUID(this[_tempData].get('hoverUUID') || '');
|
||||
if (preIndex !== null && this[_data].elements[preIndex]) {
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ export class Element {
|
|||
if (!data.elements[index]) {
|
||||
return null;
|
||||
}
|
||||
if (data.elements[index].lock === true) {
|
||||
return null;
|
||||
}
|
||||
const moveX = (point.x - prevPoint.x) / scale;
|
||||
const moveY = (point.y - prevPoint.y) / scale;
|
||||
const elem = data.elements[index];
|
||||
|
|
|
|||
Loading…
Reference in a new issue