Extract DEFAULT_STROKE_MITER_LIMIT constant
This commit is contained in:
parent
3e9cd236e9
commit
123dbe491b
|
|
@ -30,6 +30,7 @@ export const PEN_PATH_STROKE_WIDTH = 2
|
|||
export const PARENT_OUTLINE_ALPHA = 0.5
|
||||
export const PARENT_OUTLINE_DASH = 4
|
||||
export const DEFAULT_FONT_SIZE = 14
|
||||
export const DEFAULT_STROKE_MITER_LIMIT = 4
|
||||
export const LABEL_FONT_SIZE = 11
|
||||
export const SIZE_FONT_SIZE = 10
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { DEFAULT_STROKE_MITER_LIMIT } from '../constants'
|
||||
import { SceneGraph } from '../scene-graph'
|
||||
import { styleToWeight } from '../fonts'
|
||||
import { decodeVectorNetworkBlob } from '../vector'
|
||||
|
|
@ -489,7 +490,7 @@ export function importNodeChanges(
|
|||
borderBottomWeight: (ext(nc).borderBottomWeight as number) ?? 0,
|
||||
borderLeftWeight: (ext(nc).borderLeftWeight as number) ?? 0,
|
||||
independentStrokeWeights: (ext(nc).borderStrokeWeightsIndependent as boolean) ?? false,
|
||||
strokeMiterLimit: 4,
|
||||
strokeMiterLimit: DEFAULT_STROKE_MITER_LIMIT,
|
||||
minWidth: (ext(nc).minWidth as number) ?? null,
|
||||
maxWidth: (ext(nc).maxWidth as number) ?? null,
|
||||
minHeight: (ext(nc).minHeight as number) ?? null,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { DEFAULT_STROKE_MITER_LIMIT } from './constants'
|
||||
|
||||
export type { GUID, Color } from './types'
|
||||
|
||||
export type HandleMirroring = 'NONE' | 'ANGLE' | 'ANGLE_AND_LENGTH'
|
||||
|
|
@ -365,7 +367,7 @@ function createDefaultNode(type: NodeType, overrides: Partial<SceneNode> = {}):
|
|||
borderBottomWeight: 0,
|
||||
borderLeftWeight: 0,
|
||||
independentStrokeWeights: false,
|
||||
strokeMiterLimit: 4,
|
||||
strokeMiterLimit: DEFAULT_STROKE_MITER_LIMIT,
|
||||
minWidth: null,
|
||||
maxWidth: null,
|
||||
minHeight: null,
|
||||
|
|
|
|||
Loading…
Reference in a new issue