Commit e41fbf48 authored by techird's avatar techird

bug fix

parent e9ddf87a
......@@ -90,9 +90,13 @@ KityMinder.registerModule('Zoom', function() {
var keyCode = originEvent.keyCode || originEvent.which;
if (keymap['='] == keyCode) {
me.execCommand('zoom-in');
e.stopPropagation();
e.preventDefault();
}
if (keymap['-'] == keyCode) {
me.execCommand('zoom-out');
e.stopPropagation();
e.preventDefault();
}
},
......
......@@ -10,6 +10,13 @@ if (!kity.Browser.ie) {
fileDescription: 'PNG 图片',
fileExtension: '.png',
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,
svgXml,
$svg,
......@@ -34,6 +41,8 @@ if (!kity.Browser.ie) {
svgXml = km.getPaper().container.innerHTML;
renderContainer.translate(renderBox.x, renderBox.y);
viewport.zoom = originZoom;
paper.setViewPort(viewport);
$svg = $(svgXml).filter('svg');
$svg.attr({
......@@ -49,7 +58,7 @@ if (!kity.Browser.ie) {
svgXml = svgXml.replace(/ /g, ' ');
blob = new Blob([svgXml], {
type: "image/svg+xml;charset=utf-8"
type: 'image/svg+xml;charset=utf-8'
});
DomURL = window.URL || window.webkitURL || window;
......
......@@ -6,6 +6,13 @@ if (!kity.Browser.ie) {
fileExtension: '.svg',
mineType: 'image/svg+xml',
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,
svgXml,
$svg,
......@@ -34,6 +41,10 @@ if (!kity.Browser.ie) {
// need a xml with width and height
svgXml = $('<div></div>').append($svg).html();
svgXml = $('<div></div>').append($svg).html();
viewport.zoom = originZoom;
paper.setViewPort(viewport);
// svg 含有 &nbsp; 符号导出报错 Entity 'nbsp' not defined
svgXml = svgXml.replace(/&nbsp;/g, '&#xa0;');
......
.kmui-modal {
position: fixed;
top: 100px;
top: 140px;
right:10px;
background-color: #fff;
outline: 0;
......
......@@ -51,7 +51,7 @@
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: -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 */
color: white;
......
......@@ -191,8 +191,12 @@ button#share-btn:hover {
.km-minderNode{
cursor:default;
}
.kmui-container {
height: 100%;
.kmui-container, .kmui-editor-body {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.kmui-container .kmui-toolbar{
background-color: #fff;
......@@ -226,7 +230,7 @@ svg, body {
height: 50px;
line-height: 50px;
background: #5d697a;
color: white;
color: #eee;
font-family:Arial;
font-size:13px;
font-weight:normal;
......@@ -235,9 +239,10 @@ svg, body {
padding: 0 15px;
border-bottom: 5px solid #393F4F;
padding-left: 5px;
-webkit-font-smoothing: antialiased;
}
#about a {
color: white;
color: #eee;
}
#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)}
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