Skip to content

Commit 7094171

Browse files
committed
Enable dragging toolbars in Eye Gaze Mode
I added this restriction originally because: - It's in the way when it comes to dwell clicking. Highlighting the whole toolbar is confusing and distracting when you're just trying to select tools (or colors). The dwell clicker's `targets` filter takes care of that. - I probably didn't want to deal with the component scaling when calculating the rectangles for drag previews. - The floating buttons get cut off when the tool box is undocked, since it collapses the left docking area. (I still need to deal with this.) ...but the situation has changed: - The monolithic "Eye Gaze Mode" feature is being broken up into more granular features, and for a granular feature of "dwell clicking", it feels weirder to restrict something like this. - Toggling Eye Gaze Mode no longer resets the tool box position, since commit 796c145. - This let it become "stuck" in a non-uniform state. (I failed to fully consider resetting the docking state as a reason that I was destroying and recreating the components.) - It also let the tool box stay undocked as a tool window, but with this restriction, dragging the tool window by its title bar was blocked, despite supporting dragging other windows, and despite the dwell clicker visibly targeting all title bars, making it inconsistent. - I've implemented handling for scaled components when previewing drags. (It wasn't actually that complicated, but it's easy to imagine not wanting to think about it.) It feels right to remove the restriction, when using the mouse.
1 parent 95d2f56 commit 7094171

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/$Component.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ function $Component(title, className, orientation, $el) {
303303
$(e.target).closest("button").length === 0
304304
);
305305
if (!validTarget) { return; }
306-
// Don't allow dragging in eye gaze mode
307-
if ($("body").hasClass("eye-gaze-mode")) { return; }
308306

309307
const docked = imagine_docked_dimensions();
310308
const rect = $c[0].getBoundingClientRect();

0 commit comments

Comments
 (0)