GoogleChromeLabs/squoosh

Add a button to reset position (move to center)

開放

#292 建立於 2018年11月15日

 (7 則留言) (0 個反應) (0 位負責人)TypeScript (2,127 個分叉)batch import
UIfeature requestgood first issue

倉庫指標

星標
 (25,701 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I find it a bit annoying that zooming out can put the image in some awkward corner.

Perhaps it's a good idea to prevent the image from going too far, e.g. ensure it's (1) always visible (so you can't scroll in a way which puts it off-screen) and (2) image edges snap to splitter if taken too much to the left or right.

So if the zoom or pan results in something like this:

image

...it would just snap to this:

image

貢獻者指南