Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_reading
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ww_reading
Commits
e9139ba2
Commit
e9139ba2
authored
Aug 15, 2020
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www
parent
5e6a7d0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
form.component.ts
src/app/form/form.component.ts
+17
-0
No files found.
src/app/form/form.component.ts
View file @
e9139ba2
...
...
@@ -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];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment