diff --git a/lib/shape-utils/draw.tsx b/lib/shape-utils/draw.tsx index 754e41b2b..b672ef517 100644 --- a/lib/shape-utils/draw.tsx +++ b/lib/shape-utils/draw.tsx @@ -40,7 +40,6 @@ const draw = registerShapeUtils({ style: { ...defaultStyle, ...props.style, - isFilled: false, }, } }, @@ -60,7 +59,20 @@ const draw = registerShapeUtils({ ) } - return + return ( + + {points.length > 3 && + vec.dist(points[0], points[points.length - 1]) < 8 && ( + pt.slice(0, 2)).join(',')} + fill={styles.fill} + stroke="none" + strokeWidth={0} + /> + )} + + + ) }, getBounds(shape) { @@ -151,7 +163,6 @@ const draw = registerShapeUtils({ applyStyles(shape, style) { const styles = { ...shape.style, ...style } - styles.isFilled = false styles.dash = DashStyle.Solid shape.style = styles shape.points = [...shape.points] @@ -170,7 +181,7 @@ const draw = registerShapeUtils({ return this }, - canStyleFill: false, + canStyleFill: true, }) export default draw diff --git a/pages/auth-test.tsx b/pages/auth-test.tsx index d52195313..e523029ea 100644 --- a/pages/auth-test.tsx +++ b/pages/auth-test.tsx @@ -1,6 +1,5 @@ import Head from 'next/head' -import { signIn, signOut, getSession, useSession } from 'next-auth/client' -import { GetServerSidePropsContext } from 'next' +import { signIn, signOut, useSession } from 'next-auth/client' export default function Home() { const [session, loading] = useSession()