@antv/g2plot
Version:
G2 Plot, a market of plots built with the Grammar of Graphics'
27 lines • 871 B
JavaScript
import { __assign, __extends } from "tslib";
import { Interaction } from '@antv/g2';
var LineSelect = /** @class */ (function (_super) {
__extends(LineSelect, _super);
function LineSelect(cfg) {
return _super.call(this, __assign({ endEvent: 'click' }, cfg)) || this;
}
LineSelect.prototype.end = function (ev) {
var target = ev.target;
if (target.name === 'line') {
var data_1 = ev.data[0]._origin;
this.view.setInactive(function (obj) {
return obj !== data_1;
});
// TODO: 设置z-index
}
else {
this.view.setInactive(function () {
return false;
});
// TODO: 重置z-index
}
};
return LineSelect;
}(Interaction));
export default LineSelect;
//# sourceMappingURL=line-select.js.map