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
b78aaca2
Commit
b78aaca2
authored
Feb 07, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://github.com/kitygraph/kityminder
into dev
parents
a18615c0
95d27ab5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
24 deletions
+37
-24
jquery-2.1.0.min.js
demo/jquery-2.1.0.min.js
+4
-0
kityminder.js
src/core/kityminder.js
+33
-23
minder.js
src/core/minder.js
+0
-1
No files found.
demo/jquery-2.1.0.min.js
0 → 100644
View file @
b78aaca2
This diff is collapsed.
Click to expand it.
src/core/kityminder.js
View file @
b78aaca2
var
KityMinder
=
window
.
KM
=
window
.
KityMinder
=
{};
var
KityMinder
=
window
.
KM
=
window
.
KityMinder
=
function
(){
var
instanceMap
=
{},
instanceId
=
0
;
return
{
version
:
'1.0.0'
,
createMinder
:
function
(
renderTarget
,
options
)
{
options
=
options
||
{};
options
.
renderTo
=
Utils
.
isString
(
renderTarget
)
?
document
.
getElementById
(
renderTarget
)
:
renderTarget
;
var
minder
=
new
Minder
(
options
);
this
.
addMinder
(
options
.
renderTo
,
minder
);
return
minder
;
},
addMinder
:
function
(
target
,
minder
)
{
var
id
;
if
(
typeof
(
target
)
===
'string'
)
{
id
=
target
;
}
else
{
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
instanceMap
[
id
]
=
minder
;
},
getMinder
:
function
(
target
,
options
){
var
id
;
if
(
typeof
(
target
)
===
'string'
)
{
id
=
target
;
}
else
{
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
return
instanceMap
[
id
]
||
this
.
createMinder
(
target
,
options
);
}
}
}();
KityMinder
.
version
=
'1.0.0.0'
;
KityMinder
.
createMinder
=
function
(
renderTarget
,
options
)
{
options
=
options
||
{};
options
.
renderTo
=
Utils
.
isString
(
renderTarget
)
?
document
.
getElementById
(
renderTarget
)
:
renderTarget
;
return
new
Minder
(
options
);
};
var
instanceMap
=
{},
instanceId
=
0
;
KityMinder
.
addMinderInstance
=
function
(
target
,
minder
)
{
var
id
;
if
(
typeof
(
target
)
===
'string'
)
{
id
=
target
;
}
else
{
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
instanceMap
[
id
]
=
minder
;
};
KityMinder
.
getMinder
=
function
(
id
)
{
return
instanceMap
[
id
]
||
this
.
createMinder
(
id
);
};
\ No newline at end of file
src/core/minder.js
View file @
b78aaca2
...
...
@@ -47,7 +47,6 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
renderTo
:
function
(
target
)
{
this
.
_paper
.
renderTo
(
this
.
_renderTarget
=
target
);
this
.
_bindEvents
();
KityMinder
.
addMinderInstance
(
target
,
this
);
},
getRenderContainer
:
function
()
{
...
...
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