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
290f1339
Commit
290f1339
authored
Jan 24, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed layout bug
parent
39b21a35
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
minder.select.js
src/core/minder.select.js
+5
-5
layout.default.js
src/module/layout.default.js
+1
-1
layout.js
src/module/layout.js
+2
-2
mouse.js
src/module/mouse.js
+1
-1
No files found.
src/core/minder.select.js
View file @
290f1339
...
...
@@ -31,20 +31,20 @@ kity.extendClass( Minder, function () {
}
);
this
.
_selectedNodes
=
[];
},
removeSelectedNodes
:
function
(
nodes
)
{
removeSelectedNodes
:
function
(
nodes
)
{
var
me
=
this
;
Utils
.
each
(
Utils
.
isArray
(
nodes
)
?
nodes
:
[
nodes
],
function
(
i
,
n
)
{
if
(
me
.
_selectedNodes
.
indexOf
(
n
)
===
-
1
)
return
;
me
.
_selectedNodes
.
splice
(
i
,
1
);
if
(
me
.
_selectedNodes
.
indexOf
(
n
)
===
-
1
)
return
;
me
.
_selectedNodes
.
splice
(
i
,
1
);
unhighlightNode
(
me
,
n
);
}
);
return
this
;
},
select
:
function
(
nodes
,
isToggleSelect
)
{
select
:
function
(
nodes
,
isToggleSelect
)
{
isToggleSelect
&&
this
.
removeAllSelectedNodes
();
var
me
=
this
;
Utils
.
each
(
Utils
.
isArray
(
nodes
)
?
nodes
:
[
nodes
],
function
(
i
,
n
)
{
if
(
me
.
_selectedNodes
.
indexOf
(
n
)
!==
-
1
)
return
;
if
(
me
.
_selectedNodes
.
indexOf
(
n
)
!==
-
1
)
return
;
me
.
_selectedNodes
.
push
(
n
);
highlightNode
(
me
,
n
);
}
);
...
...
src/module/layout.default.js
View file @
290f1339
...
...
@@ -409,7 +409,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
if
(
_buffer
.
length
!==
0
)
{
for
(
var
i
=
0
;
i
<
_buffer
.
length
;
i
++
)
{
var
point
=
_buffer
[
i
].
getPoint
();
if
(
point
)
{
if
(
point
&&
point
.
x
&&
point
.
y
)
{
if
(
point
.
x
>
Layout
.
x
)
{
Layout
.
rightList
.
push
(
_buffer
[
i
]
);
}
else
{
...
...
src/module/layout.js
View file @
290f1339
...
...
@@ -85,7 +85,7 @@ KityMinder.registerModule( "LayoutModule", function () {
execute
:
function
(
km
,
node
)
{
var
parent
=
km
.
getSelectedNode
();
km
.
appendChildNode
(
parent
,
node
);
km
.
select
(
node
,
true
);
km
.
select
(
node
,
true
);
return
node
;
}
};
...
...
@@ -100,7 +100,7 @@ KityMinder.registerModule( "LayoutModule", function () {
}
else
{
km
.
appendSiblingNode
(
selectedNode
,
node
);
}
km
.
select
(
node
,
true
);
km
.
select
(
node
,
true
);
return
node
;
}
};
...
...
src/module/mouse.js
View file @
290f1339
...
...
@@ -76,7 +76,7 @@ KityMinder.registerModule( "MouseModule", function () {
if
(
e
.
originEvent
.
touches
&&
e
.
originEvent
.
touches
.
length
!=
1
)
return
;
var
clickNode
=
e
.
getTargetNode
();
if
(
clickNode
)
{
this
.
select
(
clickNode
);
this
.
select
(
clickNode
,
true
);
}
else
{
this
.
removeAllSelectedNodes
();
this
.
SelectArea
.
selectStart
(
e
);
...
...
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