diff options
author | 2021-02-18 10:55:11 +0100 | |
---|---|---|
committer | 2021-02-18 10:55:11 +0100 | |
commit | f333557c8bf0a74eb7b88d6294dea2a420b1ec61 (patch) | |
tree | 696dabd7e02e97f53ff936e54543a31944696c3d /sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts | |
parent | 5cf15b27796b68b3edbfc1e59f258dee1e10b2b9 (diff) |
Update NetworkMap and LinkCalculator
Update NetworkMap and LinkCalculator to use the topology-server-v2 API, minior bugfixes for NetworkMap
Issue-ID: CCSDK-3172
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: Ia5690c5039d7a9431443bc131fe398cc79d08287
Diffstat (limited to 'sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts index dcac9c9c2..deb366e09 100644 --- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts +++ b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts @@ -16,17 +16,18 @@ * ============LICENSE_END========================================================================== */ +import { PopupElement } from 'model/popupElements'; import { IActionHandler } from '../../../../framework/src/flux/action'; import { SelectMultipleLinksAction, SelectMultipleSitesAction, SetPopupPositionAction } from "../actions/popupActions"; export type popupStoreState = { - selectionPendingForIds: string[], + selectionPendingForElements: PopupElement[], pendingDataType: "link"|"site"| "", position: { top: number, left: number } }; const initialState: popupStoreState = { - selectionPendingForIds: [], + selectionPendingForElements: [], pendingDataType: "", position: { top: 0, left: 0 } }; @@ -34,10 +35,10 @@ const initialState: popupStoreState = { export const PopupsReducer: IActionHandler<popupStoreState> = (state = initialState, action) => { if(action instanceof SelectMultipleLinksAction){ - state = Object.assign({}, state, { selectionPendingForIds: action.ids, pendingDataType: "link", isSelectionNeeded: true }); + state = Object.assign({}, state, { selectionPendingForElements: action.elements, pendingDataType: "link", isSelectionNeeded: true }); }else if(action instanceof SelectMultipleSitesAction){ - state = Object.assign({}, state, { selectionPendingForIds: action.ids, pendingDataType: "site", isSelectionNeeded: true }); + state = Object.assign({}, state, { selectionPendingForElements: action.elements, pendingDataType: "site", isSelectionNeeded: true }); }else if(action instanceof SetPopupPositionAction){ state= Object.assign({}, state, {position:{top:action.top, left: action.left}}) |