Commit aa56e354 authored by Akikonata's avatar Akikonata

grunt

parent 569b6c2b
...@@ -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?_=1399615757955" charset="utf-8"></script> <script src="lib/jquery-2.1.0.min.js?_=1399623775833" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399615757955" charset="utf-8"></script> <script src="lib/ZeroClipboard.min.js?_=1399623775833" 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?_=1399615757955" charset="utf-8"></script> <script src="lib/kitygraph.all.min.js?_=1399623775833" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399615757955" charset="utf-8"></script> <script src="kityminder.all.min.js?_=1399623775833" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399615757955" charset="utf-8"></script> <script src="kityminder.config.js?_=1399623775833" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399615757955" charset="utf-8"></script> <script src="lang/zh-cn/zh-cn.js?_=1399623775833" charset="utf-8"></script>
<script src="lib/zip.js?_=1399615757955" charset="utf-8"></script> <script src="lib/zip.js?_=1399623775833" charset="utf-8"></script>
<script> <script>
zip.inflateJSPath = 'lib/inflate.js'; zip.inflateJSPath = 'lib/inflate.js';
</script> </script>
<script src="lib/jquery.xml2json.js?_=1399615757955" charset="utf-8"></script> <script src="lib/jquery.xml2json.js?_=1399623775833" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399615757955" charset="utf-8"></script> <script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399623775833" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399615757955" charset="utf-8"></script> <script src="social/draftmanager.js?_=1399623775833" charset="utf-8"></script>
<script src="social/social.js?_=1399615757955" charset="utf-8"></script> <script src="social/social.js?_=1399623775833" 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" />
......
...@@ -2915,7 +2915,7 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -2915,7 +2915,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
} }
for ( var i = 0; i < children.length; i++ ) { for ( var i = 0; i < children.length; i++ ) {
var childLayout = children[ i ].getLayout(); var childLayout = children[ i ].getLayout();
if ( children[ i ].getRenderContainer().getHeight() !== 0 ) if ( children[ i ].getRenderContainer().getPaper() && children[ i ].getRenderContainer().getHeight() !== 0 )
sum += childLayout.branchheight; sum += childLayout.branchheight;
} }
return sum; return sum;
...@@ -5619,17 +5619,25 @@ Minder.Receiver = kity.createClass( 'Receiver', { ...@@ -5619,17 +5619,25 @@ Minder.Receiver = kity.createClass( 'Receiver', {
}, },
setContainerStyle: function () { setContainerStyle: function () {
var textShapeBox = this.getBaseOffset('screen'); var textShapeBox = this.getBaseOffset('screen');
var me = this;
this.container.style.cssText = ";left:" + textShapeBox.x + 'px;top:' + ( textShapeBox.y - 5 ) + 'px;width:' + textShapeBox.width + 'px;height:' + textShapeBox.height + 'px;'; this.container.style.cssText = ";left:" + textShapeBox.x + 'px;top:' + ( textShapeBox.y - 5 ) + 'px;width:' + textShapeBox.width + 'px;height:' + textShapeBox.height + 'px;';
var paperContainer = this.km.getPaper();
var width = paperContainer.getWidth(); if(!this.selection.isShow()){
var height = paperContainer.getHeight(); var paperContainer = this.km.getPaper();
var containerWidth = this.container.offsetWidth; var width = paperContainer.node.parentNode.clientWidth;
if(width < containerWidth + this.container.offsetLeft){ var height = paperContainer.node.parentNode.clientHeight;
this.km.getRenderContainer().fxTranslate(width/-2, 0, 200, "ease", 0, function() {
me.setContainerStyle() if(width < this.container.offsetWidth + this.container.offsetLeft){
}); this.km.getRenderContainer().translate(width/-3, 0);
//this.setContainerStyle();
console.log(width, this.container.offsetWidth + this.container.offsetLeft);
}else if (height < this.container.offsetTop + this.container.offsetHeight){
this.km.getRenderContainer().translate(0, height/-3);
//this.setContainerStyle()
}
} }
return this; return this;
}, },
getTextOffsetData: function () { getTextOffsetData: function () {
...@@ -5782,6 +5790,7 @@ Minder.Selection = kity.createClass( 'Selection', { ...@@ -5782,6 +5790,7 @@ Minder.Selection = kity.createClass( 'Selection', {
this.startOffset = this.endOffset = 0; this.startOffset = this.endOffset = 0;
this.setOpacity(0.5); this.setOpacity(0.5);
this.setStyle('cursor','text'); this.setStyle('cursor','text');
this._show = false;
}, },
collapse : function(toEnd){ collapse : function(toEnd){
...@@ -5855,11 +5864,13 @@ Minder.Selection = kity.createClass( 'Selection', { ...@@ -5855,11 +5864,13 @@ Minder.Selection = kity.createClass( 'Selection', {
setHide: function () { setHide: function () {
clearInterval( this.timer ); clearInterval( this.timer );
this.setStyle( 'display', 'none' ); this.setStyle( 'display', 'none' );
this._show = false;
return this; return this;
}, },
setShowHold: function () { setShowHold: function () {
clearInterval( this.timer ); clearInterval( this.timer );
this.setStyle( 'display', '' ); this.setStyle( 'display', '' );
this._show = true;
return this; return this;
}, },
setShow: function () { setShow: function () {
...@@ -5867,7 +5878,7 @@ Minder.Selection = kity.createClass( 'Selection', { ...@@ -5867,7 +5878,7 @@ Minder.Selection = kity.createClass( 'Selection', {
var me = this, var me = this,
state = ''; state = '';
me.setStyle( 'display', '' ); me.setStyle( 'display', '' );
me._show = true;
if(this.collapsed){ if(this.collapsed){
me.setOpacity(1); me.setOpacity(1);
this.timer = setInterval( function () { this.timer = setInterval( function () {
...@@ -5878,6 +5889,9 @@ Minder.Selection = kity.createClass( 'Selection', { ...@@ -5878,6 +5889,9 @@ Minder.Selection = kity.createClass( 'Selection', {
return this; return this;
}, },
isShow:function(){
return this._show;
},
setTextShape: function ( text ) { setTextShape: function ( text ) {
if ( !text ) { if ( !text ) {
this.text = new kity.Text(); this.text = new kity.Text();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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