Merge branch 'dev-3.3' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.4
This commit is contained in:
@@ -823,9 +823,11 @@ const Topology = /** @class */ (function () {
|
|||||||
this.setupMouseEvent()
|
this.setupMouseEvent()
|
||||||
// Wait for parent dom load
|
// Wait for parent dom load
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
if (!_this.divLayer) return
|
||||||
_this.canvasPos = _this.divLayer.canvas.getBoundingClientRect()
|
_this.canvasPos = _this.divLayer.canvas.getBoundingClientRect()
|
||||||
}, 500)
|
}, 500)
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
if (!_this.divLayer) return
|
||||||
_this.canvasPos = _this.divLayer.canvas.getBoundingClientRect()
|
_this.canvasPos = _this.divLayer.canvas.getBoundingClientRect()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
this.cache()
|
this.cache()
|
||||||
@@ -1300,6 +1302,9 @@ const Topology = /** @class */ (function () {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
this.rendering = true
|
this.rendering = true
|
||||||
|
if (!this.offscreen ) {
|
||||||
|
return
|
||||||
|
}
|
||||||
// 获取 ctx 对象
|
// 获取 ctx 对象
|
||||||
const ctx = this.offscreen.canvas.getContext('2d')
|
const ctx = this.offscreen.canvas.getContext('2d')
|
||||||
ctx.clearRect(0, 0, this.offscreen.canvas.width, this.offscreen.canvas.height)
|
ctx.clearRect(0, 0, this.offscreen.canvas.width, this.offscreen.canvas.height)
|
||||||
@@ -2510,6 +2515,7 @@ const Topology = /** @class */ (function () {
|
|||||||
}
|
}
|
||||||
this.cacheTimer = setTimeout(function () {
|
this.cacheTimer = setTimeout(function () {
|
||||||
let _a
|
let _a
|
||||||
|
if (!this.animateLayer) return
|
||||||
_this.animateLayer.readyPlay(undefined, true)
|
_this.animateLayer.readyPlay(undefined, true)
|
||||||
_this.animateLayer.animate();
|
_this.animateLayer.animate();
|
||||||
(_a = _this.cache) === null || _a === void 0 ? void 0 : _a.call(_this)
|
(_a = _this.cache) === null || _a === void 0 ? void 0 : _a.call(_this)
|
||||||
|
|||||||
Reference in New Issue
Block a user