Fixed fill for properties

This commit is contained in:
2025-03-08 00:22:18 +01:00
parent 87e563af3a
commit ba393bac87
+5 -3
View File
@@ -98,6 +98,7 @@ export const MatchProperties: React.FC = () => {
"lineFormat/dashStyle",
"lineFormat/color",
"fill/transparency",
"fill/foregroundColor",
"textFrame"
]);
@@ -162,9 +163,10 @@ export const MatchProperties: React.FC = () => {
targetShape.fill.transparency = firstShape.fill.transparency;
}
// We're only copying fill transparency as the other fill properties
// like color and type appear to be read-only or not accessible in Office JS API
if (firstShape.fill.foregroundColor !== undefined) {
targetShape.fill.foregroundColor = firstShape.fill.foregroundColor;
}
await context.sync();
propertiesApplied = true;
} catch (err) {