Skip to content
Open
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
7 changes: 6 additions & 1 deletion exports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export {
export type { ShaderMap, EffectMap } from '../src/core/CoreShaderManager.js';
export type { TextRendererMap } from '../src/core/text-rendering/renderers/TextRenderer.js';
export type { TrFontFaceMap } from '../src/core/text-rendering/font-face-types/TrFontFace.js';
export type { AnimationSettings } from '../src/core/animations/CoreAnimation.js';
export type {
AnimationSettings,
CoreAnimation,
} from '../src/core/animations/CoreAnimation.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this export...

export type {
EffectProps,
FadeOutEffectProps,
Expand All @@ -75,6 +78,8 @@ export type { WebGlCoreCtxTexture } from '../src/core/renderers/webgl/WebGlCoreC
export type { Inspector } from '../src/main-api/Inspector.js';
export type { CoreNodeRenderState } from '../src/core/CoreNode.js';

export type { CoreRenderer } from '../src/core/renderers/CoreRenderer.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this export....


// Shaders
export * from '../src/core/renderers/webgl/WebGlCoreShader.js';
export * from '../src/core/renderers/webgl/shaders/effects/ShaderEffect.js';
Expand Down
10 changes: 3 additions & 7 deletions src/main-api/Inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ const stylePropertyMap: {
},
width: (w) => {
if (w === 0) {
// Set to 1px instead of 0px so visibility checks (e.g. Playwright) keep treating the node as visible
return { prop: 'width', value: '1px' };
return { prop: 'width', value: 'auto' };
}

return { prop: 'width', value: `${w}px` };
},
height: (h) => {
if (h === 0) {
// Set to 1px instead of 0px so visibility checks (e.g. Playwright) keep treating the node as visible
return { prop: 'height', value: '1px' };
return { prop: 'height', value: 'auto' };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will auto still ensure its visible? even if it has no width set?

}

return { prop: 'height', value: `${h}px` };
Expand Down Expand Up @@ -577,9 +575,7 @@ export class Inspector {
// special case for text
if (property === 'text') {
div.innerHTML = String(value);

// Keep DOM text invisible without breaking visibility checks by using color:transparent instead of opacity:0
div.style.color = 'transparent';
div.style.visibility = 'hidden';
div.style.pointerEvents = 'none';
div.style.userSelect = 'none';
return;
Expand Down
Loading