Skip to content

Commit 4e2a609

Browse files
committed
move special case to node-body so underlays work like overlays
1 parent ad2300f commit 4e2a609

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/extensions/renderer/canvas/webgl/drawing-elements-webgl.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -766,13 +766,9 @@ export class ElementDrawingWebGL {
766766

767767
// Nodes should still be clickable if they pass the visibility check but
768768
// have background-opacity: 0
769-
let opacity = this.renderTarget.picking ? 1 : node.effectiveOpacity();
770-
let bgOpacity = this.renderTarget.picking ? 1 : node.pstyle('background-opacity').value * opacity;
771-
772-
if (type === 'node-overlay') {
773-
opacity = node.pstyle(props.opacity).value;
774-
bgOpacity = opacity;
775-
}
769+
// Also: everything but node-body is exempt from effective opacity inheritence/stacking
770+
let opacity = this.renderTarget.picking ? 1 : (type === 'node-body' ? node.effectiveOpacity() : 1);
771+
let bgOpacity = this.renderTarget.picking ? 1 : (node.pstyle(props.opacity).value * opacity);
776772

777773
const color = node.pstyle(props.color).value;
778774
const colorView = this.colorBuffer.getView(instance);

0 commit comments

Comments
 (0)