mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 00:45:58 +00:00
perspective fixes
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { createPerspectiveNodeConfig, MultipleDatabaseInfo, PerspectiveConfig } from 'dbgate-datalib';
|
||||
import {
|
||||
createPerspectiveNodeConfig,
|
||||
MultipleDatabaseInfo,
|
||||
PerspectiveConfig,
|
||||
perspectiveNodesHaveStructure,
|
||||
} from 'dbgate-datalib';
|
||||
import _ from 'lodash';
|
||||
import { tick } from 'svelte';
|
||||
import runCommand from '../commands/runCommand';
|
||||
@@ -102,7 +107,7 @@
|
||||
}
|
||||
|
||||
async function detectAutoArrange(config: PerspectiveConfig, dbInfos) {
|
||||
if (config.nodes.find(x => !x.position)) {
|
||||
if (config.nodes.find(x => !x.position) && perspectiveNodesHaveStructure(config, dbInfos, conid, database)) {
|
||||
await tick();
|
||||
runCommand('designer.arrange');
|
||||
}
|
||||
|
||||
@@ -154,21 +154,9 @@
|
||||
if (shouldProcessPerspectiveDefaultColunns(config, $dbInfos, conid, database)) {
|
||||
setConfig(cfg => processPerspectiveDefaultColunns(cfg, $dbInfos, conid, database));
|
||||
}
|
||||
// tick().then(() => {
|
||||
// const newConfig = processPerspectiveDefaultColunns(config, $dbInfos, conid, database);
|
||||
// if (newConfig) {
|
||||
// if (
|
||||
// newConfig.nodes.filter(x => x.defaultColumnsProcessed).length >
|
||||
// config.nodes.filter(x => x.defaultColumnsProcessed).length
|
||||
// ) {
|
||||
// console.log('CONFIG CHANGED');
|
||||
// setConfig(() => newConfig);
|
||||
// } else {
|
||||
// console.warn('No new default columns', newConfig);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
// $: console.log('PERSPECTIVE', config);
|
||||
</script>
|
||||
|
||||
<HorizontalSplitter initialValue={getInitialManagerSize()} bind:size={managerSize}>
|
||||
|
||||
Reference in New Issue
Block a user