Commit e9139ba2 authored by liujiaxin's avatar liujiaxin

www

parent 5e6a7d0e
......@@ -128,6 +128,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
return nitem;
});
this.initWithDataAfterData();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
});
}
......@@ -171,6 +174,8 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
this.item.contentObj.parts = data;
// this.item.contentObj['imgData'] = imgData;
(window as any).courseware.setData(this.item, null, this.saveKey);
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}
......@@ -293,6 +298,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
console.log(123123);
this.focusUserInput();
this.save();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}
focusUserInput() {
setTimeout(() => {
......@@ -352,6 +360,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
const cropper: any = this.angularCropper.cropper;
cropper.previews = [];
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}
savePart(evt, idx) {
......@@ -378,6 +389,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
cropper.previews = [];
this.initPart(img ,idx);
this.save();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}
previewUserSelectPart(idx) {
const part = this.cropperParts[idx];
......@@ -402,6 +416,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
'height.px': ih,
transform: `translateX(-${ix}px) translateY(-${iy}px)`
};
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}
onChangePartWord(val, idx ) {
// const part = this.cropperParts[idx];
......
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