Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hover trigger is offset to left #3

Open
Abenezer opened this issue Apr 10, 2018 · 2 comments
Open

hover trigger is offset to left #3

Abenezer opened this issue Apr 10, 2018 · 2 comments

Comments

@Abenezer
Copy link

far right dock items are not interactive (maginiable ) onclick works but they wont maginfy when mouse is over. plus maginication area of far left trigger maginification even when not directly over the dock items . it seems there is some kind of offset.
here is my file
<Dock width={400} magnification={2} magnifyDirection="up" debug={true} className="dock" backgroundClassName="dock-background"> {["a", "b", "c", "d", "e"].map((item, index) => ( <Dock.Item className="dock.item" key={index} onClick={() => console.log(item)}> <img src={${item}.png} /> </Dock.Item> ))} </Dock>

it works as expected if i set the width to 800 but its too big for me

@Abenezer
Copy link
Author

after turning on the debug i can see there is an offset.... and to correct it, the width should be proportional to the content of the dock (total width of number of elements) . am not sure this is the intended behavior but in my case i have to increase the width if i add extra elements. kind of difficult for dynamic content (i am pulling dock elements from server)

@Abenezer
Copy link
Author

Abenezer commented Apr 10, 2018

i resolve it by adding display: flex; on immediate parent element .. i think you should included it in the docs or you can just close this issues if it's that obvious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant