Skip to content

Commit 82e4241

Browse files
Release v0.0.108
1 parent af05fa2 commit 82e4241

File tree

6 files changed

+40
-10
lines changed

6 files changed

+40
-10
lines changed

dist/index.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -48644,7 +48644,15 @@ var SchemaDesigner = class {
4864448644
this.config.icons.zoomFitIcon,
4864548645
"Fit",
4864648646
() => {
48647-
this.mxGraph.fit(void 0);
48647+
this.mxGraph.view.rendering = false;
48648+
while (true) {
48649+
this.mxGraph.fit(null);
48650+
if (this.mxGraph.view.scale < 1) {
48651+
break;
48652+
}
48653+
}
48654+
this.mxGraph.view.rendering = true;
48655+
this.autoLayout();
4864848656
this.updateEditorPosition();
4864948657
}
4865048658
);
@@ -48876,7 +48884,9 @@ var SchemaDesigner = class {
4887648884
* when the graph scales or when the graph is moved
4887748885
*/
4887848886
updateEditorPosition() {
48879-
this.config.updateEditorPosition(this._activeCellState.x, this._activeCellState.y, this.mxGraph.view.scale);
48887+
if (this.activeCellState !== void 0) {
48888+
this.config.updateEditorPosition(this._activeCellState.x, this._activeCellState.y, this.mxGraph.view.scale);
48889+
}
4888048890
}
4888148891
/**
4888248892
* Gets the relationships of an entity

dist/index.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/ts/schemaDesigner/schemaDesigner.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,15 @@ class SchemaDesigner {
484484
this.updateEditorPosition();
485485
});
486486
this.toolbar.addButton(this.config.icons.zoomFitIcon, "Fit", () => {
487-
this.mxGraph.fit(undefined);
487+
this.mxGraph.view.rendering = false;
488+
while (true) {
489+
this.mxGraph.fit(null);
490+
if (this.mxGraph.view.scale < 1) {
491+
break;
492+
}
493+
}
494+
this.mxGraph.view.rendering = true;
495+
this.autoLayout();
488496
this.updateEditorPosition();
489497
});
490498
this.toolbar.addDivider();
@@ -699,7 +707,9 @@ class SchemaDesigner {
699707
* when the graph scales or when the graph is moved
700708
*/
701709
updateEditorPosition() {
702-
this.config.updateEditorPosition(this._activeCellState.x, this._activeCellState.y, this.mxGraph.view.scale);
710+
if (this.activeCellState !== undefined) {
711+
this.config.updateEditorPosition(this._activeCellState.x, this._activeCellState.y, this.mxGraph.view.scale);
712+
}
703713
}
704714
/**
705715
* Gets the relationships of an entity

dist/tsconfig.tsbuildinfo

+1-1
Large diffs are not rendered by default.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "azdataGraph",
33
"description": "azdataGraph is a derivative of mxGraph, which is a fully client side JavaScript diagramming library that uses SVG and HTML for rendering.",
4-
"version": "0.0.107",
4+
"version": "0.0.108",
55
"homepage": "https://github.com/microsoft/azdataGraph",
66
"author": "Microsoft",
77
"license": "Apache-2.0",

src/ts/schemaDesigner/schemaDesigner.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,15 @@ export class SchemaDesigner {
551551
this.config.icons.zoomFitIcon,
552552
"Fit",
553553
() => {
554-
this.mxGraph.fit(undefined!);
554+
this.mxGraph.view.rendering = false;
555+
while (true) {
556+
this.mxGraph.fit(null!);
557+
if(this.mxGraph.view.scale < 1) {
558+
break;
559+
}
560+
}
561+
this.mxGraph.view.rendering = true;
562+
this.autoLayout();
555563
this.updateEditorPosition();
556564
}
557565
);
@@ -806,7 +814,9 @@ export class SchemaDesigner {
806814
* when the graph scales or when the graph is moved
807815
*/
808816
public updateEditorPosition() {
809-
this.config.updateEditorPosition(this._activeCellState.x, this._activeCellState.y, this.mxGraph.view.scale);
817+
if (this.activeCellState !== undefined) {
818+
this.config.updateEditorPosition(this._activeCellState.x, this._activeCellState.y, this.mxGraph.view.scale);
819+
}
810820
}
811821

812822
/**

0 commit comments

Comments
 (0)