Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix genXmlBodyProperties when body type placeholder #935

Closed
wants to merge 1 commit into from
Closed

Fix genXmlBodyProperties when body type placeholder #935

wants to merge 1 commit into from

Conversation

Ksisu
Copy link

@Ksisu Ksisu commented Apr 14, 2021

Solve #640

Minimalist test code with valign:

    const pptx: PptxGenJS = new PptxGenJS();
    pptx.defineSlideMaster({
      objects: [
        {
          placeholder: {
            options: {
              name: 'title',
              type: 'body',
              valign: pptx.AlignV.middle,
              align: pptx.AlignH.center,
              x: 0,
              y: 0,
              w: '100%',
              h: '100%',
            },
          } as any,
        },
      ],
      title: 'testMaster',
    });
    const slide = pptx.addSlide({masterName: 'testMaster'});
    slide.addText('Test Title', {placeholder: 'title'});
    pptx.writeFile({
      fileName: 'test.pptx',
    });

result:
image

@gitbrent
Copy link
Owner

Thanks @Ksisu

This issue was fixed via a recent commit and required a bit more code.

@gitbrent gitbrent closed this Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants