This commit is contained in:
Kovid Goyal 2020-08-31 14:42:53 +05:30
parent 39dede0a58
commit 3d685b46b9
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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)