@datarailsshared/dr_renderer 1.3.16 → 1.3.17

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -25,18 +25,18 @@ let getPublishedItemsRenderer = function (publishedItemsRenderer) {
25
25
  const body = iframeWindow.document.getElementsByTagName("body")[0];
26
26
 
27
27
  if (table && options.responsive) {
28
- publishedItemsRenderer.zoomTable(iframeWindow, table, body);
28
+ publishedItemsRenderer.zoomTable(iframeWindow, table);
29
29
  }
30
30
 
31
31
  publishedItemsRenderer.resizePublishedImage(publish_item_image, iframeWindow, body);
32
32
  }
33
33
 
34
- publishedItemsRenderer.zoomTable = function (iframeWindow, table, body) {
35
- const bodyZoom = parseFloat(body.style.zoom) || 1;
36
- const SCROLL_OFFSET = 16;
34
+ publishedItemsRenderer.zoomTable = function (iframeWindow, table) {
35
+ table.style.zoom = 1;
37
36
 
38
- const tableWidth = table.getBoundingClientRect().width * bodyZoom;
39
- const tableHeight = table.getBoundingClientRect().height * bodyZoom;
37
+ const SCROLL_OFFSET = 16;
38
+ const tableWidth = table.getBoundingClientRect().width;
39
+ const tableHeight = table.getBoundingClientRect().height;
40
40
  const root = iframeWindow.document.documentElement;
41
41
 
42
42
  let requiredZoom = (root.clientWidth - SCROLL_OFFSET) / tableWidth;