Skip to content

Commit

Permalink
fix(return): pull up parent's margin only when the return is the last…
Browse files Browse the repository at this point in the history
… statement.

Fix the issue of rendering:
B A
A.method {
  return x
  B.m
}
  • Loading branch information
MrCoder committed Jan 10, 2025
1 parent 3fe2b70 commit f7990db
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ export default {
</script>
<style scoped>
.interaction.return {
/* It pulls up the parent's (.statement-container) bottom margin. The purpose is to impact only when return is
the last statement. It wouldn't cause an issue if we apply to all return elements, because the following
statements will have a margin-top:16px. */
.statement-container:last-child > .interaction.return {
/* It pulls up the parent's (.statement-container) bottom margin. */
margin-bottom: -16px;
bottom: -2px; /* The width of the border of the Occurrence */
}
Expand Down

0 comments on commit f7990db

Please sign in to comment.