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

fix: 渲染

parent b2f97aae
import { import {
ApplicationRef, ApplicationRef,
ChangeDetectorRef,
Component, Component,
ElementRef, ElementRef,
EventEmitter, EventEmitter,
...@@ -114,9 +115,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -114,9 +115,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
isTexJsonLoading = false; isTexJsonLoading = false;
isTexPngLoading = 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.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData(); this.uploadData = (<any> window).courseware.uploadData();
...@@ -1311,6 +1313,12 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -1311,6 +1313,12 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
*/ */
refresh() { refresh() {
setTimeout(() => { setTimeout(() => {
this.changeDetectorRef.reattach();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.appRef.tick(); this.appRef.tick();
}, 1); }, 1);
} }
......
...@@ -76,11 +76,13 @@ export class UploadDragonBoneComponent implements OnDestroy, OnChanges { ...@@ -76,11 +76,13 @@ export class UploadDragonBoneComponent implements OnDestroy, OnChanges {
animaPanelCancel() { animaPanelCancel() {
this.animaPanelVisible = false; this.animaPanelVisible = false;
this.refresh();
} }
animaPanelOk() { animaPanelOk() {
this.sendItemDragonBoneData(); this.sendItemDragonBoneData();
this.animaPanelVisible = false; this.animaPanelVisible = false;
this.refresh();
} }
sendItemDragonBoneData() { 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