Commit e41fbf48 authored by techird's avatar techird

bug fix

parent e9ddf87a
...@@ -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();
} }
}, },
......
...@@ -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;
......
...@@ -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 含有 &nbsp; 符号导出报错 Entity 'nbsp' not defined // svg 含有 &nbsp; 符号导出报错 Entity 'nbsp' not defined
svgXml = svgXml.replace(/&nbsp;/g, '&#xa0;'); svgXml = svgXml.replace(/&nbsp;/g, '&#xa0;');
......
.kmui-modal { .kmui-modal {
position: fixed; position: fixed;
top: 100px; top: 140px;
right:10px; right:10px;
background-color: #fff; background-color: #fff;
outline: 0; outline: 0;
......
...@@ -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;
......
...@@ -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: white; color: #eee;
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: white; color: #eee;
} }
#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)}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment