Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
ops
luna
Commits
82a1f7d4
Commit
82a1f7d4
authored
May 30, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改全屏
parent
69ffa595
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
17 deletions
+29
-17
cn.json
i18n/cn.json
+2
-1
zh-CN.json
i18n/zh-CN.json
+2
-1
zh.json
i18n/zh.json
+2
-1
nav.component.ts
src/app/elements/nav/nav.component.ts
+3
-2
term.component.ts
src/app/elements/term/term.component.ts
+20
-12
No files found.
i18n/cn.json
View file @
82a1f7d4
...
...
@@ -59,5 +59,6 @@
"select a solution"
:
"选择分辨率"
,
"set font"
:
"设置字体"
,
"font"
:
"字体"
,
"font size"
:
"字体大小"
"font size"
:
"字体大小"
,
"full screen"
:
"全屏显示"
}
i18n/zh-CN.json
View file @
82a1f7d4
...
...
@@ -59,5 +59,6 @@
"select a solution"
:
"选择分辨率"
,
"set font"
:
"设置字体"
,
"font"
:
"字体"
,
"font size"
:
"字体大小"
"font size"
:
"字体大小"
,
"full screen"
:
"全屏显示"
}
i18n/zh.json
View file @
82a1f7d4
...
...
@@ -59,5 +59,6 @@
"select a solution"
:
"选择分辨率"
,
"set font"
:
"设置字体"
,
"font"
:
"字体"
,
"font size"
:
"字体大小"
"font size"
:
"字体大小"
,
"full screen"
:
"全屏显示"
}
src/app/elements/nav/nav.component.ts
View file @
82a1f7d4
...
...
@@ -66,8 +66,9 @@ export class ElementNavComponent implements OnInit {
// this._appService.copy();
break
;
}
case
'FullScreen'
:{
document
.
getElementsByClassName
(
"window active "
)[
0
].
requestFullscreen
();
case
'FullScreen'
:
{
document
.
getElementsByClassName
(
'window active '
)[
0
].
requestFullscreen
();
window
.
dispatchEvent
(
new
Event
(
'resize'
));
break
;
}
case
'Disconnect'
:
{
...
...
src/app/elements/term/term.component.ts
View file @
82a1f7d4
...
...
@@ -46,18 +46,26 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
}
getWinSize
()
{
const
activeEle
=
$
(
'#winContainer'
);
const
elementStyle
=
window
.
getComputedStyle
(
this
.
term
.
element
);
const
elementPadding
=
{
top
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-top'
),
10
),
bottom
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-bottom'
),
10
),
right
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-right'
),
10
),
left
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-left'
),
10
)
};
const
elementPaddingVer
=
elementPadding
.
top
+
elementPadding
.
bottom
;
const
elementPaddingHor
=
elementPadding
.
right
+
elementPadding
.
left
;
const
availableHeight
=
activeEle
.
height
()
-
elementPaddingVer
;
const
availableWidth
=
activeEle
.
width
()
-
elementPaddingHor
-
(
<
any
>
this
.
term
).
viewport
.
scrollBarWidth
;
let
availableHeight
=
0
;
let
availableWidth
=
0
;
if
(
document
.
fullscreenElement
)
{
availableWidth
=
document
.
body
.
clientWidth
-
10
;
availableHeight
=
document
.
body
.
clientHeight
;
}
else
{
const
activeEle
=
$
(
'#winContainer'
);
const
elementStyle
=
window
.
getComputedStyle
(
this
.
term
.
element
);
const
elementPadding
=
{
top
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-top'
),
10
),
bottom
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-bottom'
),
10
),
right
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-right'
),
10
),
left
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-left'
),
10
)
};
const
elementPaddingVer
=
elementPadding
.
top
+
elementPadding
.
bottom
;
const
elementPaddingHor
=
elementPadding
.
right
+
elementPadding
.
left
;
availableHeight
=
activeEle
.
height
()
-
elementPaddingVer
;
availableWidth
=
activeEle
.
width
()
-
elementPaddingHor
-
(
<
any
>
this
.
term
).
viewport
.
scrollBarWidth
;
}
const
geometry
=
[
Math
.
floor
(
availableWidth
/
(
<
any
>
this
.
term
).
renderer
.
dimensions
.
actualCellWidth
)
-
1
,
Math
.
floor
(
availableHeight
/
(
<
any
>
this
.
term
).
renderer
.
dimensions
.
actualCellHeight
)
-
1
...
...
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