Zoom to fit for openscad (#569)

* Add viewall flag to openscad cli in prep for zoom to fit for scad previews

* Fix remaining issues with social image capture
This commit was merged in pull request #569.
This commit is contained in:
Kurt Hutten
2021-11-06 09:46:55 +11:00
committed by GitHub
parent a909188f15
commit 43fc897bf9
12 changed files with 473 additions and 369 deletions

View File

@@ -35,10 +35,15 @@ export const Failure = ({ error }: CellFailureProps) => (
<div style={{ color: 'red' }}>Error: {error.message}</div>
)
interface SocialCardProps extends CellSuccessProps<FindSocialCardQuery> {
children: React.ReactNode
}
export const Success = ({
userProject,
variables: { image64, LiveProjectViewer },
}: CellSuccessProps<FindSocialCardQuery>) => {
variables: { image64 },
children,
}: SocialCardProps) => {
const image = userProject?.Project?.mainImage
const gravatar = userProject?.image
const truncatedDescription =
@@ -102,9 +107,9 @@ export const Success = ({
image64 && 'opacity-0'
}`}
>
{LiveProjectViewer && (
{children && (
<div className="w-full h-full" id="social-card-canvas">
<LiveProjectViewer />
{children}
</div>
)}
</div>