gosling.js icon indicating copy to clipboard operation
gosling.js copied to clipboard

zoom-in and zoom-out buttons

Open zhangzhen opened this issue 2 years ago • 1 comments

How can I implement zooming using zoom-out and zoom-in buttons rather than using mouse scrolling?

Zhen

zhangzhen avatar Nov 26 '21 05:11 zhangzhen

I think a combination of using hgRef.current.getLocation() and gosRef.current.zoomTo() can allow implementing zoom in and out buttons.

One thing we can support in the API is something like zoomIn() and zoomOut() somewhere at https://github.com/gosling-lang/gosling.js/blob/73061be167c058a4fb18ef5dec00c87ff2d5af38/src/core/api.ts#L130

sehilyi avatar Dec 02 '21 19:12 sehilyi