Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-engine
Project
Project
Details
Activity
Releases
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
劳工
zeroing-engine
Commits
245ec63f
Commit
245ec63f
authored
May 09, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配css样式
parent
2c3d355a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
Stage.ts
src/2d/display/Stage.ts
+6
-2
No files found.
src/2d/display/Stage.ts
View file @
245ec63f
...
@@ -559,7 +559,7 @@ export class Stage extends Container {
...
@@ -559,7 +559,7 @@ export class Stage extends Container {
* @return {{w: number, h: number}}
* @return {{w: number, h: number}}
*/
*/
public
getRootDivWH
(
div
:
HTMLDivElement
)
{
public
getRootDivWH
(
div
:
HTMLDivElement
)
{
let
sw
=
div
.
style
.
width
;
/*
let sw = div.style.width;
let sh = div.style.height;
let sh = div.style.height;
let iw = document.body.clientWidth;
let iw = document.body.clientWidth;
// let ih = document.body.clientHeight-40;
// let ih = document.body.clientHeight-40;
...
@@ -580,7 +580,11 @@ export class Stage extends Container {
...
@@ -580,7 +580,11 @@ export class Stage extends Container {
vH *= ih / 100;
vH *= ih / 100;
}
}
}
}
return
{
w
:
vW
,
h
:
vH
};
return {w: vW, h: vH};*/
let
divBound
=
div
.
getBoundingClientRect
();
let
w
=
divBound
.
width
;
let
h
=
divBound
.
height
;
return
{
w
,
h
};
}
}
/**
/**
...
...
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