X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fscl%2FSimantics%2FDiagram.scl;h=0ee3e9d28ec03afeec9aff59d69097643472df72;hp=bf5c589e85f8f2a248d55a71c5244bc1332b2fae;hb=b586228b0a54c5b8aa55a31d929d7f24c4fc5f53;hpb=c8cce62f9952ab3f6db451d2f22d969b4e777eaa diff --git a/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl b/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl index bf5c589e8..0ee3e9d28 100644 --- a/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl +++ b/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl @@ -149,9 +149,15 @@ hasRandomIdentifier entity = runProc (claimRelatedValue_ entity L0.identifier GU """Returns all diagrams of the given model.""" diagramsOf :: Model -> [Diagram] -diagramsOf model = recurse - DIA.Diagram - (configurationOf model) +diagramsOf model = diagramsUnder $ configurationOf model + +""" +Returns all diagrams under the specified diagram folder. +The parameter can also be the configuration root `configurationOf` +in which case this function returns the same as `diagramsOf model`. +""" +diagramsUnder :: DiagramFolder -> [Resource] +diagramsUnder folder = recurse DIA.Diagram folder where recurse t r = do cs = children r @@ -805,8 +811,10 @@ setTransform element transform = claimRelatedValueWithType element DIA.HasTransf importJava "org.simantics.modeling.svg.CreateSVGElement" where createSVGElement :: Resource -> String -> ByteArray -> Double -> Double -> () + createSVGElementR :: Resource -> String -> ByteArray -> Double -> Double -> Resource importSVGElement :: Resource -> File -> Double -> Double -> () + importSVGElementR :: Resource -> File -> Double -> Double -> Resource importJava "org.simantics.diagram.synchronization.graph.RemoveElement" where removeElement :: Resource -> Resource -> ()