Commit f0cb4ee8 authored by Akikonata's avatar Akikonata

grunt

parent 181512d2
......@@ -7,26 +7,26 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<script src="lib/jquery-2.1.0.min.js?_=1399624214062" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399624214062" charset="utf-8"></script>
<script src="lib/jquery-2.1.0.min.js?_=1399627592968" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399627592968" charset="utf-8"></script>
<script type="text/javascript">
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } );
</script>
<script src="lib/kitygraph.all.min.js?_=1399624214062" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399624214062" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399624214062" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399624214062" charset="utf-8"></script>
<script src="lib/kitygraph.all.min.js?_=1399627592968" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399627592968" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399627592968" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399627592968" charset="utf-8"></script>
<script src="lib/zip.js?_=1399624214062" charset="utf-8"></script>
<script src="lib/zip.js?_=1399627592968" charset="utf-8"></script>
<script>
zip.inflateJSPath = 'lib/inflate.js';
</script>
<script src="lib/jquery.xml2json.js?_=1399624214062" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399624214062" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399624214062" charset="utf-8"></script>
<script src="social/social.js?_=1399624214062" charset="utf-8"></script>
<script src="lib/jquery.xml2json.js?_=1399627592968" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399627592968" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399627592968" charset="utf-8"></script>
<script src="social/social.js?_=1399627592968" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
......
......@@ -291,9 +291,9 @@ var utils = Utils = KityMinder.Utils = {
element.onload = element.onreadystatechange = null;
}
};
element.onerror = function () {
throw Error('The load ' + (obj.href || obj.src) + ' fails,check the url settings of file ')
};
// element.onerror = function () {
// throw Error('The load ' + (obj.href || obj.src) + ' fails,check the url settings of file ')
// };
doc.getElementsByTagName("head")[0].appendChild(element);
}
}(),
......@@ -5336,7 +5336,12 @@ Minder.Range = kity.createClass('Range',{
this.nativeRange.setStart(char,1);
this.nativeRange.collapse(true);
}
try{
this.nativeSel.removeAllRanges();
}catch(e){
}
this.nativeSel.addRange(this.nativeRange);
return this;
},
......@@ -5344,7 +5349,7 @@ Minder.Range = kity.createClass('Range',{
try{
this.nativeRange.setStart(node,index);
}catch(e){
console.log(e)
console.log('e')
}
return this;
......@@ -5394,12 +5399,18 @@ Minder.Receiver = kity.createClass( 'Receiver', {
return this.textEditStatus;
},
constructor: function ( km ) {
var me = this;
this.setKityMinder( km );
this.textEditStatus = false;
var _div = document.createElement( 'div' );
_div.setAttribute( 'contenteditable', true );
_div.className = 'km_receiver';
this.container = document.body.insertBefore( _div, document.body.firstChild );
if(browser.ie && browser.version == 11){
utils.listen(this.container,'keydown keypress keyup',function(e){
me.keyboardEvents.call(me,new MinderEvent(e.type == 'keyup' ? "beforekeyup": e.type,e))
})
}
utils.addCssRule( 'km_receiver_css', ' .km_receiver{position:absolute;padding:0;margin:0;word-wrap:break-word;clip:rect(1em 1em 1em 1em);}' ); //
this.km.on( 'textedit.beforekeyup textedit.keydown textedit.keypress textedit.paste', utils.proxy( this.keyboardEvents, this ) );
this.timer = null;
......@@ -5492,6 +5503,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
switch ( e.type ) {
case 'keydown':
isTypeText = false;
isKeypress = false;
switch ( e.originEvent.keyCode ) {
......@@ -5540,6 +5552,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
case 'keypress':
if ( isTypeText )
setTextToContainer();
isKeypress = true;
......@@ -5547,7 +5560,6 @@ Minder.Receiver = kity.createClass( 'Receiver', {
case 'beforekeyup':
switch ( keyCode ) {
case keymap.Enter:
case keymap.Tab:
......@@ -5619,18 +5631,15 @@ Minder.Receiver = kity.createClass( 'Receiver', {
},
setContainerStyle: function () {
var textShapeBox = this.getBaseOffset('screen');
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 - 35 ) + 'px;width:' + textShapeBox.width + 'px;height:' + textShapeBox.height + 'px;';
if(!this.selection.isShow()){
var paperContainer = this.km.getPaper();
var width = paperContainer.node.parentNode.clientWidth;
var height = paperContainer.node.parentNode.clientHeight;
if(width < this.container.offsetWidth + this.container.offsetLeft){
this.km.getRenderContainer().translate(width/-3, 0);
this.setContainerStyle();
}else if (height < this.container.offsetTop + this.container.offsetHeight){
this.km.getRenderContainer().translate(0, height/-3);
this.setContainerStyle()
......@@ -5718,7 +5727,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
if ( offset.x <= v.x + v.width / 2 ) {
me.selection.collapse()
} else {
me.selection.setEndOffset( i + ( me.selection.endOffset > i || dir == 1 ? 1 : 0 ) )
me.selection.setEndOffset( i + ( ( me.selection.endOffset > i || dir == 1 ) && i != me.textData.length - 1 ? 1 : 0 ) )
}
} else if ( i > me.index ) {
......@@ -5726,7 +5735,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
me.selection.setEndOffset( i + 1 )
} else {
if ( dir == 1 ) {
me.selection.setStartOffset( i + ( offset.x >= v.x + v.width / 2 && i < me.textData.length - 1 ? 1 : 0 ) );
me.selection.setStartOffset( i + ( offset.x >= v.x + v.width / 2 && i != me.textData.length - 1 ? 1 : 0 ) );
} else {
me.selection.setStartOffset( i );
}
......@@ -5752,7 +5761,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
var lastOffset = this.textData[ this.textData.length - 1 ];
width = lastOffset.x - startOffset.x + lastOffset.width;
}catch(e){
console.log(e)
console.log('e')
}
} else {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Subproject commit 256dce28fb1e574b18f0dd084f7503cbc25e2a80
Subproject commit d4e00b314db4116a92583114bcb67ff9a3c4d48d
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