Commit 51ba960d authored by Li Mingzhe's avatar Li Mingzhe

fix: 渲染

parent b2f97aae
import {
ApplicationRef,
ChangeDetectorRef,
Component,
ElementRef,
EventEmitter,
......@@ -114,9 +115,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
isTexJsonLoading = false;
isTexPngLoading = false;
constructor(private nzMessageService: NzMessageService, private appRef: ApplicationRef) {
constructor(private nzMessageService: NzMessageService, private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
this.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData();
......@@ -1311,6 +1313,12 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
*/
refresh() {
setTimeout(() => {
this.changeDetectorRef.reattach();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.appRef.tick();
}, 1);
}
......
......@@ -76,11 +76,13 @@ export class UploadDragonBoneComponent implements OnDestroy, OnChanges {
animaPanelCancel() {
this.animaPanelVisible = false;
this.refresh();
}
animaPanelOk() {
this.sendItemDragonBoneData();
this.animaPanelVisible = false;
this.refresh();
}
sendItemDragonBoneData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment