onresize
This commit is contained in:
parent
e6d8e0fa98
commit
bbe3500928
2 changed files with 10 additions and 3 deletions
|
@ -61,7 +61,7 @@ var DiagramNode = /** @class */ (function () {
|
|||
}());
|
||||
var _diagram;
|
||||
function diargramOnResize() {
|
||||
_diagram.fillParent();
|
||||
_diagram.onresize();
|
||||
}
|
||||
function diagramOnMouseDown(ev) {
|
||||
_diagram.onmousedown(ev);
|
||||
|
@ -331,6 +331,9 @@ var Diagrams = /** @class */ (function () {
|
|||
Diagrams.prototype.removeConnection = function (A, B) {
|
||||
this.connections.splice(this.connections.indexOf([A, B]), 1);
|
||||
};
|
||||
Diagrams.prototype.onresize = function () {
|
||||
this.fillParent();
|
||||
};
|
||||
Diagrams.prototype.fillParent = function () {
|
||||
this.canvas.width = this.canvas.clientWidth;
|
||||
this.canvas.height = this.canvas.clientHeight;
|
||||
|
|
|
@ -85,7 +85,7 @@ class DiagramNode {
|
|||
|
||||
let _diagram: Diagrams;
|
||||
function diargramOnResize(){
|
||||
_diagram.fillParent();
|
||||
_diagram.onresize();
|
||||
}
|
||||
function diagramOnMouseDown(ev: MouseEvent){
|
||||
_diagram.onmousedown(ev);
|
||||
|
@ -396,7 +396,11 @@ class Diagrams {
|
|||
removeConnection(A: DiagramNode, B: DiagramNode){
|
||||
this.connections.splice(this.connections.indexOf([A, B]), 1);
|
||||
}
|
||||
|
||||
|
||||
onresize(){
|
||||
this.fillParent();
|
||||
}
|
||||
|
||||
fillParent(){
|
||||
this.canvas.width = this.canvas.clientWidth;
|
||||
this.canvas.height = this.canvas.clientHeight;
|
||||
|
|
Loading…
Add table
Reference in a new issue