X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fscl%2FSimantics%2FDiagram%2FElementTransforms.scl;h=3ea3aef3ba5bf008728322fec2ef49e11bd05cfc;hp=9da7ee085ded29eff620f3582c5c937138df7702;hb=b8afde7d56558ae67a5821c066e0ea0f69b049da;hpb=9845a372968046da2f1e99a37ca550ce8f38fb31 diff --git a/bundles/org.simantics.diagram/scl/Simantics/Diagram/ElementTransforms.scl b/bundles/org.simantics.diagram/scl/Simantics/Diagram/ElementTransforms.scl index 9da7ee085..3ea3aef3b 100644 --- a/bundles/org.simantics.diagram/scl/Simantics/Diagram/ElementTransforms.scl +++ b/bundles/org.simantics.diagram/scl/Simantics/Diagram/ElementTransforms.scl @@ -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 -> Double