Implement hidpi for web platform (#1233)
* fix: use a 'static lifetime for the web backend's `Event` types * implement hidpi for stdweb (web-sys wip?) * fix: make all canvas resizes go through backend::set_canvas_size * update Window docs for web, make `inner/outer_position` return the position in the viewport
This commit is contained in:
parent
28a20aec10
commit
777d9edeaa
11 changed files with 137 additions and 91 deletions
|
|
@ -10,7 +10,7 @@ impl Handle {
|
|||
}
|
||||
|
||||
pub fn position(&self) -> PhysicalPosition<i32> {
|
||||
PhysicalPosition { x: 0.0, y: 0.0 }
|
||||
PhysicalPosition { x: 0, y: 0 }
|
||||
}
|
||||
|
||||
pub fn name(&self) -> Option<String> {
|
||||
|
|
@ -19,8 +19,8 @@ impl Handle {
|
|||
|
||||
pub fn size(&self) -> PhysicalSize<u32> {
|
||||
PhysicalSize {
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
width: 0,
|
||||
height: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue