TransitionbyDesign / homemaker

GNU Affero General Public License v3.0
0 stars 1 forks source link

Hover over icon reveals pop up box. #80

Open wu-lee opened 3 years ago

wu-lee commented 3 years ago

Hover over icon reveals pop up box. Move hover away and box disappears. Click box and box persists.

wu-lee commented 3 years ago

I think this is working fairly satisfactorily. It's more complicated than it sounds because:

There do seem to be odd effects sometimes if you skim around too fast, some events seem never to get handled. But I don't think that's easily resolved, and they don't seem bad enough to ruin the functionality. Just click again.

TransitionbyDesign commented 3 years ago

Looks fine to me from trying it

On Wed, 7 Apr 2021 at 22:17, wu-lee @.***> wrote:

I think this is working fairly satisfactorily. It's more complicated than it sounds because:

  • We want to retain selection on click, so we have to ignore mouse-out events if a pin is selected, else the pop-up disappears
  • Selecting elsewhere should clear the selected pin (so that we return to show-on-hover behaviour)
  • But we don't show on region hover: regions could be large, and we could be triggering the pop-up excessively, e.g. when brushing the region
  • However, selecting a region should still clear the selected pin
  • We really don't want auto-pan on hover: this makes the pins zip uncontrollably, so disable that option
  • But this clobbers auto-pan on click too: so we have to restore that with a workaround (this was fiddly, and requires use of the private _adjustPan method which may not be guaranteed to exist in future implementations, but contains some complicated logic to find the bounds of the popup I don't want to duplicate)

There do seem to be odd effects sometimes if you skim around too fast, some events seem never to get handled. But I don't think that's easily resolved, and they don't seem bad enough to ruin the functionality. Just click again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TransitionbyDesign/homemaker/issues/80#issuecomment-815270890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQVLMZ7EVXBRBQJVZ5POUELTHTDXFANCNFSM42RRCI6A .

Charlie-TbD commented 3 years ago

Ideal operation: Pop up stays visible until another pin is hovered, pin is clicked, x is clicked, or out of pop up clicked.