fin-hypergrid / fin-hypergrid/core

Canvas selection is confused when zoom styling property is used

Open
#618 2 comments 0 reactions 0 assignees View on GitHub
bug Open Discussions
Dominant language
JavaScript
Stars
907
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm using media queries with zoom property and it's confusing cell selection within the canvas.

Here's a snippet to replicate the case:
```







TEST






var grid = new fin.Hypergrid('#fin-grid', {
data: [
{ 'symbol':'APPL', 'name':'Apple Inc.', 'prevclose':'93.13' },
{ 'symbol':'MSFT', 'name':'Microsoft Corporation', 'prevclose':'51.91' },
{ 'symbol':'TSLA', 'name':'Tesla Motors Inc.', 'prevclose':'196.40' },
{ 'symbol':'IBM', 'name':'International Business Machines Corp', 'prevclose':'155.35' }
]
});



```
To select the first data row, you need to have the cursor on the third data row. Horizontal offset can also be affected with a more complex setup.
It would seem that this.canvas.getBoundingClientRect() does not return an accurate ClientRect anymore.
Any idea how to cope?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.