This commit is contained in:
lzp
2026-04-01 16:10:16 +08:00
parent 7bc9319ffb
commit c5f626df10

View File

@@ -220,8 +220,8 @@ export class ObjectManager {
const isWidth = object.hasOwnProperty('width') const isWidth = object.hasOwnProperty('width')
const isHeight = object.hasOwnProperty('height') const isHeight = object.hasOwnProperty('height')
if (isWidth || isHeight) { if (isWidth || isHeight) {
let width = options.width let width = isWidth ? options.width : object.width
let height = options.height let height = isHeight ? options.height : object.height
if (type === "polygon") { if (type === "polygon") {
if (object.points.length === 10) {// 五角星 if (object.points.length === 10) {// 五角星
options.points = getStarArr(width, height) options.points = getStarArr(width, height)