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
d45fe6f0
Commit
d45fe6f0
authored
Dec 06, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ScrollContainer互斥操作
Image加载网络图片相对布局定位问题
parent
88db356e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
12 deletions
+22
-12
engine.js
debug/engine.js
+5
-5
engine.js.map
debug/engine.js.map
+1
-1
oss.config.js
oss.config.js
+8
-0
package.json
package.json
+1
-1
Sprite.ts
src/2d/display/Sprite.ts
+3
-0
ScrollContainer.ts
src/2d/ui/ScrollContainer.ts
+4
-5
No files found.
debug/engine.js
View file @
d45fe6f0
...
...
@@ -4834,6 +4834,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
this
.
_localBoundsSelf
.
y
=
-
height
*
this
.
anchorTexture
.
y
;
this
.
_localBoundsSelf
.
width
=
width
;
this
.
_localBoundsSelf
.
height
=
height
;
this
.
dispatchEvent
(
Event
.
RESIZE
);
};
Sprite
.
prototype
.
_onAnchorUpdate
=
function
()
{
this
.
_transformID
=
-
1
;
...
...
@@ -11254,17 +11255,16 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
s
.
autoScroll
=
false
;
}
if
(
s
.
_direction
===
exports
.
SCROLL_DIRECTION
.
VERTICAL
)
{
s
.
lastValue
=
e
.
local
Y
;
s
.
lastValue
=
e
.
stage
Y
;
}
else
{
s
.
lastValue
=
e
.
local
X
;
s
.
lastValue
=
e
.
stage
X
;
}
s
.
speed
=
0
;
s
.
isMouseDownState
=
1
;
registerScrollInstance
(
this
);
}
else
if
(
e
.
type
==
MouseEvent
.
MOUSE_MOVE
)
{
console
.
log
(
this
.
name
);
if
(
s
.
isMouseDownState
==
0
)
return
;
if
(
s
.
isMouseDownState
==
1
)
{
...
...
@@ -11273,10 +11273,10 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
s
.
isMouseDownState
=
2
;
var
currentValue
=
void
0
;
if
(
s
.
_direction
===
exports
.
SCROLL_DIRECTION
.
VERTICAL
)
{
currentValue
=
e
.
local
Y
;
currentValue
=
e
.
stage
Y
;
}
else
{
currentValue
=
e
.
local
X
;
currentValue
=
e
.
stage
X
;
}
s
.
speed
=
currentValue
-
s
.
lastValue
;
if
(
s
.
speed
>
s
.
minDis
)
{
...
...
debug/engine.js.map
View file @
d45fe6f0
This diff is collapsed.
Click to expand it.
oss.config.js
0 → 100644
View file @
d45fe6f0
module
.
exports
=
{
region
:
'oss-cn-hangzhou'
,
id
:
'LTAIqO2wblIxQvwc'
,
secret
:
'4brsaSRbRpjxw3oDIxJi6bNMcndIR6'
,
bucket
:
'duiba'
,
output
:
'/editor/zeroing/libs'
};
package.json
View file @
d45fe6f0
...
...
@@ -28,7 +28,7 @@
"rollup"
:
"rollup -c -o dist/engine.js --environment BUILD:production1"
,
"rollup:debug"
:
"rollup -c -m "
,
"rename"
:
"node scripts/rename-hash.js dist/engine.js"
,
"build"
:
"rm -rf dist&&yarn rollup && yarn rename"
,
"build"
:
"rm -rf dist&&yarn rollup && yarn rename
&& ali-oss-publish -c oss.config.js -e dist
"
,
"ts"
:
"dts-bundle --name engine --main types/src/index.d.ts --out ../../dist/index.d.ts"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"dev"
:
"webpack -w"
,
...
...
src/2d/display/Sprite.ts
View file @
d45fe6f0
...
...
@@ -2,6 +2,7 @@ import { ObservablePoint, Point, Rectangle } from '../math';
import
{
sign
,
TextureCache
}
from
'../utils'
;
// import { BLEND_MODES } from '../const';
import
Texture
from
'../texture/Texture'
;
import
{
Event
}
from
'../events/Event'
;
import
Container
from
'./Container'
;
import
{
DisplayObject
}
from
"./DisplayObject"
;
...
...
@@ -138,6 +139,8 @@ export default class Sprite extends Container {
this
.
_localBoundsSelf
.
y
=
-
height
*
this
.
anchorTexture
.
y
;
this
.
_localBoundsSelf
.
width
=
width
;
this
.
_localBoundsSelf
.
height
=
height
;
this
.
dispatchEvent
(
Event
.
RESIZE
);
}
/**
...
...
src/2d/ui/ScrollContainer.ts
View file @
d45fe6f0
...
...
@@ -335,16 +335,15 @@ export class ScrollContainer extends Container {
// Tween.kill(s._tweenId);
}
if
(
s
.
_direction
===
SCROLL_DIRECTION
.
VERTICAL
)
{
s
.
lastValue
=
e
.
local
Y
;
s
.
lastValue
=
e
.
stage
Y
;
}
else
{
s
.
lastValue
=
e
.
local
X
;
s
.
lastValue
=
e
.
stage
X
;
}
s
.
speed
=
0
;
s
.
isMouseDownState
=
1
;
registerScrollInstance
(
this
);
}
else
if
(
e
.
type
==
MouseEvent
.
MOUSE_MOVE
)
{
console
.
log
(
this
.
name
);
if
(
s
.
isMouseDownState
==
0
)
return
;
if
(
s
.
isMouseDownState
==
1
)
{
s
.
dispatchEvent
(
Event
.
ON_SCROLL_START
);
...
...
@@ -352,9 +351,9 @@ export class ScrollContainer extends Container {
s
.
isMouseDownState
=
2
;
let
currentValue
:
number
;
if
(
s
.
_direction
===
SCROLL_DIRECTION
.
VERTICAL
)
{
currentValue
=
e
.
local
Y
;
currentValue
=
e
.
stage
Y
;
}
else
{
currentValue
=
e
.
local
X
;
currentValue
=
e
.
stage
X
;
}
s
.
speed
=
currentValue
-
s
.
lastValue
;
if
(
s
.
speed
>
s
.
minDis
)
{
...
...
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