- SVG animáció-késleltetés hozzáadva
This commit is contained in:
		
							parent
							
								
									bb66a40f3f
								
							
						
					
					
						commit
						2f8b8f1cad
					
				@ -394,7 +394,7 @@ define("SVG_REPORT_PIE_RADIUS", 110);
 | 
				
			|||||||
define("SVG_REPORT_ANIMATION_DUR", 2);
 | 
					define("SVG_REPORT_ANIMATION_DUR", 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// SVG-kép generálása a jelentésből
 | 
					// SVG-kép generálása a jelentésből
 | 
				
			||||||
function generate_svg_plot($report, $mobile = false): string
 | 
					function generate_svg_plot($report, $mobile = false, $timing = 8): string
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    $pie_orig = [SVG_REPORT_WIDTH / 2, SVG_REPORT_HEIGHT / 2];
 | 
					    $pie_orig = [SVG_REPORT_WIDTH / 2, SVG_REPORT_HEIGHT / 2];
 | 
				
			||||||
    $pie_radius = SVG_REPORT_PIE_RADIUS;
 | 
					    $pie_radius = SVG_REPORT_PIE_RADIUS;
 | 
				
			||||||
@ -542,7 +542,8 @@ function generate_svg_plot($report, $mobile = false): string
 | 
				
			|||||||
        //$color = "rgb(" . random_int(0, 255) . "," . random_int(0, 255) . "," . random_int(0, 255) . ")";
 | 
					        //$color = "rgb(" . random_int(0, 255) . "," . random_int(0, 255) . "," . random_int(0, 255) . ")";
 | 
				
			||||||
        $color = $palette[$idx];
 | 
					        $color = $palette[$idx];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $anim_delay = SVG_REPORT_ANIMATION_DUR * 2 / 3 * ($sector_count - $idx - 1);
 | 
					        $anim_delay = $timing * ($sector_count - $idx - 1);
 | 
				
			||||||
 | 
					        //$anim_delay = SVG_REPORT_ANIMATION_DUR * 2 / 3 * ($sector_count - $idx - 1);
 | 
				
			||||||
        $svg .= "<g class='datagroup' style='animation-delay: ${anim_delay}s' id='datagroup${idx}'>";
 | 
					        $svg .= "<g class='datagroup' style='animation-delay: ${anim_delay}s' id='datagroup${idx}'>";
 | 
				
			||||||
        $sector_id = "sector$idx";
 | 
					        $sector_id = "sector$idx";
 | 
				
			||||||
        $svg .= $svg_path($svg_curve($percent), $color, "$sector_id"); // körcikk
 | 
					        $svg .= $svg_path($svg_curve($percent), $color, "$sector_id"); // körcikk
 | 
				
			||||||
@ -856,7 +857,7 @@ if (cp_verify_id($elector_id)) {
 | 
				
			|||||||
        case "cp_generate_plot":
 | 
					        case "cp_generate_plot":
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                $disable_jsoning = true;
 | 
					                $disable_jsoning = true;
 | 
				
			||||||
                $res = generate_svg_plot(generate_report(false));
 | 
					                $res = generate_svg_plot(generate_report(false), false, 0);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case "cp_csv_report":
 | 
					        case "cp_csv_report":
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user