@lightningtv/solid
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -50,2 +50,3 @@ import { ElementNode, activeElement, isElementNode, rootNode, Config, } from '@lightningtv/solid'; | ||
currentNode.alpha !== 0 && | ||
!currentNode.skipFocus && | ||
testCollision(x, y, currentNode.lng.absX || 0 * precision, currentNode.lng.absY || 0 * precision, (currentNode.width || 0) * precision, (currentNode.height || 0) * precision)) { | ||
@@ -59,6 +60,19 @@ currentLevelNodes.push(currentNode); | ||
} | ||
const maxZIndex = currentLevelNodes.reduce((prev, current) => (prev.zIndex ?? -1) > (current.zIndex ?? -1) ? prev : current); | ||
const highestZIndexNode = currentLevelNodes | ||
.filter((e) => e.zIndex === maxZIndex.zIndex) | ||
.pop(); | ||
let highestZIndexNode = null; | ||
if (size === 1) { | ||
highestZIndexNode = currentLevelNodes[0]; | ||
} | ||
else { | ||
let maxZIndex = -1; | ||
for (const node of currentLevelNodes) { | ||
const zIndex = node.zIndex ?? -1; | ||
if (zIndex > maxZIndex) { | ||
maxZIndex = zIndex; | ||
highestZIndexNode = node; | ||
} | ||
else if (zIndex === maxZIndex) { | ||
highestZIndexNode = node; | ||
} | ||
} | ||
} | ||
if (highestZIndexNode) { | ||
@@ -83,3 +97,3 @@ result.push(highestZIndexNode); | ||
if (scheduled()) { | ||
const result = getChildrenByPosition(myApp, pos.x, pos.y).filter((el) => (el.focus || el.onFocus || el.onEnter) && !el.skipFocus); | ||
const result = getChildrenByPosition(myApp, pos.x, pos.y).filter((el) => el.focus || el.onFocus || el.onEnter); | ||
if (result.length) { | ||
@@ -86,0 +100,0 @@ let activeElm = result[result.length - 1]; |
{ | ||
"name": "@lightningtv/solid", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "Lightning Renderer for Solid Universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -93,2 +93,3 @@ import type { ElementText, INode } from '@lightningtv/core'; | ||
currentNode.alpha !== 0 && | ||
!currentNode.skipFocus && | ||
testCollision( | ||
@@ -111,10 +112,20 @@ x, | ||
} | ||
const maxZIndex = currentLevelNodes.reduce((prev, current) => | ||
(prev.zIndex ?? -1) > (current.zIndex ?? -1) ? prev : current, | ||
); | ||
const highestZIndexNode = currentLevelNodes | ||
.filter((e) => e.zIndex === maxZIndex.zIndex) | ||
.pop(); | ||
let highestZIndexNode = null; | ||
if (size === 1) { | ||
highestZIndexNode = currentLevelNodes[0]; | ||
} else { | ||
let maxZIndex = -1; | ||
for (const node of currentLevelNodes) { | ||
const zIndex = node.zIndex ?? -1; | ||
if (zIndex > maxZIndex) { | ||
maxZIndex = zIndex; | ||
highestZIndexNode = node; | ||
} else if (zIndex === maxZIndex) { | ||
highestZIndexNode = node; | ||
} | ||
} | ||
} | ||
if (highestZIndexNode) { | ||
@@ -144,3 +155,3 @@ result.push(highestZIndexNode); | ||
const result = getChildrenByPosition(myApp, pos.x, pos.y).filter( | ||
(el) => (el.focus || el.onFocus || el.onEnter) && !el.skipFocus, | ||
(el) => el.focus || el.onFocus || el.onEnter, | ||
); | ||
@@ -147,0 +158,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149190
1809