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
e41fbf48
Commit
e41fbf48
authored
Jul 02, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
e9ddf87a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
7 deletions
+36
-7
zoom.js
src/module/zoom.js
+4
-0
png.js
src/protocal/png.js
+10
-1
svg.js
src/protocal/svg.js
+11
-0
dialog.css
themes/default/css/dialog.css
+1
-1
dropmenu.css
themes/default/css/dropmenu.css
+1
-1
kityminder.css
themes/default/css/kityminder.css
+9
-4
No files found.
src/module/zoom.js
View file @
e41fbf48
...
@@ -90,9 +90,13 @@ KityMinder.registerModule('Zoom', function() {
...
@@ -90,9 +90,13 @@ KityMinder.registerModule('Zoom', function() {
var
keyCode
=
originEvent
.
keyCode
||
originEvent
.
which
;
var
keyCode
=
originEvent
.
keyCode
||
originEvent
.
which
;
if
(
keymap
[
'='
]
==
keyCode
)
{
if
(
keymap
[
'='
]
==
keyCode
)
{
me
.
execCommand
(
'zoom-in'
);
me
.
execCommand
(
'zoom-in'
);
e
.
stopPropagation
();
e
.
preventDefault
();
}
}
if
(
keymap
[
'-'
]
==
keyCode
)
{
if
(
keymap
[
'-'
]
==
keyCode
)
{
me
.
execCommand
(
'zoom-out'
);
me
.
execCommand
(
'zoom-out'
);
e
.
stopPropagation
();
e
.
preventDefault
();
}
}
},
},
...
...
src/protocal/png.js
View file @
e41fbf48
...
@@ -10,6 +10,13 @@ if (!kity.Browser.ie) {
...
@@ -10,6 +10,13 @@ if (!kity.Browser.ie) {
fileDescription
:
'PNG 图片'
,
fileDescription
:
'PNG 图片'
,
fileExtension
:
'.png'
,
fileExtension
:
'.png'
,
encode
:
function
(
json
,
km
)
{
encode
:
function
(
json
,
km
)
{
var
paper
=
km
.
getPaper
();
var
viewport
=
paper
.
getViewPort
();
var
originZoom
=
viewport
.
zoom
;
viewport
.
zoom
=
1
;
paper
.
setViewPort
(
viewport
);
var
domContainer
=
km
.
getPaper
().
container
,
var
domContainer
=
km
.
getPaper
().
container
,
svgXml
,
svgXml
,
$svg
,
$svg
,
...
@@ -34,6 +41,8 @@ if (!kity.Browser.ie) {
...
@@ -34,6 +41,8 @@ if (!kity.Browser.ie) {
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
viewport
.
zoom
=
originZoom
;
paper
.
setViewPort
(
viewport
);
$svg
=
$
(
svgXml
).
filter
(
'svg'
);
$svg
=
$
(
svgXml
).
filter
(
'svg'
);
$svg
.
attr
({
$svg
.
attr
({
...
@@ -49,7 +58,7 @@ if (!kity.Browser.ie) {
...
@@ -49,7 +58,7 @@ if (!kity.Browser.ie) {
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
);
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
);
blob
=
new
Blob
([
svgXml
],
{
blob
=
new
Blob
([
svgXml
],
{
type
:
"image/svg+xml;charset=utf-8"
type
:
'image/svg+xml;charset=utf-8'
});
});
DomURL
=
window
.
URL
||
window
.
webkitURL
||
window
;
DomURL
=
window
.
URL
||
window
.
webkitURL
||
window
;
...
...
src/protocal/svg.js
View file @
e41fbf48
...
@@ -6,6 +6,13 @@ if (!kity.Browser.ie) {
...
@@ -6,6 +6,13 @@ if (!kity.Browser.ie) {
fileExtension
:
'.svg'
,
fileExtension
:
'.svg'
,
mineType
:
'image/svg+xml'
,
mineType
:
'image/svg+xml'
,
encode
:
function
(
json
,
km
)
{
encode
:
function
(
json
,
km
)
{
var
paper
=
km
.
getPaper
();
var
viewport
=
paper
.
getViewPort
();
var
originZoom
=
viewport
.
zoom
;
viewport
.
zoom
=
1
;
paper
.
setViewPort
(
viewport
);
var
domContainer
=
km
.
getPaper
().
container
,
var
domContainer
=
km
.
getPaper
().
container
,
svgXml
,
svgXml
,
$svg
,
$svg
,
...
@@ -34,6 +41,10 @@ if (!kity.Browser.ie) {
...
@@ -34,6 +41,10 @@ if (!kity.Browser.ie) {
// need a xml with width and height
// need a xml with width and height
svgXml
=
$
(
'<div></div>'
).
append
(
$svg
).
html
();
svgXml
=
$
(
'<div></div>'
).
append
(
$svg
).
html
();
svgXml
=
$
(
'<div></div>'
).
append
(
$svg
).
html
();
viewport
.
zoom
=
originZoom
;
paper
.
setViewPort
(
viewport
);
// svg 含有 符号导出报错 Entity 'nbsp' not defined
// svg 含有 符号导出报错 Entity 'nbsp' not defined
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
);
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
);
...
...
themes/default/css/dialog.css
View file @
e41fbf48
.kmui-modal
{
.kmui-modal
{
position
:
fixed
;
position
:
fixed
;
top
:
1
0
0px
;
top
:
1
4
0px
;
right
:
10px
;
right
:
10px
;
background-color
:
#fff
;
background-color
:
#fff
;
outline
:
0
;
outline
:
0
;
...
...
themes/default/css/dropmenu.css
View file @
e41fbf48
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
background
:
-webkit-linear-gradient
(
top
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
);
/* Chrome10+,Safari5.1+ */
background
:
-webkit-linear-gradient
(
top
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
);
/* Chrome10+,Safari5.1+ */
background
:
-o-linear-gradient
(
top
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
);
/* Opera 11.10+ */
background
:
-o-linear-gradient
(
top
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
);
/* Opera 11.10+ */
background
:
-ms-linear-gradient
(
top
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
);
/* IE10+ */
background
:
-ms-linear-gradient
(
top
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
);
/* IE10+ */
background
:
linear-gradient
(
to
bottom
,
#0099f2
0%
,
#4096ee
0%
,
#0076dd
100%
)
;
/* W3C */
background
:
#5a6378
;
/* W3C */
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#0099f2'
,
endColorstr
=
'#0076dd'
,
GradientType
=
0
);
/* IE6-8 */
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#0099f2'
,
endColorstr
=
'#0076dd'
,
GradientType
=
0
);
/* IE6-8 */
color
:
white
;
color
:
white
;
...
...
themes/default/css/kityminder.css
View file @
e41fbf48
...
@@ -191,8 +191,12 @@ button#share-btn:hover {
...
@@ -191,8 +191,12 @@ button#share-btn:hover {
.km-minderNode
{
.km-minderNode
{
cursor
:
default
;
cursor
:
default
;
}
}
.kmui-container
{
.kmui-container
,
.kmui-editor-body
{
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
}
}
.kmui-container
.kmui-toolbar
{
.kmui-container
.kmui-toolbar
{
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -226,7 +230,7 @@ svg, body {
...
@@ -226,7 +230,7 @@ svg, body {
height
:
50px
;
height
:
50px
;
line-height
:
50px
;
line-height
:
50px
;
background
:
#5d697a
;
background
:
#5d697a
;
color
:
whit
e
;
color
:
#ee
e
;
font-family
:
Arial
;
font-family
:
Arial
;
font-size
:
13px
;
font-size
:
13px
;
font-weight
:
normal
;
font-weight
:
normal
;
...
@@ -235,9 +239,10 @@ svg, body {
...
@@ -235,9 +239,10 @@ svg, body {
padding
:
0
15px
;
padding
:
0
15px
;
border-bottom
:
5px
solid
#393F4F
;
border-bottom
:
5px
solid
#393F4F
;
padding-left
:
5px
;
padding-left
:
5px
;
-webkit-font-smoothing
:
antialiased
;
}
}
#about
a
{
#about
a
{
color
:
whit
e
;
color
:
#ee
e
;
}
}
#km-version
.new-version
{
position
:
relative
;
padding-right
:
30px
}
#km-version
.new-version
{
position
:
relative
;
padding-right
:
30px
}
#km-version
.new-version
:after
{
content
:
'NEW'
;
color
:
#ff0
;
position
:
absolute
;
top
:
-10px
;
right
:
-5px
;
display
:
block
;
background
:
#f00
;
padding
:
0
5px
;
border-radius
:
4px
;
text-shadow
:
none
;
box-shadow
:
-1px
1px
3px
rgba
(
0
,
0
,
0
,
0.3
);
-webkit-transform
:
scale
(
.6
);
-moz-transform
:
scale
(
.6
);
-ms-transform
:
scale
(
.6
);
transform
:
scale
(
.6
)}
#km-version
.new-version
:after
{
content
:
'NEW'
;
color
:
#ff0
;
position
:
absolute
;
top
:
-10px
;
right
:
-5px
;
display
:
block
;
background
:
#f00
;
padding
:
0
5px
;
border-radius
:
4px
;
text-shadow
:
none
;
box-shadow
:
-1px
1px
3px
rgba
(
0
,
0
,
0
,
0.3
);
-webkit-transform
:
scale
(
.6
);
-moz-transform
:
scale
(
.6
);
-ms-transform
:
scale
(
.6
);
transform
:
scale
(
.6
)}
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