diff options
| author | bobzel <zzzman@gmail.com> | 2024-09-19 20:27:33 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-09-19 20:27:33 -0400 |
| commit | 988e80e4b8529a02015564f0a16114a3b16aa08f (patch) | |
| tree | a1df300fc2a7d34db81bbf652947727684478db1 /src/client/views/nodes/ImageBox.tsx | |
| parent | 0268a524540ff36bf007744eff6709dfcdedec96 (diff) | |
| parent | 302b9ab98001a50ca2117df823216a99b7c25869 (diff) | |
merged with master -- updated filtering from cardView branch
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
| -rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index ed79888ae..29887f162 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -714,7 +714,8 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { TraceMobx(); const backColor = DashColor((this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor) as string) ?? Colors.WHITE); - const backAlpha = backColor.red() === 0 && backColor.green() === 0 && backColor.blue() === 0 ? backColor.alpha() : 1; + // allow use case where the image is transparent when the alpha value is to smallest possible value from UI (alpha = 1 out of 255) + const backAlpha = backColor.alpha() < 0.015 && backColor.alpha() > 0 ? backColor.alpha() : 1; const srcpath = this.layoutDoc.hideImage ? '' : this.paths[0]; const fadepath = this.layoutDoc.hideImage ? '' : this.paths.lastElement(); const { nativeWidth, nativeHeight /* , nativeOrientation */ } = this.nativeSize; |
