mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 03:23:03 +00:00
bbd613206a
blueprintjs, even on v4, apparently only works on desktop targets (it uses mouse events), but I'm using yewprint for _something_ and I needed it to work on mobile devices. It seems pointer events + pointer capture is the way to go in 2023, so that's what this uses! Tested on Chrome macOS, Firefox macOS, Safari macOS, and Chrome Android and it works fine. You can drag starting from the handle or starting from anywhere on the slider itself, you can still move the pointer up/down outside the slider while holding it, focusing the handle + using arrow keys still works as before. I guess the only breaking change is that you can move the slider with a secondary mouse button now, but since PointerEvent inherits from MouseEvent it might be possible to re-add that restriction, if anyone cares about it enough.
30 lines
894 B
TOML
30 lines
894 B
TOML
[package]
|
|
name = "yewprint"
|
|
version = "0.4.3"
|
|
authors = ["Cecile Tonglet <cecile.tonglet@cecton.com>"]
|
|
edition = "2021"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "Port of blueprintjs.com to Yew"
|
|
repository = "https://github.com/yewprint/yewprint"
|
|
homepage = "https://github.com/yewprint/yewprint"
|
|
documentation = "https://docs.rs/yewprint"
|
|
readme = "README.md"
|
|
include = ["src/**/*.rs", "README.md", "LICENSE.Apache-2.0", "LICENSE.MIT"]
|
|
keywords = ["blueprint", "yew", "ui"]
|
|
categories = ["gui"]
|
|
|
|
[features]
|
|
default = ["tree"]
|
|
tree = ["id_tree"]
|
|
|
|
[dependencies]
|
|
gloo = "0.8"
|
|
id_tree = { version = "1.8", optional = true }
|
|
implicit-clone = "0.3.5"
|
|
wasm-bindgen = "0.2"
|
|
web-sys = { version = "0.3", features = ["DomRect", "Element", "Event", "HtmlSelectElement", "DomTokenList", "Element"] }
|
|
yew = "0.20"
|
|
yew-callbacks = "0.2.1"
|
|
|
|
[workspace]
|
|
members = ["yewprint-css", "yewprint-doc", "xtask"]
|