Skip to content

Commit 7352338

Browse files
Integrate scribbled paragraph into core models and canvas renderer
1 parent d130b04 commit 7352338

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/core/model/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export type ShapeType =
8383
| 'ellipseLow'
8484
| 'rectangleLow'
8585
| 'circleLow'
86-
| 'textScribbled';
86+
| 'textScribbled'
87+
| 'paragraphScribbled';
8788

8889
export const ShapeDisplayName: Record<ShapeType, string> = {
8990
multiple: 'multiple',
@@ -156,6 +157,7 @@ export const ShapeDisplayName: Record<ShapeType, string> = {
156157
rectangleLow: 'Rectangle Placeholder',
157158
circleLow: 'Circle',
158159
textScribbled: 'Text Scribbled',
160+
paragraphScribbled: 'Paragraph Scribbled',
159161
};
160162

161163
export type EditType = 'input' | 'textarea' | 'imageupload';

src/pods/canvas/model/shape-size.mapper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ import {
8787
getCircleLowShapeSizeRestrictions,
8888
getTextScribbledShapeRestrictions,
8989
} from '@/common/components/mock-components/front-low-wireframes-components';
90+
import { getParagraphScribbledShapeRestrictions } from '@/common/components/mock-components/front-low-wireframes-components/paragraph-scribbled-shape';
9091

9192
const getMultipleNodeSizeRestrictions = (): ShapeSizeRestrictions => ({
9293
minWidth: 0,
@@ -169,6 +170,7 @@ const shapeSizeMap: Record<ShapeType, () => ShapeSizeRestrictions> = {
169170
rectangleLow: getRectangleLowShapeRestrictions,
170171
circleLow: getCircleLowShapeSizeRestrictions,
171172
textScribbled: getTextScribbledShapeRestrictions,
173+
paragraphScribbled: getParagraphScribbledShapeRestrictions,
172174
};
173175

174176
export default shapeSizeMap;

src/pods/canvas/shape-renderer/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ import {
8181
renderEllipseLow,
8282
renderRectangleLow,
8383
renderTextScribbled,
84+
renderParagraphScribbled,
8485
} from './simple-low-wireframes-components';
8586

8687
export const renderShapeComponent = (
@@ -226,6 +227,8 @@ export const renderShapeComponent = (
226227
return renderCircleLow(shape, shapeRenderedProps);
227228
case 'textScribbled':
228229
return renderTextScribbled(shape, shapeRenderedProps);
230+
case 'paragraphScribbled':
231+
return renderParagraphScribbled(shape, shapeRenderedProps);
229232
default:
230233
return renderNotFound(shape, shapeRenderedProps);
231234
}

0 commit comments

Comments
 (0)