This commit is contained in:
lzp
2026-03-30 15:44:28 +08:00
parent d6c8de770a
commit 03b8b36a8c
2 changed files with 3 additions and 15 deletions

View File

@@ -15,13 +15,7 @@ fabric.Object.prototype.toObject_ = fabric.Object.prototype.toObject
fabric.Object.prototype.toObject = function () {
const args = [...arguments]
const arr = [...fabric.Object.prototype.customProperties]
args.forEach(v => {
if (typeof v === 'string') {
arr.push(v)
} else if (Array.isArray(v)) {
arr.push(...v)
}
})
args.forEach(v => (Array.isArray(v) ? arr.push(...v) : arr.push(v)))
if (this.fill?.source === null) {
let image = new Image()
image.crossOrigin = 'anonymous'