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
c77a46a1
Commit
c77a46a1
authored
Aug 10, 2020
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www
parent
5411fff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
play.component.ts
src/app/play/play.component.ts
+7
-9
No files found.
src/app/play/play.component.ts
View file @
c77a46a1
...
...
@@ -58,9 +58,7 @@ export class PlayComponent extends BaseResizeComponent implements OnInit, AfterV
ngOnInit
()
{
this
.
data
=
{
contentObj
:
{}
};
this
.
data
=
{
contentObj
:
{
pic_id
:
'
http://staging-teach.cdn.ireadabc.com/5502addf299f5f34dc181f993f81e311.png
'
,
imgData
:
{
naturalWidth
:
378
,
naturalHeight
:
452
,
aspectRatio
:
0.8362831858407079
,
width
:
723
,
height
:
864.5396825396825
,
left
:
0
,
top
:
0
},
parts
:
[{
word
:
'
aaaaa
'
,
data
:
{
x
:
94.5
,
y
:
162.79781509336098
,
width
:
189.41866571576762
,
height
:
40.99860606846473
}},
{
word
:
'
22222222
'
,
data
:
{
x
:
94.0649961099585
,
y
:
193.66062629668048
,
width
:
189.41866571576762
,
height
:
40.99860606846473
}}]}};
// 获取数据
const
getData
=
(
window
as
any
).
courseware
.
getData
;
...
...
@@ -71,9 +69,9 @@ export class PlayComponent extends BaseResizeComponent implements OnInit, AfterV
}
this
.
init
();
// @ts-ignore
if
(
window
.
air
)
{
if
(
window
[
'
air
'
]
)
{
// @ts-ignore
window
.
air
.
hideAirClassLoading
(
this
.
saveKey
,
this
.
data
);
window
[
'
air
'
]
.
hideAirClassLoading
(
this
.
saveKey
,
this
.
data
);
}
},
this
.
saveKey
);
...
...
@@ -102,7 +100,7 @@ export class PlayComponent extends BaseResizeComponent implements OnInit, AfterV
// console.log(this.previewContainer.nativeElement.offsetHeight);
}
calcCssProp
(
data
,
w
,
h
)
{
calcCssProp
(
data
,
w
,
h
)
{
// let scale = w / data.width;
...
...
@@ -169,7 +167,7 @@ export class PlayComponent extends BaseResizeComponent implements OnInit, AfterV
const
vh
=
this
.
readingContainer
.
nativeElement
.
offsetHeight
const
vh
=
this
.
readingContainer
.
nativeElement
.
offsetHeight
;
const
w
=
this
.
readingContainer
.
nativeElement
.
offsetWidth
/
2
-
0.04
*
vh
;
const
h
=
this
.
readingContainer
.
nativeElement
.
offsetHeight
-
0.08
*
vh
;
...
...
@@ -195,14 +193,14 @@ export class PlayComponent extends BaseResizeComponent implements OnInit, AfterV
this
.
partViewDetailCss
=
{
'
width.px
'
:
i_w
,
'
height.px
'
:
i_h
,
'
border
'
:
`3px solid
${
this
.
colors
[
index
]}
`
border
:
`3px solid
${
this
.
colors
[
index
]}
`
};
this
.
partViewImgDetailCss
=
{
'
width.px
'
:
p_w
,
'
height.px
'
:
p_h
,
'
max-width.px
'
:
p_w
,
'
max-height.px
'
:
p_h
,
'
transform
'
:
`translateX(-
${
p_x
}
px) translateY(-
${
p_y
}
px)`
transform
:
`translateX(-
${
p_x
}
px) translateY(-
${
p_y
}
px)`
};
this
.
partDetailVisible
=
true
;
...
...
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