@yanqirenshi/d3.deployment 0.8.0 → 0.8.2

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.
@@ -95,7 +95,9 @@ var Nodes = exports["default"] = /*#__PURE__*/function () {
95
95
  key: "drawIcon",
96
96
  value: function drawIcon(groups) {
97
97
  var icon_groups = groups.append('g').attr('class', 'icon-group').attr("transform", function (d) {
98
- return "translate(" + (d.size.w - 24 - 20) + "," + 15 + ")";
98
+ // _size は Hierarchy.fitting による調整後サイズ(子要素 + padding で
99
+ // 拡張され得る)。入力の d.size を使うと拡張時に位置がずれる。
100
+ return "translate(" + (d._size.w - 24 - 20) + "," + 15 + ")";
99
101
  });
100
102
  icon_groups.append('rect').attr('class', 'node-body').attr('width', function (d) {
101
103
  return 18;
@@ -155,7 +157,9 @@ var Nodes = exports["default"] = /*#__PURE__*/function () {
155
157
  a_element.append('text').attr('x', function (d) {
156
158
  return 10;
157
159
  }).attr('y', function (d) {
158
- return d.size.h - 10;
160
+ // _size は Hierarchy.fitting による調整後サイズ(子要素 + padding で
161
+ // 拡張され得る)。入力の d.size を使うと拡張時に位置がずれる。
162
+ return d._size.h - 10;
159
163
  }).style("font-size", function (d) {
160
164
  return '12px';
161
165
  }).style("display", function (d) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yanqirenshi/d3.deployment",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "See [Documents](https://yanqirenshi.github.io/D3.Deployment/)",
5
5
  "main": "dist/index.js",
6
6
  "directories": {