Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5850030

Browse files
committedJul 12, 2022
rename enable_web_scroll -> enable_web_page_scroll
1 parent bd48572 commit 5850030

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ And please only add new entries to the top of this list, right below the `# Unre
2626
- Added `Window::is_decorated`.
2727
- On X11, fix for repeated event loop iteration when `ControlFlow` was `Wait`
2828
- On X11, fix scale factor calculation when the only monitor is reconnected
29-
- On web, by default, when the canvas is focused, scrolling of the webpage is disabled. It can however be enabled via the `WindowBuilderExtWebSys::enable_web_scroll` method.
29+
- On web, by default, when the canvas is focused, scrolling of the webpage is disabled. It can however be enabled via the `WindowBuilderExtWebSys::enable_web_page_scroll` method.
3030
- On Wayland, report unaccelerated mouse deltas in `DeviceEvent::MouseMotion`.
3131
- On Web, a focused event is manually generated when a click occurs to emulate behaviour of other backends.
3232
- **Breaking:** Bump `ndk` version to 0.6, ndk-sys to `v0.3`, `ndk-glue` to `0.6`.

‎src/platform/web.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ pub trait WindowBuilderExtWebSys {
2424
///
2525
/// So only call this method if you know that you will never need to handle mouse wheel inputs
2626
/// or click and dragging.
27-
fn enable_web_scroll(self) -> Self;
27+
fn enable_web_page_scroll(self) -> Self;
2828

2929
fn with_canvas(self, canvas: Option<HtmlCanvasElement>) -> Self;
3030
}
3131

3232
impl WindowBuilderExtWebSys for WindowBuilder {
33-
fn enable_web_scroll(mut self) -> Self {
34-
self.platform_specific.enable_web_scroll = true;
33+
fn enable_web_page_scroll(mut self) -> Self {
34+
self.platform_specific.enable_web_page_scroll = true;
3535

3636
self
3737
}

‎src/platform_impl/web/web_sys/canvas.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl Canvas {
7878
wants_fullscreen: Rc::new(RefCell::new(false)),
7979
};
8080

81-
let disable_web_scroll = if !attr.enable_web_scroll {
81+
let disable_web_scroll = if !attr.enable_web_page_scroll {
8282
Some([
8383
common.add_event("pointermove", move |event: Event| {
8484
event.prevent_default();

‎src/platform_impl/web/window.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,5 +395,5 @@ impl From<u64> for WindowId {
395395
#[derive(Default, Clone)]
396396
pub struct PlatformSpecificWindowBuilderAttributes {
397397
pub(crate) canvas: Option<backend::RawCanvasType>,
398-
pub(crate) enable_web_scroll: bool,
398+
pub(crate) enable_web_page_scroll: bool,
399399
}

0 commit comments

Comments
 (0)
Please sign in to comment.