Is it possible to make jarchi scripts run with hot buttons?

Started by margolyesh, December 05, 2022, 10:01:40 AM

Previous topic - Next topic

Phil Beauvoir

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

margolyesh

Hi, Phil!

When jArchi1.4 will be available in Patreon?

Phil Beauvoir

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

margolyesh

Cool!

$(selection).each(function(elm) {
    elm.bounds = {y: elm.bounds.y+5};
})

Small script, big convenience.
Four small scripts, very big convenience.

How do I make more than 10 hotkeys for scripts?

Phil Beauvoir

#5
> How do I make more than 10 hotkeys for scripts?

You don't. See comments in https://github.com/archimatetool/archi-scripting-plugin/issues/62#issuecomment-1324902013

Alternative code:

selection.each(function(elm) {
    if(elm.bounds) {
        elm.bounds = {y: elm.bounds.y + 5};
    }
})
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.