File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,6 @@ import { store } from 'quasar/wrappers'
260
260
}
261
261
262
262
}
263
- console .log (chart .getZoom ,chart .getPan ,startPan .value )
264
263
chart .updatePan (startPan .value )
265
264
// do nothing
266
265
}
Original file line number Diff line number Diff line change 357
357
// panZoom.value.resize()
358
358
let s = panZoom .value .getSizes ();
359
359
let z = store .zoom
360
+ let zHeight = 1
361
+ let cor = 0 ;
362
+ if (newPan .diagram .height > s .height ){
363
+ zHeight = s .height / newPan .diagram .height
364
+ cor = (1 - zHeight);
365
+ } else {
366
+ cor = 0.04
367
+ }
360
368
if (newPan .diagram .width > s .width ){
361
369
z = s .width / newPan .diagram .width
370
+
362
371
}
363
- if (newPan .diagram .height > s .height ){
364
- z = s .height / newPan .diagram .height
365
- }
372
+ z = z - cor
366
373
const p = panZoom .value .getPan ()
367
374
const pan = {
368
375
x: p .x - (s .width / 2 ),
369
376
y: p .y - (s .height / 2 )
370
377
}
371
- z = z - 0.04 ;
378
+ z = z;
372
379
store .$patch ({
373
380
pan: pan,
374
381
zoom: z
You can’t perform that action at this time.
0 commit comments