diff --git a/src/hooks/useImport.ts b/src/hooks/useImport.ts index 6c0f4ac5..39f9d4f8 100644 --- a/src/hooks/useImport.ts +++ b/src/hooks/useImport.ts @@ -267,9 +267,9 @@ export default () => { element.viewBox = [el.width, el.height] const pathFormula = SHAPE_PATH_FORMULAS[shape.pathFormula] - if ('editable' in pathFormula) { + if ('editable' in pathFormula && pathFormula.editable) { element.path = pathFormula.formula(el.width, el.height, pathFormula.defaultValue) - element.keypoint = pathFormula.defaultValue + element.keypoints = pathFormula.defaultValue } else element.path = pathFormula.formula(el.width, el.height) } diff --git a/src/views/Editor/Toolbar/ElementPositionPanel.vue b/src/views/Editor/Toolbar/ElementPositionPanel.vue index 6c3de814..3642c91d 100644 --- a/src/views/Editor/Toolbar/ElementPositionPanel.vue +++ b/src/views/Editor/Toolbar/ElementPositionPanel.vue @@ -188,7 +188,7 @@ const updateShapePathData = (width: number, height: number) => { const pathFormula = SHAPE_PATH_FORMULAS[handleElement.value.pathFormula] let path = '' - if ('editable' in pathFormula) path = pathFormula.formula(width, height, handleElement.value.keypoint!) + if ('editable' in pathFormula && pathFormula.editable) path = pathFormula.formula(width, height, handleElement.value.keypoints!) else path = pathFormula.formula(width, height) return {