Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
renderingEngine
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
王剑峰
renderingEngine
Commits
864665b3
Commit
864665b3
authored
Dec 05, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复遮罩嵌套问题
修改滚动方向
parent
620d3045
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
13 deletions
+29
-13
engine.js
debug/engine.js
+17
-10
engine.js.map
debug/engine.js.map
+1
-1
ScrollContainer.ts
src/2d/ui/ScrollContainer.ts
+11
-2
No files found.
debug/engine.js
View file @
864665b3
...
...
@@ -11089,6 +11089,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
_this
.
maxSpeed
=
100
;
_this
.
fSpeed
=
20
;
_this
.
paramXY
=
"y"
;
_this
.
paramSize
=
"height"
;
_this
.
stopTimes
=
-
1
;
_this
.
isMouseDownState
=
0
;
_this
.
autoScroll
=
false
;
...
...
@@ -11189,7 +11190,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}
Object
.
defineProperty
(
ScrollContainer
.
prototype
,
"maxDistance"
,
{
get
:
function
()
{
return
this
.
viewPort
.
height
;
return
this
.
viewPort
[
this
.
paramSize
]
;
},
enumerable
:
true
,
configurable
:
true
...
...
@@ -11200,25 +11201,31 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
},
set
:
function
(
value
)
{
this
.
_direction
=
value
;
this
.
updateDirection
();
},
enumerable
:
true
,
configurable
:
true
});
ScrollContainer
.
prototype
.
updateDirection
=
function
()
{
var
s
=
this
;
if
(
value
===
exports
.
SCROLL_DIRECTION
.
VERTICAL
)
{
if
(
this
.
_direction
===
exports
.
SCROLL_DIRECTION
.
VERTICAL
)
{
s
.
distance
=
s
.
height
;
s
.
paramXY
=
"y"
;
s
.
paramSize
=
'height'
;
}
else
{
s
.
distance
=
s
.
width
;
s
.
paramXY
=
"x"
;
s
.
paramSize
=
'width'
;
}
},
enumerable
:
true
,
configurable
:
true
});
};
ScrollContainer
.
prototype
.
updateViewRect
=
function
()
{
var
s
=
this
;
s
.
maskObj
.
clear
();
s
.
maskObj
.
beginFill
(
"#000000"
);
s
.
maskObj
.
drawRect
(
0
,
0
,
s
.
width
,
s
.
height
);
s
.
maskObj
.
endFill
();
this
.
updateDirection
();
};
ScrollContainer
.
prototype
.
onMouseEvent
=
function
(
e
)
{
var
s
=
this
;
...
...
debug/engine.js.map
View file @
864665b3
This diff is collapsed.
Click to expand it.
src/2d/ui/ScrollContainer.ts
View file @
864665b3
...
...
@@ -132,6 +132,7 @@ export class ScrollContainer extends Container {
*/
public
fSpeed
:
number
=
20
;
protected
paramXY
:
string
=
"y"
;
protected
paramSize
:
string
=
"height"
;
private
stopTimes
:
number
=
-
1
;
private
isMouseDownState
:
number
=
0
;
/**
...
...
@@ -260,7 +261,7 @@ export class ScrollContainer extends Container {
}
get
maxDistance
()
{
return
this
.
viewPort
.
height
;
return
this
.
viewPort
[
this
.
paramSize
]
;
}
get
direction
():
SCROLL_DIRECTION
{
...
...
@@ -270,13 +271,19 @@ export class ScrollContainer extends Container {
set
direction
(
value
:
SCROLL_DIRECTION
)
{
this
.
_direction
=
value
;
this
.
updateDirection
();
}
protected
updateDirection
(){
let
s
=
this
;
if
(
value
===
SCROLL_DIRECTION
.
VERTICAL
)
{
if
(
this
.
_direction
===
SCROLL_DIRECTION
.
VERTICAL
)
{
s
.
distance
=
s
.
height
;
s
.
paramXY
=
"y"
;
s
.
paramSize
=
'height'
;
}
else
{
s
.
distance
=
s
.
width
;
s
.
paramXY
=
"x"
;
s
.
paramSize
=
'width'
;
}
}
...
...
@@ -292,6 +299,8 @@ export class ScrollContainer extends Container {
s
.
maskObj
.
beginFill
(
"#000000"
);
s
.
maskObj
.
drawRect
(
0
,
0
,
s
.
width
,
s
.
height
);
s
.
maskObj
.
endFill
();
this
.
updateDirection
();
}
private
onMouseEvent
(
e
:
MouseEvent
):
void
{
...
...
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