Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default async function ({ renderer, testRoot }: ExampleSettings) {
color: 0xff0000ff,
parent: testRoot,
zIndex: 0,
zIndexLocked: 0,
alpha: 0.5,
});

Expand Down
11 changes: 9 additions & 2 deletions src/main-api/Inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,6 @@ export class Inspector {
// but we need it from the inspector to set the initial properties on the div element
const mergedProps = {
...node.props,

...(node as unknown as { textProps: CoreTextNodeProps }).textProps,
} as CoreTextNodeProps;
const div = this.createDiv(node.id, mergedProps);
Expand Down Expand Up @@ -1230,6 +1229,11 @@ export class Inspector {

// CSS mappable attribute
if (stylePropertyMap[property]) {
// Text nodes must always stay at opacity 0.001 — never let alpha updates override it.
if (property === 'alpha' && div.style.pointerEvents === 'none') {
return;
}

const mappedStyleResponse = stylePropertyMap[property]?.(value);

if (mappedStyleResponse === null) {
Expand Down Expand Up @@ -1354,7 +1358,10 @@ export class Inspector {
div.style.left = `${x - w * mountX}px`;
div.style.width = `${w}px`;
div.style.height = `${h}px`;
div.style.opacity = `${alpha}`;
// Text nodes must keep opacity at 0.001 — never override it from animation props.
if (div.style.pointerEvents !== 'none') {
div.style.opacity = `${alpha}`;
}
div.style.rotate = `${rotation}rad`;
div.style.scale = `${scale}`;
div.style.color = convertColorToRgba(color);
Expand Down
Loading