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
Show 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
=
KityMinder
.
version
=
'1.0.0.0'
;
window
.
KityMinder
=
function
(){
var
instanceMap
=
{},
instanceId
=
0
;
KityMinder
.
createMinder
=
function
(
renderTarget
,
options
)
{
return
{
version
:
'1.0.0'
,
createMinder
:
function
(
renderTarget
,
options
)
{
options
=
options
||
{};
options
=
options
||
{};
options
.
renderTo
=
Utils
.
isString
(
renderTarget
)
?
document
.
getElementById
(
renderTarget
)
:
renderTarget
;
options
.
renderTo
=
Utils
.
isString
(
renderTarget
)
?
document
.
getElementById
(
renderTarget
)
:
renderTarget
;
return
new
Minder
(
options
);
var
minder
=
new
Minder
(
options
);
}
;
this
.
addMinder
(
options
.
renderTo
,
minder
)
;
return
minder
;
var
instanceMap
=
{},
instanceId
=
0
;
},
KityMinder
.
addMinderInstance
=
function
(
target
,
minder
)
{
addMinder
:
function
(
target
,
minder
)
{
var
id
;
var
id
;
if
(
typeof
(
target
)
===
'string'
)
{
if
(
typeof
(
target
)
===
'string'
)
{
id
=
target
;
id
=
target
;
...
@@ -17,8 +19,16 @@ KityMinder.addMinderInstance = function ( target, minder ) {
...
@@ -17,8 +19,16 @@ KityMinder.addMinderInstance = function ( target, minder ) {
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
}
instanceMap
[
id
]
=
minder
;
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
.
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", {
...
@@ -47,7 +47,6 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
renderTo
:
function
(
target
)
{
renderTo
:
function
(
target
)
{
this
.
_paper
.
renderTo
(
this
.
_renderTarget
=
target
);
this
.
_paper
.
renderTo
(
this
.
_renderTarget
=
target
);
this
.
_bindEvents
();
this
.
_bindEvents
();
KityMinder
.
addMinderInstance
(
target
,
this
);
},
},
getRenderContainer
:
function
()
{
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