We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f79f091 commit cbc4d1aCopy full SHA for cbc4d1a
1 file changed
ui/src/app/services/ui.service.ts
@@ -188,8 +188,19 @@ export class UIService extends DataService {
188
}
189
190
async setScale (scale: number) {
191
+ const oldScale = this.scale
192
this.scale = scale
- return this.request({ method: 'POST', endpoint: '/scale', data: { scale } })
193
+ let [ height, width ] = await Promise.all([
194
+ this.getHeight(),
195
+ this.getWidth()
196
+ ])
197
+ height = scale * height / oldScale
198
+ width = scale * width / oldScale
199
+ await this.request({ method: 'POST', endpoint: '/scale', data: { scale } })
200
+ await Promise.all([
201
+ this.setHeight(height),
202
+ this.setWidth(width)
203
204
205
206
async getMinHeight (): Promise<number> {
0 commit comments