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
d16bcc7a
Commit
d16bcc7a
authored
Feb 05, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
408f2ed0
476dd4c3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
591 deletions
+12
-591
layout.green.js
src/module/layout.green.js
+2
-587
layout.js
src/module/layout.js
+6
-0
mouse.js
src/module/mouse.js
+4
-4
No files found.
src/module/layout.green.js
View file @
d16bcc7a
This diff is collapsed.
Click to expand it.
src/module/layout.js
View file @
d16bcc7a
...
@@ -89,6 +89,9 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -89,6 +89,9 @@ KityMinder.registerModule( "LayoutModule", function () {
base
:
Command
,
base
:
Command
,
execute
:
function
(
km
,
node
)
{
execute
:
function
(
km
,
node
)
{
var
parent
=
km
.
getSelectedNode
();
var
parent
=
km
.
getSelectedNode
();
if
(
!
parent
)
{
return
false
;
}
km
.
appendChildNode
(
parent
,
node
);
km
.
appendChildNode
(
parent
,
node
);
km
.
select
(
node
,
true
);
km
.
select
(
node
,
true
);
return
node
;
return
node
;
...
@@ -100,6 +103,9 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -100,6 +103,9 @@ KityMinder.registerModule( "LayoutModule", function () {
base
:
Command
,
base
:
Command
,
execute
:
function
(
km
,
node
)
{
execute
:
function
(
km
,
node
)
{
var
selectedNode
=
km
.
getSelectedNode
();
var
selectedNode
=
km
.
getSelectedNode
();
if
(
!
selectedNode
)
{
return
false
;
}
if
(
selectedNode
.
isRoot
()
)
{
if
(
selectedNode
.
isRoot
()
)
{
node
.
setType
(
"main"
);
node
.
setType
(
"main"
);
km
.
appendChildNode
(
selectedNode
,
node
);
km
.
appendChildNode
(
selectedNode
,
node
);
...
...
src/module/mouse.js
View file @
d16bcc7a
...
@@ -5,7 +5,7 @@ KityMinder.registerModule( "MouseModule", function () {
...
@@ -5,7 +5,7 @@ KityMinder.registerModule( "MouseModule", function () {
return
kity
.
Vector
.
fromPoints
(
e
.
kityEvent
.
getPosition
(
0
),
e
.
kityEvent
.
getPosition
(
1
)
).
length
();
return
kity
.
Vector
.
fromPoints
(
e
.
kityEvent
.
getPosition
(
0
),
e
.
kityEvent
.
getPosition
(
1
)
).
length
();
}
}
var
SelectArea
=
this
.
SelectArea
=
(
function
()
{
var
SelectArea
=
(
function
()
{
var
startPos
=
null
;
var
startPos
=
null
;
var
selectRect
=
null
;
var
selectRect
=
null
;
var
min
=
function
(
a
,
b
)
{
var
min
=
function
(
a
,
b
)
{
...
@@ -80,7 +80,7 @@ KityMinder.registerModule( "MouseModule", function () {
...
@@ -80,7 +80,7 @@ KityMinder.registerModule( "MouseModule", function () {
this
.
select
(
clickNode
,
true
);
this
.
select
(
clickNode
,
true
);
}
else
{
}
else
{
this
.
removeAllSelectedNodes
();
this
.
removeAllSelectedNodes
();
this
.
SelectArea
.
selectStart
(
e
);
SelectArea
.
selectStart
(
e
);
}
}
},
},
'touchstart'
:
function
(
e
)
{
'touchstart'
:
function
(
e
)
{
...
@@ -113,10 +113,10 @@ KityMinder.registerModule( "MouseModule", function () {
...
@@ -113,10 +113,10 @@ KityMinder.registerModule( "MouseModule", function () {
}
}
},
},
'mousemove touchmove'
:
function
(
e
)
{
'mousemove touchmove'
:
function
(
e
)
{
this
.
SelectArea
.
selectMove
(
e
);
SelectArea
.
selectMove
(
e
);
},
},
'touchend mouseup'
:
function
(
e
)
{
'touchend mouseup'
:
function
(
e
)
{
this
.
SelectArea
.
selectEnd
(
e
);
SelectArea
.
selectEnd
(
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