BlockSuite API Documentation / @blocksuite/affine-block-surface / getLastPropsKey
Function: getLastPropsKey()
getLastPropsKey(
modelType
,modelProps
):null
|"brush"
|"connector"
|"mindmap"
|"text"
|"affine:frame"
|"affine:edgeless-text"
|"affine:note"
|"shape:diamond"
|"shape:ellipse"
|"shape:rect"
|"shape:triangle"
|"shape:roundedRect"
Defined in: packages/affine/blocks/block-surface/src/utils/get-last-props-key.ts:10
Parameters
modelType
string
modelProps
Partial
<{ color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; lineWidth
: LineWidth
; } | { frontEndpointStyle
: PointStyle
; labelStyle
: { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; textAlign
: TextAlign
; }; mode
: ConnectorMode
; rearEndpointStyle
: PointStyle
; rough
: boolean
; stroke
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; strokeStyle
: StrokeStyle
; strokeWidth
: LineWidth
; } | { layoutType
: LayoutType
; style
: MindmapStyle
; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; textAlign
: TextAlign
; } | { background
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fontFamily
: FontFamily
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; textAlign
: TextAlign
; } | { background
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; displayMode
: NoteDisplayMode
; edgeless
: { style
: { borderRadius
: number
; borderSize
: number
; borderStyle
: StrokeStyle
; shadowType
: NoteShadow
; }; }; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fillColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; filled
: boolean
; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; radius
: number
; roughness
: number
; shapeStyle
: ShapeStyle
; strokeColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; strokeStyle
: StrokeStyle
; strokeWidth
: number
; textAlign
: TextAlign
; textHorizontalAlign
: TextAlign
; textVerticalAlign
: TextVerticalAlign
; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fillColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; filled
: boolean
; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; radius
: number
; roughness
: number
; shapeStyle
: ShapeStyle
; strokeColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; strokeStyle
: StrokeStyle
; strokeWidth
: number
; textAlign
: TextAlign
; textHorizontalAlign
: TextAlign
; textVerticalAlign
: TextVerticalAlign
; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fillColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; filled
: boolean
; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; radius
: number
; roughness
: number
; shapeStyle
: ShapeStyle
; strokeColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; strokeStyle
: StrokeStyle
; strokeWidth
: number
; textAlign
: TextAlign
; textHorizontalAlign
: TextAlign
; textVerticalAlign
: TextVerticalAlign
; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fillColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; filled
: boolean
; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; radius
: number
; roughness
: number
; shapeStyle
: ShapeStyle
; strokeColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; strokeStyle
: StrokeStyle
; strokeWidth
: number
; textAlign
: TextAlign
; textHorizontalAlign
: TextAlign
; textVerticalAlign
: TextVerticalAlign
; } | { color
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; fillColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; filled
: boolean
; fontFamily
: FontFamily
; fontSize
: number
; fontStyle
: FontStyle
; fontWeight
: FontWeight
; radius
: number
; roughness
: number
; shapeStyle
: ShapeStyle
; strokeColor
: string
| { normal
: string
; } | { dark
: string
; light
: string
; }; strokeStyle
: StrokeStyle
; strokeWidth
: number
; textAlign
: TextAlign
; textHorizontalAlign
: TextAlign
; textVerticalAlign
: TextVerticalAlign
; }>
Returns
null
| "brush"
| "connector"
| "mindmap"
| "text"
| "affine:frame"
| "affine:edgeless-text"
| "affine:note"
| "shape:diamond"
| "shape:ellipse"
| "shape:rect"
| "shape:triangle"
| "shape:roundedRect"