Skip to content

Commit 5a5d038

Browse files
committed
remove unused ResistorShape code
1 parent e94bd59 commit 5a5d038

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ const {
3434
mxConnectionHandler,
3535
mxConstants,
3636
mxGraphHandler,
37-
mxCylinder,
38-
mxCellRenderer,
3937
mxConstraintHandler,
4038
mxImage,
4139
mxCodec
@@ -766,31 +764,6 @@ export default function LoadGrid (container, sidebar, outline, setMainDiagramBac
766764
return style
767765
}
768766

769-
function ResistorShape () { }
770-
ResistorShape.prototype = new mxCylinder()
771-
ResistorShape.prototype.constructor = ResistorShape
772-
773-
ResistorShape.prototype.redrawPath = function (path, x, y, w, h, isForeground) {
774-
const dx = w / 16
775-
776-
if (isForeground) {
777-
path.moveTo(0, h / 2)
778-
path.lineTo(2 * dx, h / 2)
779-
path.lineTo(3 * dx, 0)
780-
path.lineTo(5 * dx, h)
781-
path.lineTo(7 * dx, 0)
782-
path.lineTo(9 * dx, h)
783-
path.lineTo(11 * dx, 0)
784-
path.lineTo(13 * dx, h)
785-
path.lineTo(14 * dx, h / 2)
786-
path.lineTo(16 * dx, h / 2)
787-
788-
path.end()
789-
}
790-
}
791-
792-
mxCellRenderer.registerShape('resistor', ResistorShape)
793-
794767
mxEdgeStyle.WireConnector = function (state, source, target, hints, result) {
795768
// Creates array of all way- and terminalpoints
796769
const pts = state.absolutePoints

0 commit comments

Comments
 (0)