Commit b8cddccf by liuyong

修改画布逻辑

1 parent 50270694
...@@ -46,25 +46,25 @@ function setScratchpad(that) {//左侧便签本数据 ...@@ -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) { // request.onsuccess = function (event) {
let db = request.result; // let db = request.result;
let trx = db.transaction('filesInfo', 'readwrite'); // let trx = db.transaction('filesInfo', 'readwrite');
let trx2 = db.transaction('files', 'readwrite'); // let trx2 = db.transaction('files', 'readwrite');
trx.objectStore('filesInfo').put({ // trx.objectStore('filesInfo').put({
title: '.scratchpad', // title: '.scratchpad',
size: xml.length, // size: xml.length,
lastModified: Date.now(), // lastModified: Date.now(),
type: 'L' // type: 'L'
}) // })
trx2.objectStore('files').put({ // trx2.objectStore('files').put({
title: '.scratchpad', // title: '.scratchpad',
data: xml // data: xml
}) // })
} // }
} }
\ No newline at end of file
...@@ -17194,6 +17194,7 @@ ...@@ -17194,6 +17194,7 @@
this.importCsvDialog = new TextareaDialog(this, mxResources.get('csv') + ':', this.importCsvDialog = new TextareaDialog(this, mxResources.get('csv') + ':',
Editor.defaultCsvValue, mxUtils.bind(this, function(newValue) Editor.defaultCsvValue, mxUtils.bind(this, function(newValue)
{ {
console.log(newValue)
this.importCsv(newValue); this.importCsv(newValue);
}), null, null, 620, 430, null, true, true, mxResources.get('import'), }), null, null, 620, 430, null, true, true, mxResources.get('import'),
!this.isOffline() ? 'https://drawio-app.com/import-from-csv-to-drawio/' : null); !this.isOffline() ? 'https://drawio-app.com/import-from-csv-to-drawio/' : null);
......
...@@ -458,6 +458,7 @@ Menus.prototype.init = function() ...@@ -458,6 +458,7 @@ Menus.prototype.init = function()
menu.addSeparator(parent); menu.addSeparator(parent);
menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function() menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
{ {
var layout = new mxFastOrganicLayout(graph); var layout = new mxFastOrganicLayout(graph);
promptSpacing(layout.forceConstant, mxUtils.bind(this, function(newValue) promptSpacing(layout.forceConstant, mxUtils.bind(this, function(newValue)
......
...@@ -3828,7 +3828,6 @@ Sidebar.prototype.createVertexTemplateEntry = function(style, width, height, val ...@@ -3828,7 +3828,6 @@ Sidebar.prototype.createVertexTemplateEntry = function(style, width, height, val
{ {
tags += ' ' + title; tags += ' ' + title;
} }
tags = (tags != null && tags.length > 0) ? tags : ((title != null) ? title.toLowerCase() : ''); tags = (tags != null && tags.length > 0) ? tags : ((title != null) ? title.toLowerCase() : '');
return this.addEntry(tags, mxUtils.bind(this, function() 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!