Commit bfece2e5 authored by Akikonata's avatar Akikonata

grunt

parent ee9b92b7
...@@ -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?_=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?_=1399605674500" charset="utf-8"></script> <script src="lib/ZeroClipboard.min.js?_=1399615757955" 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?_=1399605674500" charset="utf-8"></script> <script src="lib/kitygraph.all.min.js?_=1399615757955" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399605674500" charset="utf-8"></script> <script src="kityminder.all.min.js?_=1399615757955" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399605674500" charset="utf-8"></script> <script src="kityminder.config.js?_=1399615757955" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399605674500" 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> <script>
zip.inflateJSPath = 'lib/inflate.js'; zip.inflateJSPath = 'lib/inflate.js';
</script> </script>
<script src="lib/jquery.xml2json.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?_=1399605674500" 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?_=1399605674500" charset="utf-8"></script> <script src="social/draftmanager.js?_=1399615757955" charset="utf-8"></script>
<script src="social/social.js?_=1399605674500" charset="utf-8"></script> <script src="social/social.js?_=1399615757955" 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" />
......
...@@ -3128,19 +3128,19 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -3128,19 +3128,19 @@ KityMinder.registerModule( "LayoutDefault", function () {
} }
}; };
var showNodeInView = function ( node ) { // var showNodeInView = function ( node ) {
var padding = 5; // // var padding = 5;
var viewport = minder.getPaper().getViewPort(); // // var viewport = minder.getPaper().getViewPort();
var offset = node.getRenderContainer().getRenderBox( minder.getRenderContainer() ); // // var offset = node.getRenderContainer().getRenderBox( minder.getRenderContainer() );
var tmpX = viewport.center.x * 2 - ( offset.x + offset.width ); // // var tmpX = viewport.center.x * 2 - ( offset.x + offset.width );
var tmpY = viewport.center.y * 2 - ( offset.y + offset.height ); // // var tmpY = viewport.center.y * 2 - ( offset.y + offset.height );
var dx = offset.x < 0 ? -offset.x : Math.min( tmpX, 0 ); // // var dx = offset.x < 0 ? -offset.x : Math.min( tmpX, 0 );
var dy = offset.y < 0 ? -offset.y : Math.min( tmpY, 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 = { var _style = {
getCurrentLayoutStyle: function () { getCurrentLayoutStyle: function () {
...@@ -3398,9 +3398,9 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -3398,9 +3398,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
updateConnectAndshIcon( set[ i ] ); updateConnectAndshIcon( set[ i ] );
} }
if ( focus ) { // if ( focus ) {
showNodeInView( node ); // showNodeInView( node );
} // }
parent.expand(); parent.expand();
var shicon = parent.getLayout().shicon; var shicon = parent.getLayout().shicon;
if ( shicon ) shicon.switchState( true ); if ( shicon ) shicon.switchState( true );
...@@ -4629,8 +4629,8 @@ KityMinder.registerModule( "DropFile", function () { ...@@ -4629,8 +4629,8 @@ KityMinder.registerModule( "DropFile", function () {
e.stopPropagation(); e.stopPropagation();
var minder = this; var minder = this;
if( kity.Browser.ie && Number(kity.Browser.version) < 10 ){ if ( kity.Browser.ie && Number( kity.Browser.version ) < 10 ) {
alert('文件导入对IE浏览器仅支持10以上版本'); alert( '文件导入对IE浏览器仅支持10以上版本' );
return; return;
} }
...@@ -4657,9 +4657,9 @@ KityMinder.registerModule( "DropFile", function () { ...@@ -4657,9 +4657,9 @@ KityMinder.registerModule( "DropFile", function () {
createDraft( this ); createDraft( this );
social.setRemotePath( null, false ); social.setRemotePath( null, false );
this.execCommand( 'camera', this.getRoot() ); this.execCommand( 'camera', this.getRoot() );
setTimeout(function() { setTimeout( function () {
social.watchChanges( true ); social.watchChanges( true );
}, 10); }, 10 );
importing = false; importing = false;
} }
...@@ -4681,7 +4681,7 @@ KityMinder.registerModule( "DropFile", function () { ...@@ -4681,7 +4681,7 @@ KityMinder.registerModule( "DropFile", function () {
} }
function createDraft( minder ) { function createDraft( minder ) {
draftManager = window.draftManager; draftManager = window.draftManager || ( window.draftManager = new window.DraftManager( minder ) );
draftManager.create(); draftManager.create();
} }
...@@ -5605,8 +5605,8 @@ Minder.Receiver = kity.createClass( 'Receiver', { ...@@ -5605,8 +5605,8 @@ Minder.Receiver = kity.createClass( 'Receiver', {
} }
return this; return this;
}, },
getBaseOffset: function ( ) { getBaseOffset: function ( refer ) {
var rb = this.textShape.getRenderBox( this.km.getRenderContainer() ); var rb = this.textShape.getRenderBox( refer || this.km.getRenderContainer() );
// if(!this.pr) { // if(!this.pr) {
// this.km.getRenderContainer().addShape(this.pr = new kity.Rect().stroke('green')); // this.km.getRenderContainer().addShape(this.pr = new kity.Rect().stroke('green'));
// } // }
...@@ -5618,9 +5618,18 @@ Minder.Receiver = kity.createClass( 'Receiver', { ...@@ -5618,9 +5618,18 @@ Minder.Receiver = kity.createClass( 'Receiver', {
return this; return this;
}, },
setContainerStyle: function () { 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;'; 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; return this;
}, },
getTextOffsetData: function () { getTextOffsetData: function () {
...@@ -5631,7 +5640,7 @@ Minder.Receiver = kity.createClass( 'Receiver', { ...@@ -5631,7 +5640,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
try { try {
var box = this.textShape.getExtentOfChar( i ); var box = this.textShape.getExtentOfChar( i );
} catch ( e ) { } catch ( e ) {
debugger console.log(e)
} }
this.textData.push( { this.textData.push( {
...@@ -8963,15 +8972,14 @@ KM.registerToolbarUI( 'hyperlink', function ( name ) { ...@@ -8963,15 +8972,14 @@ KM.registerToolbarUI( 'hyperlink', function ( name ) {
label: me.getLang( 'hyperlink.hyperlink' ), label: me.getLang( 'hyperlink.hyperlink' ),
exec: function (url) { exec: function (url) {
$dialog.kmui().show(); $dialog.kmui().show();
this.execCommand( 'hyperlink', url )
}, },
cmdName: 'hyperlink' cmdName: 'hyperlink'
},{ },{
label: me.getLang( 'hyperlink.unhyperlink' ), label: me.getLang( 'hyperlink.unhyperlink' ),
exec: function (url) { exec: function () {
this.execCommand( 'unhyperlink' ) 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 * https://github.com/kitygraph/kity
* GitHub: https://github.com/kitygraph/kity.git * GitHub: https://github.com/kitygraph/kity.git
* Copyright (c) 2014 Baidu UEditor Group; Licensed MIT * Copyright (c) 2014 Baidu UEditor Group; Licensed MIT
...@@ -3317,14 +3317,14 @@ define("graphic/paper", [ "core/class", "core/config", "core/utils", "graphic/sv ...@@ -3317,14 +3317,14 @@ define("graphic/paper", [ "core/class", "core/config", "core/utils", "graphic/sv
return this.container; return this.container;
}, },
getWidth: function() { getWidth: function() {
return +this.node.getAttribute("width"); return this.node.clientWidth;
}, },
setWidth: function(width) { setWidth: function(width) {
this.node.setAttribute("width", width); this.node.setAttribute("width", width);
return this; return this;
}, },
getHeight: function() { getHeight: function() {
return +this.node.getAttribute("height"); return this.node.clientHeight;
}, },
setHeight: function(height) { setHeight: function(height) {
this.node.setAttribute("height", height); this.node.setAttribute("height", height);
...@@ -3479,7 +3479,7 @@ define("graphic/path", [ "core/utils", "core/class", "core/config", "graphic/sha ...@@ -3479,7 +3479,7 @@ define("graphic/path", [ "core/utils", "core/class", "core/config", "graphic/sha
return this.push("L", arguments); return this.push("L", arguments);
}, },
lineBy: function(dx, dy) { lineBy: function(dx, dy) {
return this.push("k", arguments); return this.push("l", arguments);
}, },
arcTo: function(rx, ry, xr, laf, sf, x, y) { arcTo: function(rx, ry, xr, laf, sf, x, y) {
return this.push("A", arguments); return this.push("A", arguments);
...@@ -4151,7 +4151,7 @@ define("graphic/shape", [ "graphic/svg", "core/utils", "graphic/eventhandler", " ...@@ -4151,7 +4151,7 @@ define("graphic/shape", [ "graphic/svg", "core/utils", "graphic/eventhandler", "
return this; return this;
}, },
setMatrix: function(m) { setMatrix: function(m) {
this.transform.matrix = m !== null && slice.call(arguments) || null; this.transform.matrix = m;
return this._applyTransform(); return this._applyTransform();
}, },
setTranslate: function(t) { setTranslate: function(t) {
...@@ -4427,7 +4427,7 @@ define("graphic/shapeevent", [ "graphic/matrix", "core/utils", "graphic/box", "g ...@@ -4427,7 +4427,7 @@ define("graphic/shapeevent", [ "graphic/matrix", "core/utils", "graphic/box", "g
return null; return null;
} }
var eventClient = this.originEvent.touches ? this.originEvent.touches[touch_index || 0] : this.originEvent; 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()); point = Matrix.transformPoint(clientX, clientY, node.getScreenCTM().inverse());
return Matrix.getCTM(this.targetShape, refer || "view").transformPoint(point); 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 () { ...@@ -766,9 +766,10 @@ $( function () {
} }
function bindDraft() { function bindDraft() {
draftManager = window.draftManager;
if ( !draftManager ) { if ( !draftManager ) {
if ( window.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