mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:13:04 +02:00
...
This commit is contained in:
parent
39dede0a58
commit
3d685b46b9
1 changed files with 8 additions and 8 deletions
|
|
@ -35,14 +35,14 @@ def map_boundary(b):
|
|||
x_offset = 0
|
||||
y_offset = 0
|
||||
if not vertical:
|
||||
# Horizontal LTR
|
||||
if not rtl:
|
||||
if b.selected_prev:
|
||||
x_offset = b.width
|
||||
# Horizontal RTL
|
||||
else:
|
||||
if rtl:
|
||||
# Horizontal RTL
|
||||
if not b.selected_prev:
|
||||
x_offset = b.width
|
||||
else:
|
||||
# Horizontal LTR
|
||||
if b.selected_prev:
|
||||
x_offset = b.width
|
||||
else:
|
||||
# Vertical:
|
||||
if b.selected_prev:
|
||||
|
|
@ -642,7 +642,7 @@ def update_position(self, dragged_handle):
|
|||
self.end_handle.style.display = 'none'
|
||||
self.editor.style.display = 'none'
|
||||
|
||||
if not cs or cs.empty or jstype(cs.drag_mouse_position.x) is 'number' or cs.selection_change_caused_by_search:
|
||||
if not cs or cs.empty or jstype(cs.drag_mouse_position?.x) is 'number' or cs.selection_change_caused_by_search:
|
||||
return self.hide()
|
||||
|
||||
if not cs.start.onscreen and not cs.end.onscreen:
|
||||
|
|
@ -719,7 +719,7 @@ def place_single_handle(self, selection_size, handle, boundary, is_start):
|
|||
|
||||
# Cap this to prevent very large handles when selecting images.
|
||||
selection_size = min(60, selection_size)
|
||||
|
||||
|
||||
if not self.vertical:
|
||||
height = selection_size * 2
|
||||
width = int(height * 2 / 3)
|
||||
|
|
|
|||
Loading…
Reference in a new issue