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

Add an option to select a component from the list by clicking instead of hovering #88

Closed
dhaillant opened this issue Mar 27, 2019 · 8 comments
Labels
wishlist Good to have features

Comments

@dhaillant
Copy link

I'd like to have an option that could let me select a component, from the list, only by clicking on it, not by simply hovering it.

With "hovering selection", if you slightly move your mouse over the list, the map highlights some other component. This can mislead you when assembling your board.

Thank you!
David

@qu1ck qu1ck added the wishlist Good to have features label Mar 27, 2019
@qu1ck
Copy link
Member

qu1ck commented Mar 27, 2019

I'll keep this low priority since there are already shortcuts for bom navigation. Just move mouse away from the table and use keyboard if you want to avoid accidentally switching active row.

@EeliK
Copy link

EeliK commented Mar 23, 2020

Just move mouse away from the table and use keyboard if you want to avoid accidentally switching active row.

That assumes quite much about the working environment and other restrictions of the user. I have difficulties with this issue.

@qu1ck
Copy link
Member

qu1ck commented Jun 27, 2020

This is now possible using custom js.
Create user.js file in web directory with following contents:

EventHandler.registerCallback(IBOM_EVENT_TYPES.BOM_BODY_CHANGE_EVENT, () => {
    for(var tr of bom.childNodes) {
        tr.onclick = tr.onmousemove;
        tr.onmousemove = null;
    };
});

Now highlight will be bound to click event instead of hover.

@mondalaci
Copy link

I have created ~/InteractiveHtmlBom/web/user.js with the above content, generated a new BOM, and the selection is still hover-based.

What am I missing?

(I'm using the 2.7.0 InteractiveHtmlBom.zip release.)

@qu1ck
Copy link
Member

qu1ck commented Aug 16, 2023

How are you running the plugin?

@mondalaci
Copy link

I'm unsure what you're asking exactly, but I'm using it from KiCad 7.0.7 running on Linux Mint.

@qu1ck
Copy link
Member

qu1ck commented Aug 16, 2023

So you are clicking the button (or launching from menu) in Pcbnew? If so then most likely you did not put user.js in the correct path because ~/InteractiveHtmlBom is not a path that kicad uses for plugins, unless you made a manual symlink.

You should put user.js where plugin is installed. If you installed it from kicad's plugin manager then you can get to that directory by clicking "Open package directory" in plugin manager. Navigate to plugin's folder there and then to web subfolder.

@mondalaci
Copy link

That did the trick, thanks! The correct directory on my system is ~/.local/share/kicad/7.0/scripting/plugins

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

No branches or pull requests

4 participants