Commit 3ba1ebcb authored by techird's avatar techird

grunt

parent 02cb6e78
......@@ -7,26 +7,26 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<script src="lib/jquery-2.1.0.min.js?_=1399630582836" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399630582836" charset="utf-8"></script>
<script src="lib/jquery-2.1.0.min.js?_=1399630846430" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399630846430" charset="utf-8"></script>
<script type="text/javascript">
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } );
</script>
<script src="lib/kitygraph.all.min.js?_=1399630582836" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399630582836" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399630582836" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399630582836" charset="utf-8"></script>
<script src="lib/kitygraph.all.min.js?_=1399630846430" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399630846430" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399630846430" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399630846430" charset="utf-8"></script>
<script src="lib/zip.js?_=1399630582836" charset="utf-8"></script>
<script src="lib/zip.js?_=1399630846430" charset="utf-8"></script>
<script>
zip.inflateJSPath = 'lib/inflate.js';
</script>
<script src="lib/jquery.xml2json.js?_=1399630582836" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399630582836" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399630582836" charset="utf-8"></script>
<script src="social/social.js?_=1399630582836" charset="utf-8"></script>
<script src="lib/jquery.xml2json.js?_=1399630846430" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399630846430" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399630846430" charset="utf-8"></script>
<script src="social/social.js?_=1399630846430" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
......
......@@ -4846,7 +4846,8 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
var svg = require("graphic/svg");
var offsetHash = {};
function getTextBoundOffset(text) {
var font = window.getComputedStyle(text.node).font;
var style = window.getComputedStyle(text.node);
var font = [ style.fontFamily, style.fontSize, style.fontStretch, style.fontStyle, style.fontVariant, style.fontWeight ].join("-");
if (offsetHash[font]) {
return offsetHash[font];
}
......@@ -4866,9 +4867,6 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
if (content !== undefined) {
this.setContent(content);
}
this.whenPaperReady(function() {
this.setVerticalAlign(this.verticalAlign);
});
},
setX: function(x) {
this.node.setAttribute("x", x);
......@@ -4900,24 +4898,26 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
},
// top/bottom/middle/baseline
setVerticalAlign: function(align) {
var dy;
switch (align) {
case "top":
dy = getTextBoundOffset(this).top;
break;
this.whenPaperReady(function() {
var dy;
switch (align) {
case "top":
dy = getTextBoundOffset(this).top;
break;
case "bottom":
dy = getTextBoundOffset(this).bottom;
break;
case "bottom":
dy = getTextBoundOffset(this).bottom;
break;
case "middle":
dy = getTextBoundOffset(this).middle;
break;
case "middle":
dy = getTextBoundOffset(this).middle;
break;
default:
dy = 0;
}
this.node.setAttribute("dy", dy);
default:
dy = 0;
}
this.node.setAttribute("dy", dy);
});
this.verticalAlign = align;
return this;
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Subproject commit d4e00b314db4116a92583114bcb67ff9a3c4d48d
Subproject commit 256dce28fb1e574b18f0dd084f7503cbc25e2a80
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