mirror of
https://github.com/octoleo/plantuml.git
synced 2025-04-10 20:21:49 +00:00
fix: minor issues
https://github.com/plantuml/plantuml/issues/1442 https://github.com/plantuml/plantuml/issues/1436
This commit is contained in:
parent
aedaeec598
commit
c95bbfe585
@ -1,4 +1,4 @@
|
|||||||
# Warning, "version" should be the same in gradle.properties and Version.java
|
# Warning, "version" should be the same in gradle.properties and Version.java
|
||||||
# Any idea anyone how to magically synchronize those :-) ?
|
# Any idea anyone how to magically synchronize those :-) ?
|
||||||
version = 1.2023.9beta1
|
version = 1.2023.9beta2
|
||||||
org.gradle.workers.max = 3
|
org.gradle.workers.max = 3
|
@ -69,9 +69,9 @@ public class DescriptionDiagram extends AbstractEntityDiagram {
|
|||||||
for (Entity leaf : getEntityFactory().leafs()) {
|
for (Entity leaf : getEntityFactory().leafs()) {
|
||||||
final LeafType type = leaf.getLeafType();
|
final LeafType type = leaf.getLeafType();
|
||||||
final USymbol usymbol = leaf.getUSymbol();
|
final USymbol usymbol = leaf.getUSymbol();
|
||||||
if (type == LeafType.USECASE || usymbol == getSkinParam().actorStyle().toUSymbol()) {
|
if (type == LeafType.USECASE || usymbol == getSkinParam().actorStyle().toUSymbol())
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -81,12 +81,10 @@ public class DescriptionDiagram extends AbstractEntityDiagram {
|
|||||||
super.makeDiagramReady();
|
super.makeDiagramReady();
|
||||||
final LeafType defaultType = LeafType.DESCRIPTION;
|
final LeafType defaultType = LeafType.DESCRIPTION;
|
||||||
final USymbol defaultSymbol = isUsecase() ? getSkinParam().actorStyle().toUSymbol() : USymbols.INTERFACE;
|
final USymbol defaultSymbol = isUsecase() ? getSkinParam().actorStyle().toUSymbol() : USymbols.INTERFACE;
|
||||||
for (Entity leaf : getEntityFactory().leafs()) {
|
for (Entity leaf : getEntityFactory().leafs())
|
||||||
if (leaf.getLeafType() == LeafType.STILL_UNKNOWN) {
|
if (leaf.getLeafType() == LeafType.STILL_UNKNOWN)
|
||||||
leaf.muteToType(defaultType, defaultSymbol);
|
leaf.muteToType(defaultType, defaultSymbol);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String checkFinalError() {
|
public String checkFinalError() {
|
||||||
|
@ -421,8 +421,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||||||
}
|
}
|
||||||
if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
|
if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
|
||||||
g.muteToType(LeafType.EMPTY_PACKAGE);
|
g.muteToType(LeafType.EMPTY_PACKAGE);
|
||||||
System.err.println("STILL IN PROGRESS");
|
manageSingleNode(cluster, g);
|
||||||
// printEntityNew(folder);
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// We create the "cluster" in ELK for this group
|
// We create the "cluster" in ELK for this group
|
||||||
@ -467,14 +466,14 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void manageSingleNode(final ElkNode root, Entity leaf) {
|
private void manageSingleNode(ElkNode parent, Entity leaf) {
|
||||||
final IEntityImage image = printEntityInternal(leaf);
|
final IEntityImage image = printEntityInternal(leaf);
|
||||||
|
|
||||||
// Expected dimension of the node
|
// Expected dimension of the node
|
||||||
final XDimension2D dimension = image.calculateDimension(stringBounder);
|
final XDimension2D dimension = image.calculateDimension(stringBounder);
|
||||||
|
|
||||||
// Here, we try to tell ELK to use this dimension as node dimension
|
// Here, we try to tell ELK to use this dimension as node dimension
|
||||||
final ElkNode node = ElkGraphUtil.createNode(root);
|
final ElkNode node = ElkGraphUtil.createNode(parent);
|
||||||
node.setDimensions(dimension.getWidth(), dimension.getHeight());
|
node.setDimensions(dimension.getWidth(), dimension.getHeight());
|
||||||
|
|
||||||
// There is no real "label" here
|
// There is no real "label" here
|
||||||
|
@ -81,9 +81,9 @@ public class UFont {
|
|||||||
private static Font buildFont(String fontFamily, int fontStyle, int fontSize) {
|
private static Font buildFont(String fontFamily, int fontStyle, int fontSize) {
|
||||||
if (fontFamily.contains(","))
|
if (fontFamily.contains(","))
|
||||||
for (String name : fontFamily.split(",")) {
|
for (String name : fontFamily.split(",")) {
|
||||||
name = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name).trim();
|
name = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name.trim()).trim();
|
||||||
if (doesFamilyExists(name))
|
if (doesFamilyExists(name))
|
||||||
return new Font(fontFamily, fontStyle, fontSize);
|
return new Font(name, fontStyle, fontSize);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,10 +169,10 @@ public class UFont {
|
|||||||
return font.getPSName();
|
return font.getPSName();
|
||||||
}
|
}
|
||||||
if (context == UFontContext.SVG) {
|
if (context == UFontContext.SVG) {
|
||||||
if (family.equalsIgnoreCase("sansserif"))
|
String result = family.replace('\"', '\'');
|
||||||
return "sans-serif";
|
result = result.replaceAll("(?i)sansserif", "sans-serif");
|
||||||
|
|
||||||
return family;
|
return result;
|
||||||
}
|
}
|
||||||
return family;
|
return family;
|
||||||
}
|
}
|
||||||
|
@ -307,6 +307,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker {
|
|||||||
|
|
||||||
if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
|
if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
|
||||||
g.muteToType(LeafType.EMPTY_PACKAGE);
|
g.muteToType(LeafType.EMPTY_PACKAGE);
|
||||||
|
printEntity(g);
|
||||||
} else {
|
} else {
|
||||||
printSingleGroup(g);
|
printSingleGroup(g);
|
||||||
}
|
}
|
||||||
|
@ -183,6 +183,9 @@ public class StyleParser {
|
|||||||
result.append(' ');
|
result.append(' ');
|
||||||
result.append(current.getData());
|
result.append(current.getData());
|
||||||
ins.jump();
|
ins.jump();
|
||||||
|
} else if (current.getType() == StyleTokenType.COMMA) {
|
||||||
|
result.append(current.getData());
|
||||||
|
ins.jump();
|
||||||
} else if (current.getType() == StyleTokenType.COLON) {
|
} else if (current.getType() == StyleTokenType.COLON) {
|
||||||
result.append(current.getData());
|
result.append(current.getData());
|
||||||
ins.jump();
|
ins.jump();
|
||||||
|
@ -46,7 +46,7 @@ public class Version {
|
|||||||
|
|
||||||
// Warning, "version" should be the same in gradle.properties and Version.java
|
// Warning, "version" should be the same in gradle.properties and Version.java
|
||||||
// Any idea anyone how to magically synchronize those :-) ?
|
// Any idea anyone how to magically synchronize those :-) ?
|
||||||
private static final String version = "1.2023.9beta1";
|
private static final String version = "1.2023.9beta2";
|
||||||
|
|
||||||
public static String versionString() {
|
public static String versionString() {
|
||||||
return version;
|
return version;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user