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
e08f3cb0
Commit
e08f3cb0
authored
May 06, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added init
parent
62e12516
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
15 deletions
+29
-15
history.js
src/module/history.js
+16
-15
layout.default.js
src/module/layout.default.js
+4
-0
layout.js
src/module/layout.js
+9
-0
No files found.
src/module/history.js
View file @
e08f3cb0
...
@@ -4,23 +4,24 @@ KityMinder.registerModule( "HistoryModule", function () {
...
@@ -4,23 +4,24 @@ KityMinder.registerModule( "HistoryModule", function () {
var
Scene
=
kity
.
createClass
(
'Scene'
,
{
var
Scene
=
kity
.
createClass
(
'Scene'
,
{
constructor
:
function
(
root
)
{
constructor
:
function
(
root
)
{
this
.
data
=
root
.
clone
(
function
(
node
,
cloneNode
)
{
this
.
data
=
root
.
clone
(
function
(
node
,
cloneNode
)
{
km
.
fire
(
'cloneNode'
,
{
km
.
fire
(
'cloneNode'
,
{
'targetNode'
:
cloneNode
,
'targetNode'
:
cloneNode
,
'sourceNode'
:
node
'sourceNode'
:
node
})
}
)
});
}
);
},
},
getData
:
function
()
{
getData
:
function
()
{
return
this
.
data
;
return
this
.
data
;
},
},
cloneData
:
function
()
{
cloneData
:
function
()
{
var
fn
=
function
(
node
,
cloneNode
){
var
fn
=
function
(
node
,
cloneNode
)
{
km
.
fire
(
'cloneNode'
,{
km
.
fire
(
'cloneNode'
,
{
'targetNode'
:
cloneNode
,
'targetNode'
:
cloneNode
,
'sourceNode'
:
node
'sourceNode'
:
node
})};
}
)
return
this
.
getData
().
clone
(
fn
);
};
return
this
.
getData
().
clone
(
fn
);
},
},
equals
:
function
(
scene
)
{
equals
:
function
(
scene
)
{
return
this
.
getData
().
equals
(
scene
.
getData
()
)
return
this
.
getData
().
equals
(
scene
.
getData
()
)
...
@@ -165,10 +166,10 @@ KityMinder.registerModule( "HistoryModule", function () {
...
@@ -165,10 +166,10 @@ KityMinder.registerModule( "HistoryModule", function () {
"saveScene"
:
function
(
e
)
{
"saveScene"
:
function
(
e
)
{
this
.
historyManager
.
saveScene
();
this
.
historyManager
.
saveScene
();
},
},
'renderNode'
:
function
(
e
)
{
'renderNode'
:
function
(
e
)
{
var
node
=
e
.
node
;
var
node
=
e
.
node
;
if
(
node
.
isSelected
())
{
if
(
node
.
isSelected
()
)
{
this
.
select
(
node
)
this
.
select
(
node
)
}
}
},
},
"keydown"
:
function
(
e
)
{
"keydown"
:
function
(
e
)
{
...
...
src/module/layout.default.js
View file @
e08f3cb0
...
@@ -510,6 +510,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -510,6 +510,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
},
},
initStyle
:
function
(
expandall
)
{
initStyle
:
function
(
expandall
)
{
var
_root
=
minder
.
getRoot
();
var
_root
=
minder
.
getRoot
();
debugger
;
var
historyPoint
=
_root
.
getPoint
();
var
historyPoint
=
_root
.
getPoint
();
if
(
historyPoint
)
historyPoint
=
JSON
.
parse
(
JSON
.
stringify
(
historyPoint
)
);
if
(
historyPoint
)
historyPoint
=
JSON
.
parse
(
JSON
.
stringify
(
historyPoint
)
);
minder
.
handelNodeInsert
(
_root
);
minder
.
handelNodeInsert
(
_root
);
...
@@ -589,6 +590,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -589,6 +590,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
if
(
Layout
)
{
if
(
Layout
)
{
oldExpand
=
Layout
.
expand
;
oldExpand
=
Layout
.
expand
;
}
}
if
(
oldExpand
)
{
alert
(
'aru'
);
}
node
.
clearLayout
();
node
.
clearLayout
();
node
.
getContRc
().
clear
();
node
.
getContRc
().
clear
();
Layout
=
node
.
getLayout
();
Layout
=
node
.
getLayout
();
...
...
src/module/layout.js
View file @
e08f3cb0
...
@@ -247,6 +247,15 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -247,6 +247,15 @@ KityMinder.registerModule( "LayoutModule", function () {
},
},
"import"
:
function
(
e
)
{
"import"
:
function
(
e
)
{
this
.
initStyle
();
this
.
initStyle
();
},
"cloneNode"
:
function
(
e
)
{
var
target
=
e
.
targetNode
;
var
source
=
e
.
sourceNode
;
target
.
clearLayout
();
var
sourceLayout
=
source
.
getLayout
();
var
targetLayout
=
target
.
getLayout
();
targetLayout
.
expand
=
sourceLayout
.
expand
;
console
.
log
(
targetLayout
);
}
}
},
},
'contextmenu'
:
[
{
'contextmenu'
:
[
{
...
...
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