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
fbfcca71
Commit
fbfcca71
authored
Jul 03, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:fex-team/kityminder into dev
parents
32317211
46595032
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
10 deletions
+29
-10
editor.js
src/module/editor.js
+11
-5
editor.selection.js
src/module/editor.selection.js
+6
-1
paste.js
src/module/paste.js
+1
-1
default.js
src/theme/default.js
+3
-1
fresh.js
src/theme/fresh.js
+5
-1
snow.js
src/theme/snow.js
+3
-1
No files found.
src/module/editor.js
View file @
fbfcca71
...
...
@@ -19,12 +19,16 @@ KityMinder.registerModule('TextEditModule', function() {
function
inputStatusReady
(
node
){
if
(
node
&&
km
.
isSingleSelect
()
&&
node
.
isSelected
())
{
var
color
=
node
.
getStyle
(
'text-selection-color'
);
//准备输入状态
var
textShape
=
node
.
getTextShape
();
sel
.
setHide
()
.
setStartOffset
(
0
)
.
setEndOffset
(
textShape
.
getContent
().
length
);
.
setEndOffset
(
textShape
.
getContent
().
length
)
.
setColor
(
color
);
receiver
.
setMinderNode
(
node
)
...
...
@@ -78,7 +82,7 @@ KityMinder.registerModule('TextEditModule', function() {
textShape
.
setStyle
(
'cursor'
,
'default'
);
if
(
this
.
isSingleSelect
()
&&
node
.
isSelected
())
{
sel
.
collapse
();
sel
.
setColor
(
node
.
getStyle
(
'text-selection-color'
));
receiver
.
setMinderNode
(
node
)
...
...
@@ -138,6 +142,8 @@ KityMinder.registerModule('TextEditModule', function() {
sel
.
collapse
();
sel
.
setColor
(
node
.
getStyle
(
'text-selection-color'
));
node
.
getTextShape
().
setStyle
(
'cursor'
,
'text'
);
receiver
.
updateSelection
();
...
...
@@ -234,9 +240,9 @@ KityMinder.registerModule('TextEditModule', function() {
km
.
setStatus
(
'normal'
);
receiver
.
clear
();
},
'blur'
:
function
()
{
receiver
.
clear
();
},
//
'blur': function() {
//
receiver.clear();
//
},
'import'
:
function
()
{
km
.
setStatus
(
'normal'
);
receiver
.
clear
();
...
...
src/module/editor.selection.js
View file @
fbfcca71
...
...
@@ -17,9 +17,13 @@ Minder.Selection = kity.createClass( 'Selection', {
this
.
_show
=
false
;
},
setColor
:
function
(
color
){
this
.
stroke
(
color
);
this
.
fill
(
color
);
},
collapse
:
function
(
toEnd
){
this
.
stroke
(
'rgb(27,171,255)'
,
1
);
//
this.stroke( 'rgb(27,171,255)', 1 );
this
.
setOpacity
(
1
);
this
.
width
=
1
;
this
.
collapsed
=
true
;
...
...
@@ -105,6 +109,7 @@ Minder.Selection = kity.createClass( 'Selection', {
clearInterval
(
this
.
timer
);
var
me
=
this
,
state
=
''
;
me
.
setStyle
(
'display'
,
''
);
me
.
_show
=
true
;
if
(
this
.
collapsed
){
...
...
src/module/paste.js
View file @
fbfcca71
...
...
@@ -53,7 +53,7 @@ KityMinder.registerModule( "pasteModule", function () {
if
(
node
){
km
.
fire
(
'saveScene'
);
for
(
var
i
=
0
,
ni
;
ni
=
_cacheNodes
[
i
++
];){
appendChildNode
(
node
,
ni
);
appendChildNode
(
node
,
ni
.
clone
()
);
}
km
.
layout
(
300
);
km
.
select
(
_selectedNodes
,
true
);
...
...
src/theme/default.js
View file @
fbfcca71
...
...
@@ -49,5 +49,7 @@ KityMinder.registerTheme('classic', {
'order-hint-area-color'
:
'rgba(0, 255, 0, .5)'
,
'order-hint-path-color'
:
'#0f0'
,
'order-hint-path-width'
:
1
'order-hint-path-width'
:
1
,
'text-selection-color'
:
'rgb(27,171,255)'
});
\ No newline at end of file
src/theme/fresh.js
View file @
fbfcca71
...
...
@@ -4,6 +4,7 @@
}
function
generate
(
h
)
{
var
textSelectionColor
=
kity
.
Color
.
parse
(
'rgb(27,171,255)'
);
return
{
'background'
:
'#fbfbfb'
,
...
...
@@ -15,6 +16,7 @@
'root-margin'
:
[
30
,
100
],
'root-radius'
:
5
,
'root-space'
:
10
,
'root-text-selection-color'
:
textSelectionColor
.
set
(
'h'
,
h
).
set
(
'l'
,
20
),
'main-color'
:
'black'
,
...
...
@@ -52,7 +54,9 @@
'order-hint-area-color'
:
hsl
(
h
,
100
,
95
).
set
(
'a'
,
0.5
),
'order-hint-path-color'
:
hsl
(
h
,
100
,
25
),
'order-hint-path-width'
:
1
'order-hint-path-width'
:
1
,
'text-selection-color'
:
textSelectionColor
.
set
(
'h'
,
h
)
};
}
...
...
src/theme/snow.js
View file @
fbfcca71
...
...
@@ -47,5 +47,7 @@ KityMinder.registerTheme('snow', {
'order-hint-area-color'
:
'rgba(0, 255, 0, .5)'
,
'order-hint-path-color'
:
'#0f0'
,
'order-hint-path-width'
:
1
'order-hint-path-width'
:
1
,
'text-selection-color'
:
'rgb(27,171,255)'
});
\ No newline at end of file
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