Commit 3ba1ebcb authored by techird's avatar techird

grunt

parent 02cb6e78
...@@ -7,26 +7,26 @@ ...@@ -7,26 +7,26 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"> <meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<script src="lib/jquery-2.1.0.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?_=1399630582836" charset="utf-8"></script> <script src="lib/ZeroClipboard.min.js?_=1399630846430" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } ); ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } );
</script> </script>
<script src="lib/kitygraph.all.min.js?_=1399630582836" charset="utf-8"></script> <script src="lib/kitygraph.all.min.js?_=1399630846430" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399630582836" charset="utf-8"></script> <script src="kityminder.all.min.js?_=1399630846430" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399630582836" charset="utf-8"></script> <script src="kityminder.config.js?_=1399630846430" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399630582836" 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> <script>
zip.inflateJSPath = 'lib/inflate.js'; zip.inflateJSPath = 'lib/inflate.js';
</script> </script>
<script src="lib/jquery.xml2json.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?_=1399630582836" 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?_=1399630582836" charset="utf-8"></script> <script src="social/draftmanager.js?_=1399630846430" charset="utf-8"></script>
<script src="social/social.js?_=1399630582836" charset="utf-8"></script> <script src="social/social.js?_=1399630846430" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet"> <link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/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", " ...@@ -4846,7 +4846,8 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
var svg = require("graphic/svg"); var svg = require("graphic/svg");
var offsetHash = {}; var offsetHash = {};
function getTextBoundOffset(text) { 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]) { if (offsetHash[font]) {
return offsetHash[font]; return offsetHash[font];
} }
...@@ -4866,9 +4867,6 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", " ...@@ -4866,9 +4867,6 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
if (content !== undefined) { if (content !== undefined) {
this.setContent(content); this.setContent(content);
} }
this.whenPaperReady(function() {
this.setVerticalAlign(this.verticalAlign);
});
}, },
setX: function(x) { setX: function(x) {
this.node.setAttribute("x", x); this.node.setAttribute("x", x);
...@@ -4900,6 +4898,7 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", " ...@@ -4900,6 +4898,7 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
}, },
// top/bottom/middle/baseline // top/bottom/middle/baseline
setVerticalAlign: function(align) { setVerticalAlign: function(align) {
this.whenPaperReady(function() {
var dy; var dy;
switch (align) { switch (align) {
case "top": case "top":
...@@ -4918,6 +4917,7 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", " ...@@ -4918,6 +4917,7 @@ define("graphic/text", [ "graphic/textcontent", "graphic/shape", "core/class", "
dy = 0; dy = 0;
} }
this.node.setAttribute("dy", dy); this.node.setAttribute("dy", dy);
});
this.verticalAlign = align; this.verticalAlign = align;
return this; 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