toggle active in legend, new popup used, js-changes