Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsp: remove outermost padding to remove border when exporting SVGs. #197

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import de.cau.cs.kieler.klighd.lsp.utils.RenderingPreparer
import java.io.ByteArrayOutputStream
import java.util.ArrayList
import org.apache.log4j.Logger
import org.eclipse.elk.core.math.ElkPadding
import org.eclipse.elk.core.options.CoreOptions
import org.eclipse.elk.graph.ElkNode
import org.eclipse.emf.common.util.URI
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
Expand Down Expand Up @@ -70,6 +72,8 @@ class KGraphLayoutEngine extends ElkLayoutEngine {
*/
def onlyLayoutOnKGraph(String uri) {
val kGraphContext = diagramState.getKGraphContext(uri)
// Remove any padding from the root node to avoid blank padding around the edge of the entire graph.
kGraphContext.viewModel.setProperty(CoreOptions.PADDING, new ElkPadding(0))

// layout of KGraph
val lightDiagramLayoutConfig = new LightDiagramLayoutConfig(kGraphContext)
Expand Down
Loading