X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fscl%2FSimantics%2FDiagram%2FElementTransforms.scl;h=3ea3aef3ba5bf008728322fec2ef49e11bd05cfc;hb=599ed2e33cb1c65a20a6d2989a7884db6b162670;hp=9da7ee085ded29eff620f3582c5c937138df7702;hpb=8257c30918a213e580e048171078c7689926d68f;p=simantics%2Fplatform.git 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