Skip to content

Commit 919a2e6

Browse files
authored
Merge pull request #126 from kieler/mka/label-shortening-fuzziness
add fuzziness to edge labels
2 parents 4f00c31 + 03e8c71 commit 919a2e6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import de.cau.cs.kieler.klighd.kgraph.KNode
2020
import de.cau.cs.kieler.klighd.krendering.ViewSynthesisShared
2121
import de.cau.cs.kieler.sccharts.Scope
2222
import de.cau.cs.kieler.sccharts.Transition
23-
import de.cau.cs.kieler.sccharts.ui.synthesis.hooks.SynthesisActionHook
2423
import de.cau.cs.kieler.sccharts.ui.synthesis.GeneralSynthesisOptions
2524
import de.cau.cs.kieler.sccharts.ui.synthesis.labels.LabelFocusSelectionListener
2625
import de.cau.cs.kieler.sccharts.ui.synthesis.labels.LabelShorteningStrategies
2726
import org.eclipse.elk.core.labels.LabelManagementOptions
27+
import org.eclipse.elk.core.options.CoreOptions
2828

2929
import static extension de.cau.cs.kieler.klighd.syntheses.DiagramSyntheses.*
3030
import static extension de.cau.cs.kieler.klighd.util.ModelingUtil.*
@@ -81,6 +81,9 @@ class LabelShorteningHook extends SynthesisActionHook {
8181
if (HIDE_LABELS.booleanValue) {
8282
edge.eContents.filter(KLabel).forEach[initiallyHide]
8383
}
84+
edge.labels.forEach[
85+
it.setProperty(CoreOptions::SOFTWRAPPING_FUZZINESS, 0.3)
86+
]
8487
}
8588

8689
override executeAction(KNode rootNode) {

0 commit comments

Comments
 (0)