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 Ellipse and Rectangle Schema #375

Merged
merged 12 commits into from
Dec 19, 2023
Merged

Conversation

hand-dot
Copy link
Collaborator

Copy link

vercel bot commented Dec 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
pdfme-playground ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 0:59am

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main part of this PR is...

@hand-dot hand-dot changed the title [WIP] Add Ellipse and Rectangle Schema Add Ellipse and Rectangle Schema Dec 18, 2023
@hand-dot
Copy link
Collaborator Author

@peteward can you check this PR?

@hand-dot
Copy link
Collaborator Author

Copy link
Collaborator

@peteward peteward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool.

Question - if you want to write a custom plugin that extends one that already exists, is it harder with this change to consolidate the separate files into a single Plugin definition?

For example, if I want to have another shape plugin and I want to use the same propPanel as your shape one, is it still easy to do this without duplicating the code?

@hand-dot
Copy link
Collaborator Author

@peteward

Question - if you want to write a custom plugin that extends one that already exists, is it harder with this change to consolidate the separate files into a single Plugin definition?
For example, if I want to have another shape plugin and I want to use the same propPanel as your shape one, is it still easy to do this without duplicating the code?

we can extend like this.

const yourShape = {
  ui: () => {},
  pdf: () => {},
  propPanel: {
    ...ellipse.propPanel,
    defaultSchema: {
      ...ellipse.propPanel.defaultSchema,
      type: 'yourShape',
    },
  },
};

@hand-dot hand-dot merged commit 0329cb7 into main Dec 19, 2023
3 checks passed
@hand-dot hand-dot deleted the add-ellipse-and-rectangle-schema branch December 23, 2023 11:43
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.

None yet

2 participants