@visactor/vtable
Version:
canvas table width high performance
35 lines (31 loc) • 1.79 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.fireMoveColEventListeners = void 0;
const TABLE_EVENT_TYPE_1 = require("../core/TABLE_EVENT_TYPE");
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_1.TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION) && table.fireListeners(TABLE_EVENT_TYPE_1.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_1.TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL) && table.fireListeners(TABLE_EVENT_TYPE_1.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
});
}
exports.fireMoveColEventListeners = fireMoveColEventListeners;
//# sourceMappingURL=helper.js.map