diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-05-13 13:20:59 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-05-13 13:20:59 -0300 |
commit | 34b7ff22766bae0e4b1b3121bd63d037c27285c7 (patch) | |
tree | f2f66a17c67bdf9be0b1576b28ffd0cf107b483c /ui/primitives | |
parent | 684e369c7b01b4c69995fc604ef33919077ffdf5 (diff) | |
parent | a37d6be77261b2aae25c4235dcb38dd7b1bb60b1 (diff) |
Merge remote-tracking branch 'notabug/master'
Diffstat (limited to 'ui/primitives')
-rw-r--r-- | ui/primitives/DisplayElement.js | 6 | ||||
-rw-r--r-- | ui/primitives/Element.js | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ui/primitives/DisplayElement.js b/ui/primitives/DisplayElement.js index d2a0956..6452887 100644 --- a/ui/primitives/DisplayElement.js +++ b/ui/primitives/DisplayElement.js @@ -237,7 +237,7 @@ export default class DisplayElement extends Element { children.reverse() for (const el of children) { - if (!el.visible || el.clickThrough) { + if (!el.visible) { continue } @@ -246,6 +246,10 @@ export default class DisplayElement extends Element { return el2 } + if (el.clickThrough) { + continue + } + const { absX, absY, w, h } = el if (absX <= x && absX + w > x) { if (absY <= y && absY + h > y) { diff --git a/ui/primitives/Element.js b/ui/primitives/Element.js index fea8c03..a5dbea6 100644 --- a/ui/primitives/Element.js +++ b/ui/primitives/Element.js @@ -1,5 +1,7 @@ import EventEmitter from 'node:events' +import exception from 'tui-lib/util/exception' + export default class Element extends EventEmitter { // The basic class containing methods for working with an element hierarchy. // Generally speaking, you usually want to extend DisplayElement instead of |