Commit dda9fa3e by liuyong

修改画布

1 parent ac26a1d0
const ajaxUrl = '172.20.10.3:7003';
\ No newline at end of file
// const ajaxUrl = '172.20.10.3:7003';
const ajaxUrl = '43.143.211.42';
......@@ -5716,7 +5716,7 @@ App.prototype.loadLibraries = function(libs, done)
if (service == 'L')
{
const that = this;
setScratchpad(that);
initSetScratchpad(that);
if (isLocalStorage || mxClient.IS_CHROMEAPP)
{
......
......@@ -243,6 +243,13 @@ StorageFile.prototype.saveFile = function(title, revision, success, error)
this.setShadowModified(false);
var data = this.getData();
// console.log(data)
let stringArray = data.split('<mxlibrary>')[1].split('</mxlibrary>');
saveScratchpad(JSON.parse(stringArray[0]))
this.ui.setDatabaseItem(null, [{
title: this.title,
......
......@@ -458,7 +458,6 @@ Menus.prototype.init = function()
menu.addSeparator(parent);
menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
{
var layout = new mxFastOrganicLayout(graph);
promptSpacing(layout.forceConstant, mxUtils.bind(this, function(newValue)
......@@ -475,7 +474,6 @@ Menus.prototype.init = function()
{
tmp = graph.getDefaultParent();
}
layout.execute(tmp);
if (graph.getModel().isVertex(tmp))
......
......@@ -2234,7 +2234,8 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
node.innerHTML = this.graph.container.innerHTML;
}
// console.log(node)//解释,包含便签本的缩略图的svg格式
// console.log(node)//解释,包含便签本的缩略图的svg格式, 也有拖拽到便签本的事件
this.graph.getModel().clear();
this.graph.view.scaleAndTranslate(1, 0, 0);
this.graph.shapeBackgroundColor = (Editor.isDarkMode() ?
......@@ -2277,7 +2278,6 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
mxUtils.write(div, title);
parent.appendChild(div);
}
return bounds;
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!