Pauan / rust-dominator

Zero-cost ultra-high-performance declarative DOM library using FRP signals for Rust!
MIT License
960 stars 62 forks source link

Offset_x method for MouseEvent #54

Closed eribol closed 2 years ago

eribol commented 2 years ago

I am tring to create a simple paint example with Zoon(rust wasm frontend). And in my example, i want to get canvas coordinate. I tried screen_x(which it was wrong), mouse_x, x methods but all of them was not fit my use case. And i found an example with pure rust wasm example here. In this example, it uses offset_x and offset_y for drawing a line with mouse moves but i could not find that method on events::MouseDown

Pauan commented 2 years ago

I just hadn't added them in yet. I just now published version 0.5.22 which adds in movement_x, movement_y, page_x, page_y, offset_x, and offset_y.