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
e51f17ac
Commit
e51f17ac
authored
Apr 18, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:fex-team/kityminder into dev
parents
d1cb7060
e0c85ec1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
index.html
dist/index.html
+1
-1
saveto.js
src/adapter/saveto.js
+5
-3
png.js
src/protocal/png.js
+2
-2
No files found.
dist/index.html
View file @
e51f17ac
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"keywords"
content=
"思维导图,脑图,minder,mind,kity"
>
<meta
name=
"description"
content=
"在线思维导图工具"
>
<meta
name=
"description"
content=
"在线思维导图工具"
>
<script
src=
"../lib/jquery-2.1.0.min.js"
charset=
"utf-8"
></script>
<script
src=
"../lib/ZeroClipboard.min.js"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
>
...
...
src/adapter/saveto.js
View file @
e51f17ac
...
...
@@ -11,7 +11,7 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
value
:
[],
autowidthitem
:
[],
enabledRecord
:
false
,
enabledSelected
:
false
enabledSelected
:
false
},
$combox
=
null
,
comboboxWidget
=
null
;
...
...
@@ -70,9 +70,12 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
if
(
typeof
(
data
)
==
'string'
)
{
var
url
=
'data:text/plain; utf-8,'
+
encodeURIComponent
(
data
);
if
(
ie_ver
()
>
0
)
{
alert
(
'11111111'
);
console
.
log
(
p
.
fileExtension
);
if
(
p
.
fileExtension
===
'.km'
)
{
console
.
log
(
"KM"
);
doSave
(
'application/x-javascript'
,
data
,
me
.
getMinderTitle
()
);
}
else
(
p
.
fileExtension
===
'.svg'
)
{
doSave
(
'image/svg+xml'
,
data
,
filename
);
}
else
{
doSave
(
'text/html'
,
data
,
filename
);
}
...
...
@@ -81,7 +84,6 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
}
}
else
if
(
data
&&
data
.
then
)
{
data
.
then
(
function
(
url
)
{
console
.
log
(
url
);
if
(
ie_ver
()
>
0
)
{
//doSave( 'application/base64', url.replace( 'image/octet-stream,', '' ), filename );
}
else
{
...
...
src/protocal/png.js
View file @
e51f17ac
...
...
@@ -2,6 +2,7 @@ KityMinder.registerProtocal( "png", function () {
function
loadImage
(
url
,
callback
)
{
var
image
=
new
Image
();
image
.
onload
=
callback
;
console
.
log
(
url
);
image
.
src
=
url
;
}
...
...
@@ -27,7 +28,7 @@ KityMinder.registerProtocal( "png", function () {
ctx
=
canvas
.
getContext
(
'2d'
),
blob
,
DomURL
,
url
,
img
,
finishCallback
;
bgUrl
=
bgUrl
.
replace
(
/"/g
,
''
);
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
...
...
@@ -73,7 +74,6 @@ KityMinder.registerProtocal( "png", function () {
var
url
=
canvas
.
toDataURL
(
'png'
);
return
url
.
replace
(
'image/png'
,
'image/octet-stream'
);
}
loadImage
(
url
,
function
()
{
var
svgImage
=
this
;
loadImage
(
bgUrl
,
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