ea 0.6.41 → 0.6.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 648d534db9bc161659ceb4fb001a91dd027c2de38714d64b757ade37728c9608
4
- data.tar.gz: ad4addbbbc6e2695b44df97431779acd1cf561d2f4e42c20f64dca60eae11230
3
+ metadata.gz: 00712a8a81ec1a2db75cb8d603ecea20b4f5499b59c4b32b269f5ae6630a8fc8
4
+ data.tar.gz: 98957abd4b964ca2c27bc2f5637497ed08762f163fe042ee6091a4228a3c52ac
5
5
  SHA512:
6
- metadata.gz: 5c0d526857ccf9c8c78eca78e954f8cc4332c7abaa8311c53559ded2bb78dbee599e7e2ec800f997108310078f58115e269bee8aed700295922f08b196fd96f8
7
- data.tar.gz: 63def8e36e609ff0b1a7dc735ae27ae4518de1394009d1c847ecea14da6451ae3e32e40d90c5f8d00bc9795262bc7f85615a1575c23132f0ff46c42dca53e9c7
6
+ metadata.gz: 4224e7c3dac17d7d6174aed6cbca23530a91d28fc6270bca00c8a09a682e611bba397294ae9ba3e33081f627f38b18c5ea6820448ab0d317fdca512b83ec1ff5
7
+ data.tar.gz: 5b377f89f6c20bdf4dfcc56fe02e503320404f6cfacfe9483ba4c7efd4bda8631ea64b30acb3d04f3f909590108e393a49263956eb0c3d8572caa984b42251fc
@@ -60,6 +60,13 @@ module Ea
60
60
  if tree && zero_offset?(text_box, mult_box)
61
61
  text_pos, mult_pos = tree_positions(end_kind, anchor, role,
62
62
  text_pos, mult_pos)
63
+ elsif mult_box && stored_offsets_zero?(mult_box)
64
+ # A stored mult box with OX=0:OY=0 means "EA default":
65
+ # the multiplicity sits 15px BELOW the endpoint anchor,
66
+ # regardless of line direction (87-sample corpus fit:
67
+ # dy = +15 constant; the dx residual follows the
68
+ # dock-slot family).
69
+ mult_pos = [anchor[0], anchor[1] + 15]
63
70
  end
64
71
  show_property = property_label?(connector, end_kind)
65
72
 
@@ -75,6 +82,10 @@ module Ea
75
82
  # mult +3/0); target-end pairs sit just above the dock
76
83
  # astride the trunk — role right edge at trunk+7, mult
77
84
  # starting at trunk+8, both at dock_y - 8.
85
+ def stored_offsets_zero?(box)
86
+ box["ox"].to_i.zero? && box["oy"].to_i.zero?
87
+ end
88
+
78
89
  def zero_offset?(text_box, mult_box)
79
90
  [text_box, mult_box].compact.all? do |b|
80
91
  b["ox"].to_i.zero? && b["oy"].to_i.zero?
data/lib/ea/version.rb CHANGED
@@ -4,5 +4,5 @@ module Ea
4
4
  # Gem release version. Extracted to its own file so the
5
5
  # `gem-release` tool's `gem bump` can find and update it via the
6
6
  # standard `lib/<gem>/version.rb` convention.
7
- VERSION = "0.6.41"
7
+ VERSION = "0.6.43"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.41
4
+ version: 0.6.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.