Commit 7c296fa5 by liuyong

修改bug

1 parent fa64f6e2
......@@ -50,13 +50,13 @@
result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
}
}
// 二次开发-默认开启开发模式
// 二次开发-默认开启开发模式,会取消点击此处保存后弹出的窗口
if (!result.hasOwnProperty('dev')) {
result['dev'] = 1
}
if (!result.hasOwnProperty('offline')) {//跳过选择存储方式,不用选什么google drive,github之类的
result['offline'] = 1
}
// if (!result.hasOwnProperty('offline')) {//跳过文件菜单下面的选择存储方式,不用选什么google drive,github之类的
// result['offline'] = 1
// }
return result;
})();
......
......@@ -187,6 +187,7 @@ App = function(editor, container, lightbox)
this.toggleCompactMode(false);//二次开发,默认折叠
this.toggleShapesPanel(true);//二次开发,默认全屏,显示左侧图形面板
this.toggleFormatPanel(true);//二次开发,默认全屏,显示右侧样式和属性面板
};
/**
......@@ -714,7 +715,7 @@ App.main = function(callback, createUi)
{
var content = mxUtils.getTextContent(scripts[0]);
if (CryptoJS.MD5(content).toString() != 'ecf5dfb65d485b11b1077913583d4219')//二次开发----修改校验值,不然会有弹框
if (CryptoJS.MD5(content).toString() != 'dda613656c97435b378def799740801e')//二次开发----修改校验值,不然会有弹框
{
console.warn('Change bootstrap script MD5 in the previous line:', CryptoJS.MD5(content).toString());
console.warn(CryptoJS.MD5(content).toString());
......@@ -1483,6 +1484,8 @@ App.prototype.initializeViewerMode = function()
{
parent.postMessage(JSON.stringify(this.createLoadMessage('size')), '*');
}));
}
};
......@@ -4429,7 +4432,7 @@ App.prototype.showSplash = function(force)
</diagram>
</mxfile>
`
}
}
const file = new LocalFile(this, mockFile.data, mockFile.title, this.mode);
this.loadFile(`-1`, true, file);
}
......@@ -7048,15 +7051,18 @@ App.prototype.save = function(name, done)
{
var onerror = mxUtils.bind(this, function(e)
{
this.handleError(e);
});
this.createTimeout(3 * this.timeout, mxUtils.bind(this, function(timeout)
{
this.editor.setStatus('');
{
// this.editor.setStatus('');
if (this.editor.graph.isEditing())
{
this.editor.graph.stopEditing();
}
......@@ -7064,10 +7070,12 @@ App.prototype.save = function(name, done)
{
if (timeout.clear())
{
file.handleFileSuccess(true);
if (done != null)
{
done();
}
}
......@@ -7075,12 +7083,16 @@ App.prototype.save = function(name, done)
var error = mxUtils.bind(this, function(err)
{
if (timeout.clear())
{
if (file.isModified())
{
Editor.addRetryToError(err, mxUtils.bind(this, function()
{
this.save(name, done);
}));
}
......@@ -7093,10 +7105,13 @@ App.prototype.save = function(name, done)
{
if (name == file.getTitle())
{
file.save(true, success, error);
console.log(2)
this.spinner.stop();//二次开发,隐藏正在保存...弹出提示
// file.save(true, success, error);
}
else
{
file.saveAs(name, success, error)
}
}
......
......@@ -68,8 +68,8 @@ if (urlParams['dev'] == '1')
tip += '<br>style=<div style="display:inline-block;vertical-align:bottom;white-space:nowrap;width:480px;overflow:hidden;text-overflow:ellipsis;">' + cell.style + '</span>';
}
}
return tip;
return null;//二次开发,取消鼠标移动到图形上出现的提示框
// return tip;
};
})();
}
......@@ -1927,6 +1927,7 @@ DrawioFile.prototype.removeDraft = function()
*/
DrawioFile.prototype.addUnsavedStatus = function(err)
{
if (!this.inConflictState && this.ui.statusContainer != null && this.ui.getCurrentFile() == this)
{
if (err instanceof Error && err.message != null && err.message != '')
......
......@@ -6066,6 +6066,7 @@
// ((params.length > 0) ? '?' + params.join('&') : '') + data;
//二次开发,导出URL时,导出地址为本地地址,默认代码导出的为DrawIO官网的远程地址
console.log(1234)
return 'http://' + window.location.host + '/' + ((params.length > 0) ? '?' + params.join('&') : '') + data;
};
......
......@@ -5143,7 +5143,7 @@ EditorUi.prototype.createUi = function()
if (this.container != null && this.tabContainer != null)
{
// this.container.appendChild(this.tabContainer);//二次开发,隐藏底部的分页
this.container.appendChild(this.tabContainer);//二次开发,显示底部的分页
}
// Creates toolbar
......@@ -5175,7 +5175,6 @@ EditorUi.prototype.createStatusContainer = function()
{
var container = document.createElement('a');
container.className = 'geItem geStatus';
// Handles data-action attribute
mxEvent.addListener(container, 'click', mxUtils.bind(this, function(evt)
{
......
......@@ -6185,7 +6185,6 @@ Graph.prototype.getTooltipForCell = function(cell)
}
}
}
return tip;
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!