@visactor/vchart
Version:
charts lib based @visactor/VGrammar
41 lines (34 loc) • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.registerLinkPathMark = exports.LinkPathMark = void 0;
const factory_1 = require("./../core/factory"), base_mark_1 = require("./base/base-mark"), vgrammar_core_1 = require("@visactor/vgrammar-core");
class LinkPathMark extends base_mark_1.BaseMark {
constructor() {
super(...arguments), this.type = LinkPathMark.type;
}
_getDefaultStyle() {
return Object.assign(Object.assign({}, super._getDefaultStyle()), {
x: 0,
y: 0,
x0: 0,
y0: 0,
x1: 100,
y1: 100,
thickness: 1,
round: !0
});
}
_initProduct(group) {
const view = this.getVGrammarView(), id = this.getProductId(), direction = this.getStyle("direction");
this._product = view.glyph("linkPath", null != group ? group : view.rootMark).id(id).configureGlyph({
direction: direction
}), this._compiledProductId = id;
}
}
exports.LinkPathMark = LinkPathMark, LinkPathMark.type = "linkPath";
const registerLinkPathMark = () => {
(0, vgrammar_core_1.registerLinkPathGlyph)(), factory_1.Factory.registerMark(LinkPathMark.type, LinkPathMark);
};
exports.registerLinkPathMark = registerLinkPathMark;
//# sourceMappingURL=link-path.js.map