mirror of
https://github.com/zadam/trilium.git
synced 2025-01-07 15:49:01 +08:00
zoom fix
This commit is contained in:
parent
a2434f200e
commit
f33f99134b
1 changed files with 3 additions and 16 deletions
|
@ -121,17 +121,13 @@ function initPanZoom() {
|
|||
});
|
||||
|
||||
if (mapData.transform) {
|
||||
console.log(mapData.transform);
|
||||
|
||||
pz.moveTo(mapData.transform.x, mapData.transform.y);
|
||||
pz.zoomTo(0, 0, mapData.transform.scale);
|
||||
pz.moveTo(mapData.transform.x, mapData.transform.y);
|
||||
}
|
||||
|
||||
pz.on('zoom', function (e) {
|
||||
mapData.transform = pz.getTransform();
|
||||
|
||||
console.log(mapData.transform);
|
||||
|
||||
saveData();
|
||||
});
|
||||
|
||||
|
@ -141,17 +137,8 @@ function initPanZoom() {
|
|||
saveData();
|
||||
}, true);
|
||||
|
||||
$zoomInButton.click(() => {
|
||||
const transform = pz.getTransform();
|
||||
|
||||
pz.zoomTo(0, 0, 1.2);
|
||||
});
|
||||
|
||||
$zoomOutButton.click(() => {
|
||||
const transform = pz.getTransform();
|
||||
|
||||
pz.zoomTo(0, 0, 0.8);
|
||||
});
|
||||
$zoomInButton.click(() => pz.zoomTo(0, 0, 1.2));
|
||||
$zoomOutButton.click(() => pz.zoomTo(0, 0, 0.8));
|
||||
}
|
||||
|
||||
async function initJsPlumb () {
|
||||
|
|
Loading…
Reference in a new issue