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
6d5d91df
Commit
6d5d91df
authored
Mar 04, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理点击坐标偏移的问题
parent
daa313f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
manifest.json
manifest.json
+1
-1
Stage.ts
src/2d/display/Stage.ts
+10
-4
auto-adjust.ts
src/zeroing/decorators/auto-adjust.ts
+0
-1
No files found.
manifest.json
View file @
6d5d91df
{
"id"
:
"engine"
,
"url"
:
"engine.50cdcef6ebe4e8c0fbc624f9d4fbf225102c5750.js"
}
{
"id"
:
"engine"
,
"url"
:
"engine.56879c475b493bdd1b4fa1522bad7ad2a4d454e7.js"
}
\ No newline at end of file
\ No newline at end of file
src/2d/display/Stage.ts
View file @
6d5d91df
...
@@ -647,8 +647,14 @@ export class Stage extends Container {
...
@@ -647,8 +647,14 @@ export class Stage extends Container {
}
else
{
}
else
{
cp
=
new
Point
();
cp
=
new
Point
();
}
}
cp
.
x
=
(
points
[
o
].
clientX
-
points
[
o
].
target
.
offsetLeft
+
window
.
pageXOffset
)
*
devicePixelRatio
;
cp
.
y
=
(
points
[
o
].
clientY
-
points
[
o
].
target
.
offsetTop
+
window
.
pageYOffset
)
*
devicePixelRatio
;
let
doc
=
document
.
documentElement
;
let
box
=
points
[
o
].
target
.
getBoundingClientRect
();
let
left
=
box
.
left
+
window
.
pageXOffset
-
doc
.
clientLeft
;
let
top
=
box
.
top
+
window
.
pageYOffset
-
doc
.
clientTop
;
cp
.
x
=
(
points
[
o
].
pageX
-
left
)
*
devicePixelRatio
;
cp
.
y
=
(
points
[
o
].
pageY
-
top
)
*
devicePixelRatio
;
//计算舞台中的点
//计算舞台中的点
sp
=
s
.
globalToLocal
(
cp
,
DisplayObject
.
_bp
);
sp
=
s
.
globalToLocal
(
cp
,
DisplayObject
.
_bp
);
//检查是否有鼠标事件
//检查是否有鼠标事件
...
@@ -1011,11 +1017,11 @@ export class Stage extends Container {
...
@@ -1011,11 +1017,11 @@ export class Stage extends Container {
}
}
afterUpdateTransform
()
{
afterUpdateTransform
()
{
this
.
calculateBounds
();
/*
this.calculateBounds();
if (this.layoutInvalid) {
if (this.layoutInvalid) {
this.dispatchEvent(Event.LAYOUT_INVALID);
this.dispatchEvent(Event.LAYOUT_INVALID);
this.layoutInvalid = false;
this.layoutInvalid = false;
}
}
*/
}
}
public
destroy
():
void
{
public
destroy
():
void
{
...
...
src/zeroing/decorators/auto-adjust.ts
View file @
6d5d91df
...
@@ -92,7 +92,6 @@ class AdjustProxy {
...
@@ -92,7 +92,6 @@ class AdjustProxy {
}
}
adjustLayout
()
{
adjustLayout
()
{
return
;
const
that
=
this
.
_host
;
const
that
=
this
.
_host
;
const
{
width
:
pWidth
,
height
:
pHeight
}
=
that
.
parent
;
const
{
width
:
pWidth
,
height
:
pHeight
}
=
that
.
parent
;
...
...
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