googleanalytics.js
5 years ago
googleanalytics_createprop.js
6 years ago
googleanalytics_dashboard.js
4 years ago
googleanalytics_page.js
4 years ago
googleanalytics.js
29 lines
| 1 | /** |
| 2 | * Created by mdn on 2016-12-02. |
| 3 | */ |
| 4 | |
| 5 | (function ($) { |
| 6 | ga_loader = { |
| 7 | show: function () { |
| 8 | $('.ga-loader').show(); |
| 9 | }, |
| 10 | hide: function () { |
| 11 | $('.ga-loader').hide(); |
| 12 | } |
| 13 | }; |
| 14 | |
| 15 | ga_tools = { |
| 16 | getCurrentWidth: function (wrapperSelector) { |
| 17 | return $(wrapperSelector).width(); |
| 18 | }, |
| 19 | recomputeChartWidth: function (minWidth, offset, wrapperSelector) { |
| 20 | const currentWidth = ga_tools.getCurrentWidth(wrapperSelector); |
| 21 | if (currentWidth >= minWidth) { |
| 22 | return parseInt(currentWidth - offset); |
| 23 | } else { |
| 24 | return minWidth; |
| 25 | } |
| 26 | } |
| 27 | }; |
| 28 | })(jQuery); |
| 29 |