Skip to content

Commit

Permalink
Update dependencies including angular 13 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Dec 17, 2021
1 parent fd5bff9 commit b253e37
Show file tree
Hide file tree
Showing 41 changed files with 28,472 additions and 37,235 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ mindmapper-frontend/LICENSE
mindmapper-frontend/node_modules
mindmapper-frontend/npm-debug.log
mindmapper-frontend/README.md
README.md
README.md
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ ca/*.crt
ca/*.pem
ca/*.key
ca/*.req

.env.prod
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.9.1-alpine3.14 as base
FROM node:16.13.1-alpine3.14 as base
# Ensuring that all npm packages and commands are executed with a non-root user
USER node

Expand Down
1 change: 1 addition & 0 deletions mindmapper-backend/src/map/controllers/maps.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class MapsGateway implements OnGatewayDisconnect {

constructor(private mapsService: MapsService, @Inject(CACHE_MANAGER) private cacheManager: Cache) {}

@SubscribeMessage('leave')
async handleDisconnect(client: Socket) {
const mapId: string = await this.cacheManager.get(client.id);
this.server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
1 change: 1 addition & 0 deletions mindmapper-frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
npm-debug.log
testem.log
/typings
/.angular

# e2e
/e2e/*.js
Expand Down
31 changes: 21 additions & 10 deletions mindmapper-frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"mindmapp": {
"mindmapper": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "mindmapp",
"prefix": "mindmapper",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
Expand Down Expand Up @@ -47,7 +47,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
Expand All @@ -60,25 +59,37 @@
"maximumError": "5mb"
}
]
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "mindmapp:build",
"browserTarget": "mindmapper:build",
"proxyConfig": "src/proxy.conf.json"
},
"configurations": {
"production": {
"browserTarget": "mindmapp:build:production"
"browserTarget": "mindmapper:build:production"
},
"development": {
"browserTarget": "mindmapper:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "mindmapp:build"
"browserTarget": "mindmapper:build"
}
},
"test": {
Expand Down Expand Up @@ -118,11 +129,11 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "mindmapp:serve"
"devServerTarget": "mindmapper:serve"
},
"configurations": {
"production": {
"devServerTarget": "mindmapp:serve:production"
"devServerTarget": "mindmapper:serve:production"
}
}
},
Expand All @@ -133,7 +144,7 @@
}
}
},
"defaultProject": "mindmapp",
"defaultProject": "mindmapper",
"cli": {
"analytics": false
}
Expand Down
9 changes: 6 additions & 3 deletions mindmapper-frontend/mmp/src/map/handlers/draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,18 @@ export default class Draw {
*/
private updateNodeNameContainer(node: Node) {
const name = node.getNameDOM(),
foreignObject: SVGForeignObjectElement = name.parentNode as SVGForeignObjectElement
foreignObject: SVGForeignObjectElement = name?.parentNode as SVGForeignObjectElement

const [width, height]: number[] = (() => {
if (name.offsetWidth !== 0) {
if (name?.offsetWidth !== 0) {
return [name.clientWidth, name.clientHeight]
} else {
} else if(node?.name?.length > 0) {
// More recent versions of firefox seem to render too late to actually fetch the width and height of the dom element.
// In these cases, try to estimate height and width before rendering
return [node.name.length * node.font.size / 1.9, node.font.size]
} else {
// default values if empty
return [20, 20]
}
})()

Expand Down
Loading

0 comments on commit b253e37

Please sign in to comment.