@expofp/floorplan
Version:
Interactive floor plan library for expos and events
2 lines (1 loc) • 642 B
JavaScript
import{runInAction as n,when as a}from"mobx";import e from"../../store";import{getPtScaleZoomRatio as i}from"./kiosk-record";export function integrateKioskIntoMap(t,o){t&&n(()=>{if(e.uiState.setKioskData(t),e.uiState.kiosk=o,e.maplibreStore.showMaplibre)return;e.uiState.setMapSettings({centerxy:`${t.mapCenterX},${t.mapCenterY}`,z:t.z??void 0,bearing:t.mapRollDegrees});const r=i(t);r!==void 0&&e.uiState.changeZoom(r)})}export function integrateKioskIntoWf(t){t&&(t.z!=null&&e.fp.activateFloor({name:t.z.toString()}),a(()=>!!e.uiState.selectedRoute,()=>{const o=e.uiState.selectedRoute;o?.to&&!o.from&&e.routeStore.selectRoute(o,!1,!0)}))}