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
1cf019b7
Commit
1cf019b7
authored
Feb 07, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
532153c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
dev.html
demo/dev.html
+6
-0
minder.event.js
src/core/minder.event.js
+3
-3
font.js
src/module/font.js
+2
-2
No files found.
demo/dev.html
View file @
1cf019b7
...
...
@@ -2,8 +2,10 @@
<html>
<head>
<script
src=
"jquery-2.1.0.min.js"
></script>
<script
src=
"kity.all.js"
></script>
<script
src=
"../dist/dev.php"
></script>
<link
href=
"import.css"
/>
<style>
.km_receiver
{
width
:
300px
;
height
:
300px
;
...
...
@@ -27,6 +29,10 @@
var
val
=
e
.
target
.
value
;
minder
.
execCommand
(
"switchlayout"
,
val
);
},
false
);
minder
.
select
(
minder
.
getRoot
());
var
node
=
new
KM
.
MinderNode
(
'test'
);
node
.
setData
(
'fontcolor'
,
'red'
);
minder
.
execCommand
(
'appendChildNode'
,
node
);
// var b = new kity.Bezier([new kity.BezierPoint(0,0).setVertex(100,100),new kity.BezierPoint(100,0).setVertex(100,100)]);
// minder.getRenderContainer().addShape(b.stroke("white"));
</script>
...
...
src/core/minder.event.js
View file @
1cf019b7
...
...
@@ -55,7 +55,7 @@ kity.extendClass( Minder, {
callbacks
.
push
(
callback
);
},
_fire
:
function
(
e
)
{
var
callbacks
=
this
.
_eventCallbacks
[
e
.
type
];
var
callbacks
=
this
.
_eventCallbacks
[
e
.
type
.
toLowerCase
()
];
if
(
!
callbacks
)
{
return
false
;
}
...
...
@@ -70,7 +70,7 @@ kity.extendClass( Minder, {
on
:
function
(
name
,
callback
)
{
var
types
=
name
.
split
(
' '
);
for
(
var
i
=
0
;
i
<
types
.
length
;
i
++
)
{
this
.
_listen
(
types
[
i
],
callback
);
this
.
_listen
(
types
[
i
]
.
toLowerCase
()
,
callback
);
}
return
this
;
},
...
...
@@ -78,7 +78,7 @@ kity.extendClass( Minder, {
var
types
=
name
.
split
(
' '
);
var
i
,
j
,
callbacks
,
removeIndex
;
for
(
i
=
0
;
i
<
types
.
length
;
i
++
)
{
callbacks
=
this
.
_eventCallbacks
[
types
[
i
]
];
callbacks
=
this
.
_eventCallbacks
[
types
[
i
]
.
toLowerCase
()
];
if
(
callbacks
)
{
removeIndex
=
null
;
for
(
j
=
0
;
j
<
callbacks
.
length
;
j
++
)
{
...
...
src/module/font.js
View file @
1cf019b7
...
...
@@ -29,13 +29,13 @@ KityMinder.registerModule( "fontmodule", function () {
},
"events"
:
{
"before
rendern
ode"
:
function
(
e
)
{
"before
RenderN
ode"
:
function
(
e
)
{
var
val
;
if
(
val
=
e
.
node
.
getData
(
'fontfamily'
)){
e
.
node
.
getTextShape
().
setAttr
(
'font-family'
,
val
);
}
if
(
val
=
e
.
node
.
getData
(
'fontcolor'
)){
e
.
node
.
getTextShape
().
fill
(
color
);
e
.
node
.
getTextShape
().
fill
(
val
);
}
}
}
...
...
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