We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40df267 commit 4585963Copy full SHA for 4585963
src/Controls.ts
@@ -155,7 +155,7 @@ export class Controls {
155
background.tileScale.set(scale);
156
});
157
158
- select<Element, unknown>("canvas")
+ const selection = select<Element, unknown>("canvas")
159
.call(zoomHandler)
160
.on("dblclick.zoom", null)
161
.on("click", () => {
@@ -174,6 +174,8 @@ export class Controls {
174
.on("contextmenu", (_event: MouseEvent) => {
175
Controls.flag();
176
177
+
178
+ zoomHandler.translateTo(selection, 0, 0);
179
}
180
181
// todo create method on the parent which applies transform instead of mutating the object directly.
0 commit comments