Skip to content

Commit

Permalink
remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
mskasal committed Feb 16, 2024
1 parent c48ee67 commit b408cd5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
13 changes: 4 additions & 9 deletions assets/ocr.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ function __wbg_get_imports() {
imports.wbg.__wbg_stroke_31f20cb8d85be0b9 = function(arg0) {
getObject(arg0).stroke();
};
imports.wbg.__wbg_closePath_240300392d2c2074 = function(arg0) {
getObject(arg0).closePath();
};
imports.wbg.__wbg_lineTo_3fcfab7d5f3282a0 = function(arg0, arg1, arg2) {
getObject(arg0).lineTo(arg1, arg2);
};
Expand Down Expand Up @@ -352,14 +355,6 @@ function __wbg_get_imports() {
const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_x_60f7ac8d9d9cfa25 = function(arg0) {
const ret = getObject(arg0).x;
return ret;
};
imports.wbg.__wbg_y_3d88d3502b8ca0ae = function(arg0) {
const ret = getObject(arg0).y;
return ret;
};
imports.wbg.__wbg_offsetX_72778aba0c4b5674 = function(arg0) {
const ret = getObject(arg0).offsetX;
return ret;
Expand Down Expand Up @@ -424,7 +419,7 @@ function __wbg_get_imports() {
imports.wbg.__wbindgen_rethrow = function(arg0) {
throw takeObject(arg0);
};
imports.wbg.__wbindgen_closure_wrapper42 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper41 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 3, __wbg_adapter_16);
return addHeapObject(ret);
};
Expand Down
Binary file modified assets/ocr_bg.wasm
Binary file not shown.
10 changes: 1 addition & 9 deletions ocr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ pub fn ocr() -> Result<(), JsValue> {
move |event: web_sys::MouseEvent| match event.type_().as_str() {
"mouseup" => {
is_drawing = false;
context.close_path();
}
"mousedown" => {
is_drawing = true;
Expand All @@ -295,15 +296,6 @@ pub fn ocr() -> Result<(), JsValue> {
}
"mousemove" => {
if is_drawing == true {
log(format!(
"mouse moving x: {}, y: {}, x-os:{}, y-os:{}, type: {}",
event.x().to_string(),
event.y().to_string(),
event.offset_x().to_string(),
event.offset_y().to_string(),
event.type_()
)
.as_str());
context.line_to((event.offset_x()) as f64, (event.offset_y()) as f64);
context.stroke();
}
Expand Down

0 comments on commit b408cd5

Please sign in to comment.