in packages/ketcher-core/src/application/render/draw.ts [106:300]
function arrow(
paper: RaphaelPaper,
item: ArrowItem,
length: number,
angle: number,
options: RenderOptions,
isResizing: boolean,
) {
const shouldApplySnappingStyle =
isResizing &&
['0', '-0', '90', '-90', '180', '-180'].includes(angle.toFixed());
switch (item.mode) {
case RxnArrowMode.OpenAngle: {
return arrowOpenAngle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.FilledTriangle: {
return arrowFilledTriangle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.FilledBow: {
return arrowFilledBow(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.DashedOpenAngle: {
return arrowDashedOpenAngle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.Failed: {
return arrowFailed(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.Retrosynthetic: {
return arrowRetrosynthetic(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.BothEndsFilledTriangle: {
return arrowBothEndsFilledTriangle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EquilibriumFilledHalfBow: {
return arrowEquilibriumFilledHalfBow(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EquilibriumFilledTriangle: {
return arrowEquilibriumFilledTriangle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EquilibriumOpenAngle: {
return arrowEquilibriumOpenAngle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.UnbalancedEquilibriumFilledHalfBow: {
return arrowUnbalancedEquilibriumFilledHalfBow(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.UnbalancedEquilibriumOpenHalfAngle: {
return arrowUnbalancedEquilibriumOpenHalfAngle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.UnbalancedEquilibriumLargeFilledHalfBow: {
return arrowUnbalancedEquilibriumLargeFilledHalfBow(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.UnbalancedEquilibriumFilledHalfTriangle: {
return arrowUnbalancedEquilibriumFilledHalfTriangle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EllipticalArcFilledBow: {
return arrowEllipticalArcFilledBow(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EllipticalArcFilledTriangle: {
return arrowEllipticalArcFilledTriangle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EllipticalArcOpenAngle: {
return arrowEllipticalArcOpenAngle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
case RxnArrowMode.EllipticalArcOpenHalfAngle: {
return arrowEllipticalArcOpenHalfAngle(
paper,
item,
length,
angle,
options,
shouldApplySnappingStyle,
);
}
}
}