mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
TSK-1405: Fix hover selection (#3109)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
45bdad87b9
commit
964978b783
@ -89,6 +89,7 @@
|
||||
class:selection={selection !== undefined ? objects[selection]?._id === object._id : false}
|
||||
class:checked={checkedSet.has(object._id)}
|
||||
on:mouseover={mouseAttractor(() => dispatch('obj-focus', object))}
|
||||
on:mouseenter={mouseAttractor(() => dispatch('obj-focus', object))}
|
||||
on:focus={() => {}}
|
||||
on:contextmenu={(evt) => showMenu(evt, object)}
|
||||
draggable={true}
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { resizeObserver } from '..'
|
||||
import { mouseAttractor, resizeObserver } from '..'
|
||||
|
||||
export let selection: number = 0
|
||||
export let count: number
|
||||
@ -72,7 +72,8 @@
|
||||
<div
|
||||
class="list-item{addClass ? ` ${addClass}` : ''}"
|
||||
class:selection={row === selection}
|
||||
on:mouseover={() => onRow(row)}
|
||||
on:mouseover={mouseAttractor(() => onRow(row))}
|
||||
on:mouseenter={mouseAttractor(() => onRow(row))}
|
||||
on:focus={() => {}}
|
||||
bind:this={refs[row]}
|
||||
on:click={() => dispatch('click', row)}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script lang="ts">
|
||||
import type { Asset, IntlString } from '@hcengineering/platform'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { deviceOptionsStore, resizeObserver } from '..'
|
||||
import { deviceOptionsStore, mouseAttractor, resizeObserver } from '..'
|
||||
import { createFocusManager } from '../focus'
|
||||
import type { AnySvelteComponent } from '../types'
|
||||
import EditBox from './EditBox.svelte'
|
||||
@ -151,7 +151,8 @@
|
||||
class="menu-item w-full"
|
||||
on:click={() => dispatch('close', item.id)}
|
||||
on:focus={() => dispatch('update', item)}
|
||||
on:mouseover={() => dispatch('update', item)}
|
||||
on:mouseover={mouseAttractor(() => dispatch('update', item))}
|
||||
on:mouseenter={mouseAttractor(() => dispatch('update', item))}
|
||||
>
|
||||
<div class="flex-row-center" class:mt-2={huge} class:mb-2={huge}>
|
||||
{#if hasSelected}
|
||||
|
@ -34,8 +34,6 @@
|
||||
id={category._id}
|
||||
style:transform={category._id === tracker.issueStatusCategory.Started ? 'rotate(-90deg)' : ''}
|
||||
viewBox="0 0 16 16"
|
||||
stroke-width={0.75}
|
||||
stroke={fill}
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
{#if category._id === tracker.issueStatusCategory.Backlog}
|
||||
|
@ -279,6 +279,7 @@
|
||||
class:fixed={row === selection}
|
||||
class:selected={row === selection}
|
||||
on:mouseover={mouseAttractor(() => onRow(object))}
|
||||
on:mouseenter={mouseAttractor(() => onRow(object))}
|
||||
on:focus={() => {}}
|
||||
bind:this={refs[row]}
|
||||
on:contextmenu|preventDefault={(ev) => {
|
||||
|
@ -425,6 +425,7 @@
|
||||
on:contextmenu={(event) => handleMenuOpened(event, docObject)}
|
||||
on:focus={() => {}}
|
||||
on:mouseover={mouseAttractor(() => handleRowFocused(docObject))}
|
||||
on:mouseenter={mouseAttractor(() => handleRowFocused(docObject))}
|
||||
{props}
|
||||
on:on-mount={() => {
|
||||
wasLoaded = true
|
||||
|
Loading…
Reference in New Issue
Block a user