diff --git a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java index fa53f9803..476e84318 100644 --- a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java +++ b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java @@ -797,7 +797,6 @@ public Boolean caseElkLabel(final ElkLabel layoutLabel) { private void shapeLayoutToLayoutGraph( final KShapeLayout sourceShapeLayout, final ElkShape targetShape) { - // Attention: Layout options are transfered by the {@link KGraphPropertyLayoutConfig} targetShape.setLocation(sourceShapeLayout.getXpos(), sourceShapeLayout.getYpos()); targetShape.setDimensions(sourceShapeLayout.getWidth(), sourceShapeLayout.getHeight()); } diff --git a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/SoftWrappingLabelManager.java b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/SoftWrappingLabelManager.java index d737e0439..37e1cf916 100644 --- a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/SoftWrappingLabelManager.java +++ b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/SoftWrappingLabelManager.java @@ -16,11 +16,11 @@ */ package de.cau.cs.kieler.klighd.labels.management; +import org.eclipse.elk.core.options.CoreOptions; import org.eclipse.elk.graph.ElkLabel; import org.eclipse.swt.graphics.FontData; import de.cau.cs.kieler.klighd.microlayout.PlacementUtil; -import de.cau.cs.kieler.klighd.util.KlighdProperties; /** * Label manager which soft wraps the text so it fits a certain width. Soft wrapping only inserts @@ -43,7 +43,7 @@ public class SoftWrappingLabelManager extends AbstractKlighdLabelManager { * @return The fuzziness */ public double getFuzziness(final ElkLabel label) { - return label.getProperty(KlighdProperties.SOFTWRAPPING_FUZZINESS); + return label.getProperty(CoreOptions.SOFTWRAPPING_FUZZINESS); } @Override @@ -95,6 +95,7 @@ public Result doResizeLabel(final ElkLabel label, final double targetWidth) { } lineWidth = PlacementUtil.estimateTextSize(font, testText).getWidth(); } while (lineWidth < effectiveTargetWidth && previewWordIndex < words.length); + lineWidth = PlacementUtil.estimateTextSize(font, previewLineText).getWidth(); if (lineWidth < effectiveTargetWidth * getFuzziness(label)) { // next line would contain too much whitespace so append it to this line currWordIndex = previewWordIndex; diff --git a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/util/KlighdProperties.java b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/util/KlighdProperties.java index 8b5509506..fb3d6d5c6 100644 --- a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/util/KlighdProperties.java +++ b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/util/KlighdProperties.java @@ -427,13 +427,4 @@ public static boolean isSelectable(final EObject viewElement) { */ public static final IProperty ROUNDED_RECTANGLE_AUTOPADDING = new Property("klighd.roundedRectangle.autopadding", null); - - /** - * Determines the amount of fuzziness to be used when performing softwrapping on labels. - * The value expresses the percent of overhang that is permitted for each line. - * If the next line would take up less space than this threshold, it is appended to the - * current line instead of being placed in a new line. - */ - public static final IProperty SOFTWRAPPING_FUZZINESS = - new Property("klighd.softwrapping.fuzzyness",0.0); }