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