| 105 | } |
| 106 | |
| 107 | hasRotatedParent(element) { |
| 108 | const parent = element.parentNode; |
| 109 | /* Base case: the element has no parent or the parent is the <html> element */ |
| 110 | if (!parent || parent.tagName === 'HTML') { |
| 111 | return false; |
| 112 | } |
| 113 | |
| 114 | /* Check if the parent is rotated */ |
| 115 | const computedStyle = window.getComputedStyle(parent); |
| 116 | const transform = computedStyle.getPropertyValue('transform'); |
| 117 | |
| 118 | if (transform !== 'none' && !transform.startsWith('matrix(1, 0, 0, 1')) { |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | /* Recursively check the parent's parent */ |
| 123 | return this.hasRotatedParent(parent); |
| 124 | } |
| 125 | |
| 126 | mousePos() { |
| 127 | if (this.use_css_rotation_workaround) { |