mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 06:36:00 +00:00
fixed adding tables to empty designer
This commit is contained in:
@@ -167,8 +167,8 @@
|
|||||||
async function detectSize(tables, domTables) {
|
async function detectSize(tables, domTables) {
|
||||||
await tick();
|
await tick();
|
||||||
const rects = _.values(domTables).map(x => x.getRect());
|
const rects = _.values(domTables).map(x => x.getRect());
|
||||||
const maxX = _.max(rects.map(x => x.right));
|
const maxX = rects.length > 0 ? _.max(rects.map(x => x.right)) : 0;
|
||||||
const maxY = _.max(rects.map(x => x.bottom));
|
const maxY = rects.length > 0 ? _.max(rects.map(x => x.bottom)) : 0;
|
||||||
|
|
||||||
canvasWidth = Math.max(3000, maxX + 50);
|
canvasWidth = Math.max(3000, maxX + 50);
|
||||||
canvasHeight = Math.max(3000, maxY + 50);
|
canvasHeight = Math.max(3000, maxY + 50);
|
||||||
|
|||||||
Reference in New Issue
Block a user