Commit bfece2e5 authored by Akikonata's avatar Akikonata

grunt

parent ee9b92b7
......@@ -7,26 +7,26 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<script src="lib/jquery-2.1.0.min.js?_=1399605674500" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399605674500" charset="utf-8"></script>
<script src="lib/jquery-2.1.0.min.js?_=1399615757955" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399615757955" charset="utf-8"></script>
<script type="text/javascript">
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } );
</script>
<script src="lib/kitygraph.all.min.js?_=1399605674500" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399605674500" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399605674500" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399605674500" charset="utf-8"></script>
<script src="lib/kitygraph.all.min.js?_=1399615757955" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399615757955" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399615757955" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399615757955" charset="utf-8"></script>
<script src="lib/zip.js?_=1399605674500" charset="utf-8"></script>
<script src="lib/zip.js?_=1399615757955" charset="utf-8"></script>
<script>
zip.inflateJSPath = 'lib/inflate.js';
</script>
<script src="lib/jquery.xml2json.js?_=1399605674500" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399605674500" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399605674500" charset="utf-8"></script>
<script src="social/social.js?_=1399605674500" charset="utf-8"></script>
<script src="lib/jquery.xml2json.js?_=1399615757955" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399615757955" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399615757955" charset="utf-8"></script>
<script src="social/social.js?_=1399615757955" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
......
......@@ -3128,19 +3128,19 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
};
var showNodeInView = function ( node ) {
var padding = 5;
var viewport = minder.getPaper().getViewPort();
var offset = node.getRenderContainer().getRenderBox( minder.getRenderContainer() );
// var showNodeInView = function ( node ) {
// // var padding = 5;
// // var viewport = minder.getPaper().getViewPort();
// // var offset = node.getRenderContainer().getRenderBox( minder.getRenderContainer() );
var tmpX = viewport.center.x * 2 - ( offset.x + offset.width );
var tmpY = viewport.center.y * 2 - ( offset.y + offset.height );
// // var tmpX = viewport.center.x * 2 - ( offset.x + offset.width );
// // var tmpY = viewport.center.y * 2 - ( offset.y + offset.height );
var dx = offset.x < 0 ? -offset.x : Math.min( tmpX, 0 );
var dy = offset.y < 0 ? -offset.y : Math.min( tmpY, 0 );
// // var dx = offset.x < 0 ? -offset.x : Math.min( tmpX, 0 );
// // var dy = offset.y < 0 ? -offset.y : Math.min( tmpY, 0 );
minder.getRenderContainer().fxTranslate( dx, dy, 100, "easeOutQuint" );
};
// // minder.getRenderContainer().fxTranslate( dx, dy, 100, "easeOutQuint" );
// };
var _style = {
getCurrentLayoutStyle: function () {
......@@ -3398,9 +3398,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
updateConnectAndshIcon( set[ i ] );
}
if ( focus ) {
showNodeInView( node );
}
// if ( focus ) {
// showNodeInView( node );
// }
parent.expand();
var shicon = parent.getLayout().shicon;
if ( shicon ) shicon.switchState( true );
......@@ -4629,8 +4629,8 @@ KityMinder.registerModule( "DropFile", function () {
e.stopPropagation();
var minder = this;
if( kity.Browser.ie && Number(kity.Browser.version) < 10 ){
alert('文件导入对IE浏览器仅支持10以上版本');
if ( kity.Browser.ie && Number( kity.Browser.version ) < 10 ) {
alert( '文件导入对IE浏览器仅支持10以上版本' );
return;
}
......@@ -4657,9 +4657,9 @@ KityMinder.registerModule( "DropFile", function () {
createDraft( this );
social.setRemotePath( null, false );
this.execCommand( 'camera', this.getRoot() );
setTimeout(function() {
setTimeout( function () {
social.watchChanges( true );
}, 10);
}, 10 );
importing = false;
}
......@@ -4681,7 +4681,7 @@ KityMinder.registerModule( "DropFile", function () {
}
function createDraft( minder ) {
draftManager = window.draftManager;
draftManager = window.draftManager || ( window.draftManager = new window.DraftManager( minder ) );
draftManager.create();
}
......@@ -5605,8 +5605,8 @@ Minder.Receiver = kity.createClass( 'Receiver', {
}
return this;
},
getBaseOffset: function ( ) {
var rb = this.textShape.getRenderBox( this.km.getRenderContainer() );
getBaseOffset: function ( refer ) {
var rb = this.textShape.getRenderBox( refer || this.km.getRenderContainer() );
// if(!this.pr) {
// this.km.getRenderContainer().addShape(this.pr = new kity.Rect().stroke('green'));
// }
......@@ -5618,9 +5618,18 @@ Minder.Receiver = kity.createClass( 'Receiver', {
return this;
},
setContainerStyle: function () {
var textShapeBox = this.getBaseOffset();
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;';
var paperContainer = this.km.getPaper();
var width = paperContainer.getWidth();
var height = paperContainer.getHeight();
var containerWidth = this.container.offsetWidth;
if(width < containerWidth + this.container.offsetLeft){
this.km.getRenderContainer().fxTranslate(width/-2, 0, 200, "ease", 0, function() {
me.setContainerStyle()
});
}
return this;
},
getTextOffsetData: function () {
......@@ -5631,7 +5640,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
try {
var box = this.textShape.getExtentOfChar( i );
} catch ( e ) {
debugger
console.log(e)
}
this.textData.push( {
......@@ -8963,15 +8972,14 @@ KM.registerToolbarUI( 'hyperlink', function ( name ) {
label: me.getLang( 'hyperlink.hyperlink' ),
exec: function (url) {
$dialog.kmui().show();
this.execCommand( 'hyperlink', url )
},
cmdName: 'hyperlink'
},{
label: me.getLang( 'hyperlink.unhyperlink' ),
exec: function (url) {
exec: function () {
this.execCommand( 'unhyperlink' )
},
cmdName: 'hyperlink'
cmdName: 'unhyperlink'
}
]);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* ====================================================
* kitygraph - v1.0.0 - 2014-05-07
* kitygraph - v1.0.0 - 2014-05-09
* https://github.com/kitygraph/kity
* GitHub: https://github.com/kitygraph/kity.git
* Copyright (c) 2014 Baidu UEditor Group; Licensed MIT
......@@ -3317,14 +3317,14 @@ define("graphic/paper", [ "core/class", "core/config", "core/utils", "graphic/sv
return this.container;
},
getWidth: function() {
return +this.node.getAttribute("width");
return this.node.clientWidth;
},
setWidth: function(width) {
this.node.setAttribute("width", width);
return this;
},
getHeight: function() {
return +this.node.getAttribute("height");
return this.node.clientHeight;
},
setHeight: function(height) {
this.node.setAttribute("height", height);
......@@ -3479,7 +3479,7 @@ define("graphic/path", [ "core/utils", "core/class", "core/config", "graphic/sha
return this.push("L", arguments);
},
lineBy: function(dx, dy) {
return this.push("k", arguments);
return this.push("l", arguments);
},
arcTo: function(rx, ry, xr, laf, sf, x, y) {
return this.push("A", arguments);
......@@ -4151,7 +4151,7 @@ define("graphic/shape", [ "graphic/svg", "core/utils", "graphic/eventhandler", "
return this;
},
setMatrix: function(m) {
this.transform.matrix = m !== null && slice.call(arguments) || null;
this.transform.matrix = m;
return this._applyTransform();
},
setTranslate: function(t) {
......@@ -4427,7 +4427,7 @@ define("graphic/shapeevent", [ "graphic/matrix", "core/utils", "graphic/box", "g
return null;
}
var eventClient = this.originEvent.touches ? this.originEvent.touches[touch_index || 0] : this.originEvent;
var clientX = eventClient.clientX, clientY = eventClient.clientY, node = this.targetShape.shapeNode || this.targetShape.node, // 鼠标位置在目标对象上的坐标
var clientX = eventClient && eventClient.clientX || 0, clientY = eventClient && eventClient.clientY || 0, node = this.targetShape.shapeNode || this.targetShape.node, // 鼠标位置在目标对象上的坐标
// 基于屏幕坐标算
point = Matrix.transformPoint(clientX, clientY, node.getScreenCTM().inverse());
return Matrix.getCTM(this.targetShape, refer || "view").transformPoint(point);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -766,9 +766,10 @@ $( function () {
}
function bindDraft() {
draftManager = window.draftManager;
if ( !draftManager ) {
if ( window.DraftManager ) {
draftManager = new window.DraftManager( minder );
draftManager = window.draftManager = new window.DraftManager( minder );
}
}
......
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