Fixed fill for properties
This commit is contained in:
@@ -98,6 +98,7 @@ export const MatchProperties: React.FC = () => {
|
|||||||
"lineFormat/dashStyle",
|
"lineFormat/dashStyle",
|
||||||
"lineFormat/color",
|
"lineFormat/color",
|
||||||
"fill/transparency",
|
"fill/transparency",
|
||||||
|
"fill/foregroundColor",
|
||||||
"textFrame"
|
"textFrame"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -162,9 +163,10 @@ export const MatchProperties: React.FC = () => {
|
|||||||
targetShape.fill.transparency = firstShape.fill.transparency;
|
targetShape.fill.transparency = firstShape.fill.transparency;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're only copying fill transparency as the other fill properties
|
if (firstShape.fill.foregroundColor !== undefined) {
|
||||||
// like color and type appear to be read-only or not accessible in Office JS API
|
targetShape.fill.foregroundColor = firstShape.fill.foregroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
await context.sync();
|
await context.sync();
|
||||||
propertiesApplied = true;
|
propertiesApplied = true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user