forked from ZenUml/core
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust Fragment width according to simple assignment.
- Loading branch information
Showing
6 changed files
with
54 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,7 +151,4 @@ export default { | |
* { | ||
border-color: inherit; | ||
} | ||
.fragment { | ||
min-width: 200px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// The label in the rendered diagram. | ||
// `a->b.label`: `label`. | ||
// `a->b.label()`: `label`. | ||
// `a=b()`: `b`. Invocation. | ||
// `a=b`: `a=b`. Simple assignment. | ||
// `new A`: `«create»`. | ||
// `new A(1)`: `«1»`. | ||
|
||
import sequenceParser from "../generated-parser/sequenceParser"; | ||
|
||
const seqParser = sequenceParser; | ||
const MessageContext = seqParser.MessageContext; | ||
const AsyncMessageContext = seqParser.AsyncMessageContext; | ||
const CreationContext = seqParser.CreationContext; | ||
|
||
// @ts-ignore | ||
MessageContext.prototype.Label = function () { | ||
// @ts-ignore | ||
if (this.isSimpleAssignment()) { | ||
// @ts-ignore | ||
return this.Assignment()?.getLabel() + "=" + this.SignatureText(); | ||
} | ||
// @ts-ignore | ||
return this.SignatureText(); | ||
}; | ||
|
||
// @ts-ignore | ||
AsyncMessageContext.prototype.Label = | ||
AsyncMessageContext.prototype.SignatureText; | ||
|
||
// @ts-ignore | ||
CreationContext.prototype.Label = CreationContext.prototype.SignatureText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters