Skip to content

Commit

Permalink
fix: added simple positioning to anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
privateOmega committed May 28, 2020
1 parent 3885233 commit 5006cc4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/helpers/xml-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,18 @@ const buildExtent = () => {
return extentFragment;
};

const buildSimplePos = () => {
const simplePosFragment = fragment({
namespaceAlias: { wp: namespaces.wp },
})
.ele('@wp', 'simplePos')
.att('x', '0')
.att('y', '0')
.up();

return simplePosFragment;
};

const buildAnchoredDrawing = (graphicType, attributes) => {
const anchoredDrawingFragment = fragment({
namespaceAlias: { wp: namespaces.wp },
Expand All @@ -704,8 +716,11 @@ const buildAnchoredDrawing = (graphicType, attributes) => {
.att('behindDoc', 'false')
.att('locked', 'true')
.att('layoutInCell', 'true')
.att('allowOverlap', 'false');
.att('allowOverlap', 'false')
.att('simplePos', 'true');

const simplePosFragment = buildSimplePos();
anchoredDrawingFragment.import(simplePosFragment);
const extentFragment = buildExtent();
anchoredDrawingFragment.import(extentFragment);
const drawingObjectNonVisualPropertiesFragment = buildDrawingObjectNonVisualProperties(
Expand Down

0 comments on commit 5006cc4

Please sign in to comment.