mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:53:44 +08:00
1 parent
8de701dbd4
commit
d37f41cd90
21 files changed
+280
-57
No files matched your search
@@ -536,6 +536,12 @@ export class CanvasEditor {
|
||||
}
|
||||
|
||||
start(event) {
|
||||
if (event.target === this.viewer) {
|
||||
const rect = this.viewer.getBoundingClientRect();
|
||||
const left = rect.left + (this.viewer.clientLeft || 0), top = rect.top + (this.viewer.clientTop || 0);
|
||||
if (event.clientX < left || event.clientX >= left + this.viewer.clientWidth
|
||||
|| event.clientY < top || event.clientY >= top + this.viewer.clientHeight) return;
|
||||
}
|
||||
if (this.nudge) {
|
||||
this.commitNudge();
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user