Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX] Gesture manager: add paged zoom gestures #4610

Merged
merged 2 commits into from Feb 20, 2019

Conversation

Projects
None yet
2 participants
@Frenzie
Copy link
Member

Frenzie commented Feb 17, 2019

References #4333.

@Frenzie Frenzie added the UX label Feb 17, 2019

@poire-z

This comment has been minimized.

Copy link
Contributor

poire-z commented Feb 17, 2019

self.ui.zooming will be nil when reading epub, so these gestures will crash I guess.

@Frenzie

This comment has been minimized.

Copy link
Member Author

Frenzie commented Feb 18, 2019

True, it should just use events. The weird thing is that function triggers two of them.

function ReaderZooming:setZoomMode(mode)
self.ui:handleEvent(Event:new("SetZoomMode", mode))
self.ui:handleEvent(Event:new("InitScrollPageStates"))
end

It would seem to me that the handler should send that second event if it's required or something but there's probably a good reason it's separated…

function ReaderZooming:onSetZoomMode(new_mode)
self.view.zoom_mode = new_mode
if self.zoom_mode ~= new_mode then
logger.info("setting zoom mode to", new_mode)
self.ui:handleEvent(Event:new("ZoomModeUpdate", new_mode))
self.zoom_mode = new_mode
self:setZoom()
end
end

@Frenzie Frenzie merged commit a2c47b3 into koreader:master Feb 20, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@Frenzie Frenzie deleted the Frenzie:more-gestures branch Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.