hjyssg / ShiguReader

硬核宅宅资源管理器. Ultimate Manga Resource Manager
MIT License
400 stars 45 forks source link

调整图片大小后一翻页就恢复默认了,如何保存设置? #113

Closed boiio closed 3 years ago

hjyssg commented 3 years ago

这个恢复大小是默认行为。 你可以在user-config.js加一个新选项,然后修改onebook.js的代码实现你要的效果。最后再提个pull request

boiio commented 3 years ago

建议提供几个缩放模式,如MangaMeeya里提供的 image

boiio commented 3 years ago

这个恢复大小是默认行为。 你可以在user-config.js加一个新选项,然后修改onebook.js的代码实现你要的效果。最后再提个pull request

谢谢回复,研究一下代码看看我能不能实现

hjyssg commented 3 years ago

重新造轮子好麻烦啊。。。 你可以挑战一下吧 (或者支付宝转2000块给我,我来写)

boiio commented 3 years ago

重新造轮子好麻烦啊。。。 你可以挑战一下吧 ~(或者支付宝转2000块给我,我来写)~

哈哈哈太难了,我就改了保存缩放大小的部分,已提pull request,缩放模式还是等别的大神吧

hjyssg commented 3 years ago

给你review了,你改一下哦。

boiio commented 3 years ago

给你review了,你改一下哦。

已修改

hjyssg commented 3 years ago

https://github.com/hjyssg/ShiguReader/pull/120

boiio commented 3 years ago

120

我看了你改之后的代码,zoom_scale的基准应该是按getMaxHeight()来计算吧 如果以imgTrueHeight来计算,两张高宽比例相同,imgTrueHeight不同的两张图片显示的效果就不一样了 最后调整也应该按你计算过set集里值zoom_scale而不是imgTrueHeightzoom_scale。

语法的问题没写过React没注意过,我这边是调试能跑通就提PR了,不好意思

hjyssg commented 3 years ago

无所谓啦。我等有心情把这些config写到前端上。

boiio notifications@github.com于2020年12月5日 周六16:04写道:

120 https://github.com/hjyssg/ShiguReader/pull/120

我看了你改之后的代码,zoom_scale的基准应该是按getMaxHeight()来计算吧

如果以imgTrueHeight来计算,两张高宽比例相同,imgTrueHeight不同的两张图片显示的效果就不一样了

最后调整也应该按你计算过set集里值zoom_scale而不是imgTrueHeightzoom_scale。

语法的问题没写过React没注意过,我这边是调试能跑通就提PR了,不好意思

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/hjyssg/ShiguReader/issues/113#issuecomment-739142343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAW6RU2ZYOR5PNCJNSV7GBDSTHSRPANCNFSM4ULKS5HA .