1 | var ActivatorBase = (function () {
|
2 | function ActivatorBase() {
|
3 | }
|
4 | return ActivatorBase;
|
5 | }());
|
6 | export { ActivatorBase };
|
7 | export function isActivatedDisabled(ev, activatableEle) {
|
8 | if (!activatableEle || !activatableEle.parentNode) {
|
9 | return true;
|
10 | }
|
11 | if (!ev) {
|
12 | return false;
|
13 | }
|
14 | if (ev.defaultPrevented) {
|
15 | return true;
|
16 | }
|
17 | var targetEle = ev.target;
|
18 | for (var i = 0; i < 4; i++) {
|
19 | if (!targetEle) {
|
20 | break;
|
21 | }
|
22 | if (targetEle.hasAttribute('disable-activated')) {
|
23 | return true;
|
24 | }
|
25 | targetEle = targetEle.parentElement;
|
26 | }
|
27 | return false;
|
28 | }
|
29 |
|
\ | No newline at end of file |