-import "Simantics/DB"
+module {
+ export = [rotateToNeighborSlope]
+}
+
+include "Simantics/DB"
+
+//-----------------------------------------------------------------------------
importJava "org.simantics.diagram.elements.ElementTransforms" where
+ """
+ rotateToNeighborSlope element
+
+ Rotates provided element so that its rotation is the same as the slope of a
+ line drawn between the two other elements the element is connected to.
+
+ Note that this requires that the element is connected to exactly two other elements.
+ """
rotateToNeighborSlope :: Resource -> <WriteGraph, Proc> Double