UNPKG

@visactor/vtable

Version:

canvas table width high performance

27 lines (26 loc) 1.52 kB
import { TABLE_EVENT_TYPE } from "../core/TABLE_EVENT_TYPE"; export function fireMoveColEventListeners(table, endMoveColSuccess, e) { var _a, _b, _c, _d; endMoveColSuccess && -1 !== (null === (_a = table.stateManager.columnMove) || void 0 === _a ? void 0 : _a.colSource) && -1 !== (null === (_b = table.stateManager.columnMove) || void 0 === _b ? void 0 : _b.rowSource) && -1 !== (null === (_c = table.stateManager.columnMove) || void 0 === _c ? void 0 : _c.colTarget) && -1 !== (null === (_d = table.stateManager.columnMove) || void 0 === _d ? void 0 : _d.rowTarget) ? table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION) && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, { target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget }, source: { col: table.stateManager.columnMove.colSource, row: table.stateManager.columnMove.rowSource }, event: e }) : endMoveColSuccess || table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL) && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL, { target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget }, source: { col: table.stateManager.columnMove.colSource, row: table.stateManager.columnMove.rowSource }, event: e }); } //# sourceMappingURL=helper.js.map