@@ -42,7 +42,7 @@ pub fn init_to(id: &str) -> Result<(), DivError> {
4242/// ```
4343pub fn init_ex_with_element (
4444 root : Element ,
45- pos : ( u32 , u32 ) ,
45+ pos : ( i32 , i32 ) ,
4646 size : Option < ( u32 , u32 ) > ,
4747) -> Result < ( ) , DivError > {
4848 state:: set_state ( GlobalState {
@@ -69,7 +69,7 @@ pub fn init_ex_with_element(
6969/// ```
7070pub fn init_ex (
7171 id : Option < & str > ,
72- pos : ( u32 , u32 ) ,
72+ pos : ( i32 , i32 ) ,
7373 size : Option < ( u32 , u32 ) > ,
7474) -> Result < ( ) , DivError > {
7575 let root = get_root ( id) ?;
@@ -89,7 +89,7 @@ fn get_root(id: Option<&str>) -> Result<Element, DivError> {
8989
9090/// Creates a new div at the defined position with the given HTML as content.
9191/// Use the returned DivHandle to manipulate the div.
92- pub fn new ( x : u32 , y : u32 , w : u32 , h : u32 , html : & str ) -> Result < DivHandle , DivError > {
92+ pub fn new ( x : i32 , y : i32 , w : u32 , h : u32 , html : & str ) -> Result < DivHandle , DivError > {
9393 let css = "" ;
9494 let classes = "" ;
9595 state:: exec_mut ( |state| state. new_pane ( x, y, w, h, html, css, classes) )
@@ -117,8 +117,8 @@ pub fn new(x: u32, y: u32, w: u32, h: u32, html: &str) -> Result<DivHandle, DivE
117117/// ).unwrap();
118118/// ```
119119pub fn new_styled < ' a , C , CSS , S1 , S2 , S3 > (
120- x : u32 ,
121- y : u32 ,
120+ x : i32 ,
121+ y : i32 ,
122122 w : u32 ,
123123 h : u32 ,
124124 html : & str ,
@@ -155,8 +155,8 @@ where
155155/// The most direct way would be to use `wasm_bindgen_futures::spawn_local`
156156/// ## Example
157157/// ```rust
158- /// const X: u32 = 100;
159- /// const Y: u32 = 100;
158+ /// const X: i32 = 100;
159+ /// const Y: i32 = 100;
160160/// const W: u32 = 500;
161161/// const H: u32 = 500;
162162/// let future = async {
@@ -186,8 +186,8 @@ pub fn load_js_classes(
186186
187187/// Creates a new div and fills it with a JS class.
188188pub fn from_js_class (
189- x : u32 ,
190- y : u32 ,
189+ x : i32 ,
190+ y : i32 ,
191191 w : u32 ,
192192 h : u32 ,
193193 class_handle : JsClassHandle ,
0 commit comments