@visactor/vrender-core
Version:
## Description
31 lines (24 loc) • 987 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Arrow2RightSymbol = exports.arrow2Right = void 0;
const base_1 = require("./base");
function arrow2Right(ctx, r, transX, transY) {
const r2 = 2 * r;
return ctx.moveTo(transX - r, transY - r2), ctx.lineTo(transX + r, transY), ctx.lineTo(transX - r, r2 + transY),
!0;
}
exports.arrow2Right = arrow2Right;
class Arrow2RightSymbol extends base_1.BaseSymbol {
constructor() {
super(...arguments), this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.25 0 l -0.25 0.5";
}
draw(ctx, size, transX, transY) {
return arrow2Right(ctx, this.parseSize(size) / 4, transX, transY);
}
drawOffset(ctx, size, transX, transY, offset) {
return arrow2Right(ctx, this.parseSize(size) / 4 + offset, transX, transY);
}
}
exports.Arrow2RightSymbol = Arrow2RightSymbol, exports.default = new Arrow2RightSymbol;
//# sourceMappingURL=arrow2-right.js.map