Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
43b2e5c6
Commit
43b2e5c6
authored
Sep 13, 2015
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决了拖拽跳动的问题
parent
c7c9459b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
view.js
src/module/view.js
+9
-12
No files found.
src/module/view.js
View file @
43b2e5c6
...
...
@@ -91,6 +91,7 @@ define(function(require, exports, module) {
function
dragEnd
(
e
)
{
if
(
!
lastPosition
)
return
;
lastPosition
=
null
;
e
.
stopPropagation
();
...
...
@@ -342,33 +343,29 @@ define(function(require, exports, module) {
if
(
kity
.
Browser
.
edge
)
{
this
.
fire
(
'paperrender'
);
}
if
(
!
selected
)
return
;
var
dragger
=
this
.
_viewDragger
;
var
view
=
dragger
.
getView
();
var
focus
=
selected
.
getLayoutBox
();
var
space
=
150
;
var
tolerance
=
150
;
var
dx
=
0
,
dy
=
0
;
var
space
=
50
;
var
dx
=
0
,
dy
=
0
;
if
(
focus
.
right
>
view
.
right
-
tolerance
)
{
if
(
focus
.
right
>
view
.
right
)
{
dx
+=
view
.
right
-
focus
.
right
-
space
;
}
else
if
(
focus
.
left
<
view
.
left
+
tolerance
)
{
}
else
if
(
focus
.
left
<
view
.
left
)
{
dx
+=
view
.
left
-
focus
.
left
+
space
;
}
if
(
focus
.
bottom
>
view
.
bottom
-
tolerance
)
{
if
(
focus
.
bottom
>
view
.
bottom
)
{
dy
+=
view
.
bottom
-
focus
.
bottom
-
space
;
}
if
(
focus
.
top
<
view
.
top
+
tolerance
)
{
if
(
focus
.
top
<
view
.
top
)
{
dy
+=
view
.
top
-
focus
.
top
+
space
;
}
if
(
dx
||
dy
)
{
dragger
.
move
(
new
kity
.
Point
(
dx
,
dy
));
}
if
(
dx
||
dy
)
dragger
.
move
(
new
kity
.
Point
(
dx
,
dy
),
100
);
}
...
...
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