diff --git a/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts b/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts index 43707cc..3c263cb 100644 --- a/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts +++ b/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts @@ -220,8 +220,8 @@ export class ObjectManager { const isWidth = object.hasOwnProperty('width') const isHeight = object.hasOwnProperty('height') if (isWidth || isHeight) { - let width = options.width - let height = options.height + let width = isWidth ? options.width : object.width + let height = isHeight ? options.height : object.height if (type === "polygon") { if (object.points.length === 10) {// 五角星 options.points = getStarArr(width, height)