Skip to content

Commit

Permalink
Merge pull request #104 from Foblex/103-bug-typeerror-cannot-read-pro…
Browse files Browse the repository at this point in the history
…perties-of-undefined-reading-fgroupscontainer

103 bug typeerror cannot read properties of undefined reading fgroupscontainer
  • Loading branch information
siarheihuzarevich authored Jan 10, 2025
2 parents 3bce99c + a9856e3 commit 3e7bb3a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 36 deletions.
33 changes: 0 additions & 33 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,39 +131,6 @@
}
}
}
},
"m-render": {
"projectType": "library",
"root": "projects/m-render",
"sourceRoot": "projects/m-render/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/m-render/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/m-render/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/m-render/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "projects/m-render/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion projects/f-flow/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@foblex/flow",
"version": "17.0.2",
"version": "17.0.4",
"description": "An Angular library designed to simplify the creation and manipulation of dynamic flow. Provides components for flows, nodes, and connections, automating node manipulation and inter-node connections.",
"main": "index.js",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ export class SortItemLayersExecution implements IExecution<SortItemLayersRequest
}

public handle(request: SortItemLayersRequest): void {
this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas!.fGroupsContainer.nativeElement));
if(!this.fComponentsStore.fCanvas) {
return;
}
this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fGroupsContainer.nativeElement));
this.fMediator.send(new SortNodeLayersRequest());
this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas!.fNodesContainer.nativeElement));
this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fNodesContainer.nativeElement));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export class MinimapCalculateSvgScaleAndViewBoxExecution
}

public handle(request: MinimapCalculateSvgScaleAndViewBoxRequest): IFMinimapScaleAndViewBox {
if(!this._fFlow) {
return { scale: 1, viewBox: RectExtensions.initialize(0, 0, 0, 0) };
}

const nodesRect = this._getScaledNodesBoundingBox(request.minSize);
const minimapRect = this._getMinimapRect(request.element);
const scale = this._calculateViewScale(nodesRect, minimapRect);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export class MinimapCalculateViewBoxExecution implements IExecution<MinimapCalcu
}

public handle(request: MinimapCalculateViewBoxRequest): IRect {
if(!this._fFlow || !this._fCanvas) {
return RectExtensions.initialize();
}
return this._getRectForMinimapView();
}

Expand Down

0 comments on commit 3e7bb3a

Please sign in to comment.