]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/scl/Simantics/Diagram/ElementTransforms.scl
Added Simantics/Diagram/{withScale,transformElement,transformElements}
[simantics/platform.git] / bundles / org.simantics.diagram / scl / Simantics / Diagram / ElementTransforms.scl
index 9da7ee085ded29eff620f3582c5c937138df7702..3ea3aef3ba5bf008728322fec2ef49e11bd05cfc 100644 (file)
@@ -1,4 +1,18 @@
-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