web: forced quote-props

This commit is contained in:
Maxim Devaev
2022-11-18 02:58:55 +03:00
parent 2b8cc93362
commit 0f4e736185
6 changed files with 65 additions and 62 deletions

View File

@@ -123,10 +123,10 @@ export function Ocr(__getGeometry) {
let rel_bottom = Math.max(__start_pos.y, __end_pos.y) - rect.top + offset;
let geo = __getGeometry();
__selection = {
left: tools.remap(rel_left, geo.x, geo.width, 0, geo.real_width),
right: tools.remap(rel_right, geo.x, geo.width, 0, geo.real_width),
top: tools.remap(rel_top, geo.y, geo.height, 0, geo.real_height),
bottom: tools.remap(rel_bottom, geo.y, geo.height, 0, geo.real_height),
"left": tools.remap(rel_left, geo.x, geo.width, 0, geo.real_width),
"right": tools.remap(rel_right, geo.x, geo.width, 0, geo.real_width),
"top": tools.remap(rel_top, geo.y, geo.height, 0, geo.real_height),
"bottom": tools.remap(rel_bottom, geo.y, geo.height, 0, geo.real_height),
};
} else {
__selection = null;
@@ -140,8 +140,8 @@ export function Ocr(__getGeometry) {
let geo = __getGeometry();
let offset = __getNavbarOffset();
return {
x: Math.min(Math.max(event.clientX, rect.left + geo.x), rect.right - geo.x),
y: Math.min(Math.max(event.clientY - offset, rect.top + geo.y - offset), rect.bottom - geo.y - offset),
"x": Math.min(Math.max(event.clientX, rect.left + geo.x), rect.right - geo.x),
"y": Math.min(Math.max(event.clientY - offset, rect.top + geo.y - offset), rect.bottom - geo.y - offset),
};
};