Commit b8cddccf by liuyong

修改画布逻辑

1 parent 50270694
......@@ -46,25 +46,25 @@ function setScratchpad(that) {//左侧便签本数据
}
];
var xml = that.createLibraryDataFromImages(images);
// var xml = that.createLibraryDataFromImages(images);
let request = window.indexedDB.open('database', 2);
// let request = window.indexedDB.open('database', 2);
request.onsuccess = function (event) {
let db = request.result;
let trx = db.transaction('filesInfo', 'readwrite');
let trx2 = db.transaction('files', 'readwrite');
// request.onsuccess = function (event) {
// let db = request.result;
// let trx = db.transaction('filesInfo', 'readwrite');
// let trx2 = db.transaction('files', 'readwrite');
trx.objectStore('filesInfo').put({
title: '.scratchpad',
size: xml.length,
lastModified: Date.now(),
type: 'L'
})
// trx.objectStore('filesInfo').put({
// title: '.scratchpad',
// size: xml.length,
// lastModified: Date.now(),
// type: 'L'
// })
trx2.objectStore('files').put({
title: '.scratchpad',
data: xml
})
}
// trx2.objectStore('files').put({
// title: '.scratchpad',
// data: xml
// })
// }
}
\ No newline at end of file
......@@ -17194,6 +17194,7 @@
this.importCsvDialog = new TextareaDialog(this, mxResources.get('csv') + ':',
Editor.defaultCsvValue, mxUtils.bind(this, function(newValue)
{
console.log(newValue)
this.importCsv(newValue);
}), null, null, 620, 430, null, true, true, mxResources.get('import'),
!this.isOffline() ? 'https://drawio-app.com/import-from-csv-to-drawio/' : null);
......
......@@ -458,6 +458,7 @@ 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)
......
......@@ -3828,7 +3828,6 @@ Sidebar.prototype.createVertexTemplateEntry = function(style, width, height, val
{
tags += ' ' + title;
}
tags = (tags != null && tags.length > 0) ? tags : ((title != null) ? title.toLowerCase() : '');
return this.addEntry(tags, mxUtils.bind(this, function()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!