@hpcc-js/other 2.17.1 → 2.17.3

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.
Files changed (46) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +41 -41
  3. package/dist/index.es6.js +5 -5
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +5 -5
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +5 -5
  10. package/src/Audio.ts +83 -83
  11. package/src/AutoCompleteText.css +21 -21
  12. package/src/AutoCompleteText.ts +124 -124
  13. package/src/CalendarHeatMap.css +26 -26
  14. package/src/CalendarHeatMap.ts +243 -243
  15. package/src/Comms.ts +1085 -1085
  16. package/src/ESP.ts +451 -451
  17. package/src/HPCCBadge.ts +220 -220
  18. package/src/HeatMap.ts +135 -135
  19. package/src/Html.css +5 -5
  20. package/src/Html.ts +44 -44
  21. package/src/IconList.css +3 -3
  22. package/src/IconList.ts +86 -86
  23. package/src/Legend.css +85 -85
  24. package/src/Legend.ts +220 -220
  25. package/src/MorphText.css +11 -11
  26. package/src/MorphText.ts +102 -102
  27. package/src/NestedTable.ts +51 -51
  28. package/src/Opportunity.css +80 -80
  29. package/src/Opportunity.ts +488 -488
  30. package/src/Paginator.css +120 -120
  31. package/src/Paginator.ts +164 -164
  32. package/src/Persist.ts +151 -151
  33. package/src/PropertyEditor.css +130 -130
  34. package/src/PropertyEditor.ts +750 -750
  35. package/src/RadioCheckbox.css +6 -6
  36. package/src/RadioCheckbox.ts +123 -123
  37. package/src/Select.css +7 -7
  38. package/src/Select.ts +120 -120
  39. package/src/Table.css +92 -92
  40. package/src/Table.ts +1050 -1050
  41. package/src/ThemeEditor.css +195 -195
  42. package/src/ThemeEditor.ts +744 -744
  43. package/src/__package__.ts +3 -3
  44. package/src/index.ts +23 -23
  45. package/types/__package__.d.ts +2 -2
  46. package/types-3.4/__package__.d.ts +2 -2
