Uname: Linux premium264.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.3.22 [ PHP INFO ] PHP os: Linux
Server Ip: 69.57.162.13
Your Ip: 216.73.216.219
User: workvvfb (1129) | Group: workvvfb (1084)
Safe Mode: OFF
Disable Function:
NONE

name : frontend.js
'use strict';


;(function (factory) {
	window.gt3Elementor = window.gt3Elementor || {};
	window.gt3Elementor.UnlimitedChartFrontend = window.gt3Elementor.UnlimitedChartFrontend || factory(window.jQuery);
})(function ($) {

	function UnlimitedChartFrontend() {
		if (!this || this.widgets !== UnlimitedChartFrontend.prototype.widgets) {
			return new UnlimitedChartFrontend()
		}

		this.initialize();
	}

	$.extend(UnlimitedChartFrontend.prototype, {
		widgets: {
			'unlimited-charts': 'UnlimitedCharts',
		},
		window: $(window),
		editMode: false,		
		initialize: function () {
			var that = this;

			if (typeof window.elementorFrontend !== 'undefined') {
				$.each(that.widgets, function (name, callback) {
					window.elementorFrontend.hooks.addAction('frontend/element_ready/' + name + '.default', that[callback].bind(that));
				})
			}
			if (typeof elementorFrontend !== 'undefined') {
				this.editMode = !!elementorFrontend.config.isEditMode;
			}


		},

		UnlimitedCharts: function ($scope) {			
			var chart = jQuery('.gt3_unlimited_chart_wrapper', $scope);
			var item = chart.find('.gt3_unlimited_chart');
			var type = chart.attr('data-chart-type');
			var data = JSON.parse(chart.attr('data-chart-data'));
			var options = JSON.parse(chart.attr('data-chart-options'));

			

			function chartBuild(){
				var myChart = new Chart(item, {
				    type: type,
				    data: data,
				    options: options
				});
			}

			var waypoint = new Waypoint({
	            element: chart,
	            offset: Waypoint.viewportHeight() - 250,
	            triggerOnce: true,
	            handler: function() {
	                chartBuild();
	                this.destroy();
	            }
		     });

		},
	});

	return UnlimitedChartFrontend;
});

jQuery(window).on('elementor/frontend/init', function () {
	window.gt3Elementor.UnlimitedChartFrontend = window.gt3Elementor.UnlimitedChartFrontend();
});


© 2025 GrazzMean