+ if (!state.startsWith("/") && !state.equals("~")) {
+ if (parent instanceof SuiteUi) {
+ SuiteUi ui = (SuiteUi) parent;
+ String currentLayerId = ui.getCurrentLayerId();
+ if (state.equals(currentLayerId))
+ return; // does nothing
+ else {
+ Map<String, Object> properties = new HashMap<>();
+ properties.put(SuiteEvent.LAYER, state);
+ ui.getCmsView().sendEvent(SuiteEvent.switchLayer.topic(), properties);
+ }
+ }
+ return;
+ }