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
3cb34903
Commit
3cb34903
authored
Jul 23, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix drag outside issue
parent
86007449
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
18 deletions
+24
-18
publish
publish
+6
-7
render.js
src/core/render.js
+2
-2
view.js
src/module/view.js
+16
-9
No files found.
publish
View file @
3cb34903
echo -e "\033[0;33;1mPublish start."
echo -e "\033[0;33;1mPublish start."
echo -e "\033[0;33;1m> Checking out gh-pages\033[0m"
echo -e "\033[0;33;1m> Checking out gh-pages
...
\033[0m"
branch -D gh-pages
git branch -D gh-pages -q
git checkout -q -b gh-pages
git checkout -q -b gh-pages
echo -e "\033[0;33;1m> Delete server branch\033[0m"
echo -e "\033[0;33;1m> Delete server branch
...
\033[0m"
git push origin :gh-pages
git push origin :gh-pages
-q
echo -e "\033[0;33;1m> Building dist js files\033[0m"
echo -e "\033[0;33;1m> Building dist js files
...
\033[0m"
grunt -q > GRUNT_OUTPUT
grunt -q > GRUNT_OUTPUT
rm -f GRUNT_OUTPUT
rm -f GRUNT_OUTPUT
echo -e "\033[0;33;1m> Commit dist js files...\033[0m"
git add dist
git add dist
echo -e "\033[0;33;1m> Commit dist js files\033[0m"
git commit -qm "publish"
git commit -qm "publish"
echo -e "\033[0;33;1m> Pusing to git...\033[0m"
echo -e "\033[0;33;1m> Pusing to git...\033[0m"
...
...
src/core/render.js
View file @
3cb34903
...
@@ -123,8 +123,8 @@ kity.extendClass(Minder, (function() {
...
@@ -123,8 +123,8 @@ kity.extendClass(Minder, (function() {
}
}
for
(
j
=
0
;
j
<
nodes
.
length
;
j
++
)
{
for
(
j
=
0
;
j
<
nodes
.
length
;
j
++
)
{
this
.
fire
(
'
after
render'
,
{
this
.
fire
(
'
node
render'
,
{
node
:
node
node
:
node
s
[
j
]
});
});
}
}
},
},
...
...
src/module/view.js
View file @
3cb34903
...
@@ -28,6 +28,20 @@ var ViewDragger = kity.createClass("ViewDragger", {
...
@@ -28,6 +28,20 @@ var ViewDragger = kity.createClass("ViewDragger", {
lastPosition
=
null
,
lastPosition
=
null
,
currentPosition
=
null
;
currentPosition
=
null
;
function
dragEnd
(
e
)
{
lastPosition
=
null
;
e
.
stopPropagation
();
// 临时拖动需要还原状态
if
(
isTempDrag
)
{
dragger
.
setEnabled
(
false
);
isTempDrag
=
false
;
if
(
dragger
.
_minder
.
getStatus
()
==
'hand'
)
dragger
.
_minder
.
rollbackStatus
();
}
}
this
.
_minder
.
on
(
'normal.mousedown normal.touchstart readonly.mousedown readonly.touchstart'
,
function
(
e
)
{
this
.
_minder
.
on
(
'normal.mousedown normal.touchstart readonly.mousedown readonly.touchstart'
,
function
(
e
)
{
if
(
e
.
originEvent
.
button
==
2
)
{
if
(
e
.
originEvent
.
button
==
2
)
{
...
@@ -68,16 +82,9 @@ var ViewDragger = kity.createClass("ViewDragger", {
...
@@ -68,16 +82,9 @@ var ViewDragger = kity.createClass("ViewDragger", {
}
}
})
})
.
on
(
'mouseup touchend'
,
function
(
e
)
{
.
on
(
'mouseup touchend'
,
dragEnd
);
lastPosition
=
null
;
// 临时拖动需要还原状态
window
.
addEventListener
(
'mouseup'
,
dragEnd
);
if
(
isTempDrag
)
{
dragger
.
setEnabled
(
false
);
isTempDrag
=
false
;
this
.
rollbackStatus
();
}
});
}
}
});
});
...
...
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