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

Add 'custGeom' to ShapeTypes #1328

Open
1 of 4 tasks
sventies opened this issue May 3, 2024 · 1 comment
Open
1 of 4 tasks

Add 'custGeom' to ShapeTypes #1328

sventies opened this issue May 3, 2024 · 1 comment

Comments

@sventies
Copy link

sventies commented May 3, 2024

I'd love to see 'custGeom' added to the ShapeType in type definitions, so I can add custom geometries without having to ts issues.

Issue Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using......: [ 3.12.0 ]
  • Please specify what version(s) of PowerPoint you are targeting: [ 16.82 ]
  • Please specify what web browser you are using.................: [ chrome ]

Desired Behavior

I want to do something like this
slide.addShape(pptx.ShapeType.custGeom, { line: { color: "00FF66", width: 1 }, points: [ { x: 2, y: 2 }, { x: 2, y: 3, curve: { type: "quadratic", x1: 2.5, y1: 2.5 } }, ], });

Which works perfectly! Only custGeom is not defined in the type definitions, so typescript will complain about it.

Observed Behavior

Obeserved Behavior is properly functioning Custom Geometry, while typescript complains that it doesn't know custGeom / CUSTOM_GEOMETRY.

Steps to Reproduce

I added the type locally in a new branch, but I don't have the rights to push it. Happy to push it and make a pr if you can add permissions for me to do so, otherwise here is the diff (but maybe I'm missing something? This fixes the issue for me locally at least).
Screenshot 2024-05-03 at 15 35 07

@niels-bosman
Copy link

Opened a PR for this: #1333

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

No branches or pull requests

2 participants