|
@@ -1947,10 +1947,12 @@ export default () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (shape) {
|
|
if (shape) {
|
|
|
- element.path = shape.path
|
|
|
|
|
- // const { maxX, maxY } = getSvgPathRange(el.path);
|
|
|
|
|
- element.viewBox = shape.viewBox
|
|
|
|
|
- // element.viewBox = [originWidth || maxX, originHeight || maxY];
|
|
|
|
|
|
|
+ //element.path = shape.path
|
|
|
|
|
+ //element.viewBox = shape.viewBox
|
|
|
|
|
+ const { maxX, maxY } = getSvgPathRange(el.path)
|
|
|
|
|
+ element.path = el.path
|
|
|
|
|
+ element.viewBox = poriginWidth ? [maxX, maxY] : [originWidth, originHeight]
|
|
|
|
|
+
|
|
|
if (shape.pathFormula) {
|
|
if (shape.pathFormula) {
|
|
|
element.pathFormula = shape.pathFormula
|
|
element.pathFormula = shape.pathFormula
|
|
|
element.viewBox = [el.width, el.height]
|
|
element.viewBox = [el.width, el.height]
|