Fixed fill for properties
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user