How can I detect a chosen Isotope layout option from within Javascript to generate appropriate layout?

The established technique of passing data to JavaScript in WordPress is wp_localize_script(). Despite the name it’s widely used for arbitrary data, outside of localization purposes.

So it is certainly possible to retrieve the necessary data and pass it to the script in this way.

error code: 523