package/src/Legend.css CHANGED
@@ -1,86 +1,86 @@
1
- .other_Legend .colorBlock{
2
- width:10px;
3
- height:10px;
4
- }
5
- .other_Legend > table, .other_Legend > table td,.other_Legend > table th {
6
- border-collapse: collapse;
7
- border-spacing: 0px;
8
- }
9
- .other_Table.other_Legend table {
10
- border-spacing: 0;
11
- }
12
- .other_Table.other_Legend th, .labels-wrapper th {
13
- padding: 2px 5px;
14
- background-color: transparent;
15
- border-width: 1px;
16
- border-style: solid;
17
- border-color: transparent;
18
- color: #333;
19
- white-space: nowrap;
20
- cursor: default;
21
- font-weight:normal;
22
- text-align:left;
23
- }
24
- .other_Table.other_Legend tr {
25
- background-color: transparent;
26
- color: #333;
27
- }
28
-
29
- .other_Table.other_Legend .tableDiv tbody > tr:nth-child(odd) {
30
- background-color: unset;
31
- color:black;
32
- }
33
- .other_Table.other_Legend .tableDiv tbody > tr:hover,
34
- .other_Table.other_Legend .tableDiv tbody > tr.hover,
35
- .rows-wrapper table tbody tr.hover {
36
- background-color: #bfd7e7;
37
- color: white;
38
- }
39
-
40
-
41
- .other_Table.other_Legend thead > tr:hover {
42
- background-color: transparent;
43
- }
44
- .other_Table.other_Legend tbody > tr:hover, .other_Table.other_Legend tbody > tr.hover, .rows-wrapper tbody tr.hover {
45
- background-color: #EEE;
46
- }
47
- .other_Table.other_Legend td, .rows-wrapper td {
48
- border-width: 0px;
49
- padding: 2px 5px;
50
- white-space: nowrap;
51
- box-sizing: border-box;
52
- }
53
- .other_Legend > .tableDiv > table > tbody > tr:hover{
54
- cursor:pointer;
55
- color:#000;
56
- background-color:#DDD;
57
- }
58
- .other_Legend.horiz-legend .tableDiv {
59
- width: 100%!important;
60
- text-align: left;
61
- }
62
- .other_Legend.horiz-legend .tableDiv > table {
63
- display:inline-block;
64
- width:100%!important;
65
- top:0px!important;
66
- left:0px!important;
67
- }
68
- .other_Legend.horiz-legend thead,
69
- .other_Legend.horiz-legend tbody,
70
- .other_Legend.horiz-legend tr
71
- {
72
- display: inline-block;
73
- }
74
- .other_Legend.horiz-legend td,
75
- .other_Legend.horiz-legend td > div {
76
- display:inline-block;
77
- white-space:nowrap;
78
- }
79
- .other_Legend.horiz-legend tr{
80
- white-space: nowrap;
81
- }
82
- .other_Legend.horiz-legend tbody{
83
- display:inline-block;
84
- width:100%!important;
85
- text-align:center;
1
+ .other_Legend .colorBlock{
2
+ width:10px;
3
+ height:10px;
4
+ }
5
+ .other_Legend > table, .other_Legend > table td,.other_Legend > table th {
6
+ border-collapse: collapse;
7
+ border-spacing: 0px;
8
+ }
9
+ .other_Table.other_Legend table {
10
+ border-spacing: 0;
11
+ }
12
+ .other_Table.other_Legend th, .labels-wrapper th {
13
+ padding: 2px 5px;
14
+ background-color: transparent;
15
+ border-width: 1px;
16
+ border-style: solid;
17
+ border-color: transparent;
18
+ color: #333;
19
+ white-space: nowrap;
20
+ cursor: default;
21
+ font-weight:normal;
22
+ text-align:left;
23
+ }
24
+ .other_Table.other_Legend tr {
25
+ background-color: transparent;
26
+ color: #333;
27
+ }
28
+
29
+ .other_Table.other_Legend .tableDiv tbody > tr:nth-child(odd) {
30
+ background-color: unset;
31
+ color:black;
32
+ }
33
+ .other_Table.other_Legend .tableDiv tbody > tr:hover,
34
+ .other_Table.other_Legend .tableDiv tbody > tr.hover,
35
+ .rows-wrapper table tbody tr.hover {
36
+ background-color: #bfd7e7;
37
+ color: white;
38
+ }
39
+
40
+
41
+ .other_Table.other_Legend thead > tr:hover {
42
+ background-color: transparent;
43
+ }
44
+ .other_Table.other_Legend tbody > tr:hover, .other_Table.other_Legend tbody > tr.hover, .rows-wrapper tbody tr.hover {
45
+ background-color: #EEE;
46
+ }
47
+ .other_Table.other_Legend td, .rows-wrapper td {
48
+ border-width: 0px;
49
+ padding: 2px 5px;
50
+ white-space: nowrap;
51
+ box-sizing: border-box;
52
+ }
53
+ .other_Legend > .tableDiv > table > tbody > tr:hover{
54
+ cursor:pointer;
55
+ color:#000;
56
+ background-color:#DDD;
57
+ }
58
+ .other_Legend.horiz-legend .tableDiv {
59
+ width: 100%!important;
60
+ text-align: left;
61
+ }
62
+ .other_Legend.horiz-legend .tableDiv > table {
63
+ display:inline-block;
64
+ width:100%!important;
65
+ top:0px!important;
66
+ left:0px!important;
67
+ }
68
+ .other_Legend.horiz-legend thead,
69
+ .other_Legend.horiz-legend tbody,
70
+ .other_Legend.horiz-legend tr
71
+ {
72
+ display: inline-block;
73
+ }
74
+ .other_Legend.horiz-legend td,
75
+ .other_Legend.horiz-legend td > div {
76
+ display:inline-block;
77
+ white-space:nowrap;
78
+ }
79
+ .other_Legend.horiz-legend tr{
80
+ white-space: nowrap;
81
+ }
82
+ .other_Legend.horiz-legend tbody{
83
+ display:inline-block;
84
+ width:100%!important;
85
+ text-align:center;
86
86
  }
package/src/Legend.ts CHANGED
@@ -1,220 +1,220 @@
1
- import { Palette, Platform } from "@hpcc-js/common";
2
- import { format as d3Format } from "d3-format";
3
- import { select as d3Select } from "d3-selection";
4
- import { Table } from "./Table";
5
-
6
- import "../src/Legend.css";
7
-
8
- function _htmlColorBlock(hexColor) {
9
- return "<div class=\"colorBlock\" style=\"background-color:" + hexColor + ";\"></div>";
10
- }
11
-
12
- export class Legend extends Table {
13
- _targetWidget;
14
- _targetWidgetMonitor;
15
-
16
- constructor() {
17
- super();
18
-
19
- this.showHeader(false);
20
- this.pagination(false);
21
- }
22
-
23
- isRainbow() {
24
- const widget = this.getWidget();
25
- return widget && widget._palette && widget._palette.type() === "rainbow";
26
- }
27
-
28
- targetWidget(): any;
29
- targetWidget(_: any): this;
30
- targetWidget(_?: any): any | this {
31
- if (!arguments.length) return this._targetWidget;
32
- this._targetWidget = _;
33
- if (this._targetWidgetMonitor) {
34
- this._targetWidgetMonitor.remove();
35
- delete this._targetWidgetMonitor;
36
- }
37
- const context = this;
38
- this._targetWidgetMonitor = this._targetWidget.monitor(function (key, newProp, oldProp, source) {
39
- switch (key) {
40
- case "chart":
41
- case "columns":
42
- case "data":
43
- case "paletteID":
44
- context.lazyRender();
45
- break;
46
- }
47
- });
48
- return this;
49
- }
50
-
51
- getWidget() {
52
- if (this._targetWidget) {
53
- switch (this._targetWidget.classID()) {
54
- case "chart_MultiChart":
55
- return this._targetWidget.chart();
56
- }
57
- }
58
- return this._targetWidget;
59
- }
60
-
61
- getPalette() {
62
- const widget = this.getWidget();
63
- if (widget && widget._palette) {
64
- switch (widget._palette.type()) {
65
- case "ordinal":
66
- return Palette.ordinal(widget._palette.id());
67
- case "rainbow":
68
- return Palette.rainbow(widget._palette.id());
69
- }
70
- }
71
- return Palette.ordinal("default");
72
- }
73
-
74
- enter(domNode, element) {
75
- super.enter(domNode, element);
76
- d3Select(domNode.parentNode).style("overflow-y", "auto");
77
-
78
- this.renderHtmlDataCells(true);
79
- this.fixedHeader(false);
80
- this.fixedSize(true);
81
- element.classed("other_Legend", true);
82
- }
83
-
84
- update(domNode, element) {
85
- const colArr = ["Key", "Label"];
86
- let dataArr = [];
87
- if (this._targetWidget) {
88
- const _palette = this.getPalette();
89
- switch (_palette.type()) {
90
- case "ordinal":
91
- const oPalette = _palette as Palette.OrdinalPaletteFunc;
92
- switch (this.dataFamily()) {
93
- case "2D":
94
- dataArr = this._targetWidget.data().map(function (n) {
95
- return [_htmlColorBlock(oPalette(n[0])), n[0]];
96
- }, this);
97
- break;
98
- case "ND":
99
- const widgetColumns = this._targetWidget.columns();
100
- dataArr = widgetColumns.filter(function (n, i) { return i > 0; }).map(function (n) {
101
- return [_htmlColorBlock(oPalette(n)), n];
102
- }, this);
103
- break;
104
- }
105
- break;
106
- case "rainbow":
107
- const rPalette = _palette as Palette.RainbowPaletteFunc;
108
- const format = d3Format(this.rainbowFormat());
109
- const widget = this.getWidget();
110
- const steps = this.rainbowBins();
111
- const weightMin = widget._dataMinWeight;
112
- const weightMax = widget._dataMaxWeight;
113
- const stepWeightDiff = (weightMax - weightMin) / (steps - 1);
114
- dataArr.push([_htmlColorBlock(rPalette(weightMin, weightMin, weightMax)), format(weightMin)]);
115
- for (let x = 1; x < steps - 1; ++x) {
116
- const mid = stepWeightDiff * x;
117
- dataArr.push([_htmlColorBlock(rPalette(mid, weightMin, weightMax)), format(Math.floor(mid))]);
118
- }
119
- dataArr.push([_htmlColorBlock(rPalette(weightMax, weightMin, weightMax)), format(weightMax)]);
120
- break;
121
- }
122
- }
123
- this.columns(colArr);
124
- this.data(dataArr);
125
- super.update(domNode, element);
126
-
127
- element.classed("horiz-legend", this.orientation() === "horizontal");
128
-
129
- const table = element.select(".tableDiv > table");
130
- const tableRect = table.node().getBoundingClientRect();
131
- const elementRect = this._placeholderElement.node().getBoundingClientRect();
132
-
133
- element.select(".tableDiv").style("overflow", "visible");
134
-
135
- const top = elementRect.height / 2 - tableRect.height / 2;
136
- const left = elementRect.width / 2 - tableRect.width / 2;
137
- table
138
- .style("position", "absolute")
139
- .style("top", top + "px")
140
- .style("left", left + "px")
141
- ;
142
-
143
- const startIndex = this.pageNumber() - 1;
144
- const itemsOnPage = this.itemsPerPage();
145
-
146
- const start = startIndex * itemsOnPage;
147
- const end = startIndex * parseInt(itemsOnPage) + parseInt(itemsOnPage);
148
-
149
- let tData = null;
150
- if (this.pagination()) {
151
- tData = this.data().slice(start, end);
152
- } else {
153
- tData = this.data();
154
- }
155
-
156
- const rows = this.tbody.selectAll("tr").data(tData);
157
- const context = this;
158
- rows
159
- .on("click", function (d, i) {
160
- context.onClick(d, i);
161
- })
162
- .on("dblclick", function (d, i) {
163
- context.onDblClick(d, i);
164
- })
165
- .on("mouseover", function (d, i) {
166
- context.onMouseOver(d, i);
167
- })
168
- ;
169
- }
170
-
171
- exit(domNode, element) {
172
- if (this._targetWidgetMonitor) {
173
- this._targetWidgetMonitor.remove();
174
- delete this._targetWidgetMonitor;
175
- }
176
- super.exit(domNode, element);
177
- }
178
-
179
- onClick(rowData, rowIdx) {
180
- }
181
-
182
- onDblClick(rowData, rowIdx) {
183
- }
184
-
185
- onMouseOver(rowData, rowIdx) {
186
- }
187
-
188
- dataFamily: { (): string; (_: string): Legend };
189
- dataFamily_exists: () => boolean;
190
- orientation: { (): string; (_: string): Legend };
191
- orientation_exists: () => boolean;
192
- rainbowFormat: { (): string; (_: string): Legend };
193
- rainbowFormat_exists: () => boolean;
194
- rainbowBins: { (): number; (_: number): Legend };
195
- rainbowBins_exists: () => boolean;
196
- }
197
- Legend.prototype._class += " other_Legend";
198
-
199
- Legend.prototype.publish("dataFamily", "ND", "set", "Type of data", ["1D", "2D", "ND", "map", "any", "other"], { tags: ["Private"] });
200
- Legend.prototype.publish("orientation", "vertical", "set", "Orientation of Legend rows", ["vertical", "horizontal"], { tags: ["Private"] });
201
- Legend.prototype.publish("rainbowFormat", ",", "string", "Rainbow number formatting", null, { tags: ["Private"], optional: true, disable: w => !w.isRainbow() });
202
- Legend.prototype.publish("rainbowBins", 8, "number", "Number of rainbow bins", null, { tags: ["Private"], disable: w => !w.isRainbow() });
203
-
204
- const origGetBBox = Table.prototype.getBBox;
205
- Legend.prototype.getBBox = function (refresh, round) {
206
- const retVal = origGetBBox.apply(this, arguments);
207
- const table = this.element().select(".tableDiv > table");
208
- if (!table.empty()) {
209
- const tableRect = table.node().getBoundingClientRect();
210
- const width = tableRect.width + 8 + (this.hasVScroll(this._placeholderElement) ? Platform.getScrollbarWidth() : 0);
211
- const height = tableRect.height + 8 + (this.hasHScroll(this._placeholderElement) ? Platform.getScrollbarWidth() : 0);
212
- return {
213
- x: retVal.x,
214
- y: retVal.y,
215
- width: (round ? Math.round(width) : width) * this._scale,
216
- height: (round ? Math.round(height) : height) * this._scale
217
- };
218
- }
219
- return retVal;
220
- };
1
+ import { Palette, Platform } from "@hpcc-js/common";
2
+ import { format as d3Format } from "d3-format";
3
+ import { select as d3Select } from "d3-selection";
4
+ import { Table } from "./Table";
5
+
6
+ import "../src/Legend.css";
7
+
8
+ function _htmlColorBlock(hexColor) {
9
+ return "<div class=\"colorBlock\" style=\"background-color:" + hexColor + ";\"></div>";
10
+ }
11
+
12
+ export class Legend extends Table {
13
+ _targetWidget;
14
+ _targetWidgetMonitor;
15
+
16
+ constructor() {
17
+ super();
18
+
19
+ this.showHeader(false);
20
+ this.pagination(false);
21
+ }
22
+
23
+ isRainbow() {
24
+ const widget = this.getWidget();
25
+ return widget && widget._palette && widget._palette.type() === "rainbow";
26
+ }
27
+
28
+ targetWidget(): any;
29
+ targetWidget(_: any): this;
30
+ targetWidget(_?: any): any | this {
31
+ if (!arguments.length) return this._targetWidget;
32
+ this._targetWidget = _;
33
+ if (this._targetWidgetMonitor) {
34
+ this._targetWidgetMonitor.remove();
35
+ delete this._targetWidgetMonitor;
36
+ }
37
+ const context = this;
38
+ this._targetWidgetMonitor = this._targetWidget.monitor(function (key, newProp, oldProp, source) {
39
+ switch (key) {
40
+ case "chart":
41
+ case "columns":
42
+ case "data":
43
+ case "paletteID":
44
+ context.lazyRender();
45
+ break;
46
+ }
47
+ });
48
+ return this;
49
+ }
50
+
51
+ getWidget() {
52
+ if (this._targetWidget) {
53
+ switch (this._targetWidget.classID()) {
54
+ case "chart_MultiChart":
55
+ return this._targetWidget.chart();
56
+ }
57
+ }
58
+ return this._targetWidget;
59
+ }
60
+
61
+ getPalette() {
62
+ const widget = this.getWidget();
63
+ if (widget && widget._palette) {
64
+ switch (widget._palette.type()) {
65
+ case "ordinal":
66
+ return Palette.ordinal(widget._palette.id());
67
+ case "rainbow":
68
+ return Palette.rainbow(widget._palette.id());
69
+ }
70
+ }
71
+ return Palette.ordinal("default");
72
+ }
73
+
74
+ enter(domNode, element) {
75
+ super.enter(domNode, element);
76
+ d3Select(domNode.parentNode).style("overflow-y", "auto");
77
+
78
+ this.renderHtmlDataCells(true);
79
+ this.fixedHeader(false);
80
+ this.fixedSize(true);
81
+ element.classed("other_Legend", true);
82
+ }
83
+
84
+ update(domNode, element) {
85
+ const colArr = ["Key", "Label"];
86
+ let dataArr = [];
87
+ if (this._targetWidget) {
88
+ const _palette = this.getPalette();
89
+ switch (_palette.type()) {
90
+ case "ordinal":
91
+ const oPalette = _palette as Palette.OrdinalPaletteFunc;
92
+ switch (this.dataFamily()) {
93
+ case "2D":
94
+ dataArr = this._targetWidget.data().map(function (n) {
95
+ return [_htmlColorBlock(oPalette(n[0])), n[0]];
96
+ }, this);
97
+ break;
98
+ case "ND":
99
+ const widgetColumns = this._targetWidget.columns();
100
+ dataArr = widgetColumns.filter(function (n, i) { return i > 0; }).map(function (n) {
101
+ return [_htmlColorBlock(oPalette(n)), n];
102
+ }, this);
103
+ break;
104
+ }
105
+ break;
106
+ case "rainbow":
107
+ const rPalette = _palette as Palette.RainbowPaletteFunc;
108
+ const format = d3Format(this.rainbowFormat());
109
+ const widget = this.getWidget();
110
+ const steps = this.rainbowBins();
111
+ const weightMin = widget._dataMinWeight;
112
+ const weightMax = widget._dataMaxWeight;
113
+ const stepWeightDiff = (weightMax - weightMin) / (steps - 1);
114
+ dataArr.push([_htmlColorBlock(rPalette(weightMin, weightMin, weightMax)), format(weightMin)]);
115
+ for (let x = 1; x < steps - 1; ++x) {
116
+ const mid = stepWeightDiff * x;
117
+ dataArr.push([_htmlColorBlock(rPalette(mid, weightMin, weightMax)), format(Math.floor(mid))]);
118
+ }
119
+ dataArr.push([_htmlColorBlock(rPalette(weightMax, weightMin, weightMax)), format(weightMax)]);
120
+ break;
121
+ }
122
+ }
123
+ this.columns(colArr);
124
+ this.data(dataArr);
125
+ super.update(domNode, element);
126
+
127
+ element.classed("horiz-legend", this.orientation() === "horizontal");
128
+
129
+ const table = element.select(".tableDiv > table");
130
+ const tableRect = table.node().getBoundingClientRect();
131
+ const elementRect = this._placeholderElement.node().getBoundingClientRect();
132
+
133
+ element.select(".tableDiv").style("overflow", "visible");
134
+
135
+ const top = elementRect.height / 2 - tableRect.height / 2;
136
+ const left = elementRect.width / 2 - tableRect.width / 2;
137
+ table
138
+ .style("position", "absolute")
139
+ .style("top", top + "px")
140
+ .style("left", left + "px")
141
+ ;
142
+
143
+ const startIndex = this.pageNumber() - 1;
144
+ const itemsOnPage = this.itemsPerPage();
145
+
146
+ const start = startIndex * itemsOnPage;
147
+ const end = startIndex * parseInt(itemsOnPage) + parseInt(itemsOnPage);
148
+
149
+ let tData = null;
150
+ if (this.pagination()) {
151
+ tData = this.data().slice(start, end);
152
+ } else {
153
+ tData = this.data();
154
+ }
155
+
156
+ const rows = this.tbody.selectAll("tr").data(tData);
157
+ const context = this;
158
+ rows
159
+ .on("click", function (d, i) {
160
+ context.onClick(d, i);
161
+ })
162
+ .on("dblclick", function (d, i) {
163
+ context.onDblClick(d, i);
164
+ })
165
+ .on("mouseover", function (d, i) {
166
+ context.onMouseOver(d, i);
167
+ })
168
+ ;
169
+ }
170
+
171
+ exit(domNode, element) {
172
+ if (this._targetWidgetMonitor) {
173
+ this._targetWidgetMonitor.remove();
174
+ delete this._targetWidgetMonitor;
175
+ }
176
+ super.exit(domNode, element);
177
+ }
178
+
179
+ onClick(rowData, rowIdx) {
180
+ }
181
+
182
+ onDblClick(rowData, rowIdx) {
183
+ }
184
+
185
+ onMouseOver(rowData, rowIdx) {
186
+ }
187
+
188
+ dataFamily: { (): string; (_: string): Legend };
189
+ dataFamily_exists: () => boolean;
190
+ orientation: { (): string; (_: string): Legend };
191
+ orientation_exists: () => boolean;
192
+ rainbowFormat: { (): string; (_: string): Legend };
193
+ rainbowFormat_exists: () => boolean;
194
+ rainbowBins: { (): number; (_: number): Legend };
195
+ rainbowBins_exists: () => boolean;
196
+ }
197
+ Legend.prototype._class += " other_Legend";
198
+
199
+ Legend.prototype.publish("dataFamily", "ND", "set", "Type of data", ["1D", "2D", "ND", "map", "any", "other"], { tags: ["Private"] });
200
+ Legend.prototype.publish("orientation", "vertical", "set", "Orientation of Legend rows", ["vertical", "horizontal"], { tags: ["Private"] });
201
+ Legend.prototype.publish("rainbowFormat", ",", "string", "Rainbow number formatting", null, { tags: ["Private"], optional: true, disable: w => !w.isRainbow() });
202
+ Legend.prototype.publish("rainbowBins", 8, "number", "Number of rainbow bins", null, { tags: ["Private"], disable: w => !w.isRainbow() });
203
+
204
+ const origGetBBox = Table.prototype.getBBox;
205
+ Legend.prototype.getBBox = function (refresh, round) {
206
+ const retVal = origGetBBox.apply(this, arguments);
207
+ const table = this.element().select(".tableDiv > table");
208
+ if (!table.empty()) {
209
+ const tableRect = table.node().getBoundingClientRect();
210
+ const width = tableRect.width + 8 + (this.hasVScroll(this._placeholderElement) ? Platform.getScrollbarWidth() : 0);
211
+ const height = tableRect.height + 8 + (this.hasHScroll(this._placeholderElement) ? Platform.getScrollbarWidth() : 0);
212
+ return {
213
+ x: retVal.x,
214
+ y: retVal.y,
215
+ width: (round ? Math.round(width) : width) * this._scale,
216
+ height: (round ? Math.round(height) : height) * this._scale
217
+ };
218
+ }
219
+ return retVal;
220
+ };
package/src/MorphText.css CHANGED
@@ -1,11 +1,11 @@
1
- .other_MorphText .enter {
2
- fill: green;
3
- }
4
-
5
- .other_MorphText .update {
6
- fill: #333;
7
- }
8
-
9
- .other_MorphText .exit {
10
- fill: brown;
11
- }
1
+ .other_MorphText .enter {
2
+ fill: green;
3
+ }
4
+
5
+ .other_MorphText .update {
6
+ fill: #333;
7
+ }
8
+
9
+ .other_MorphText .exit {
10
+ fill: brown;
11
+ }