Untitled

mail@pastecode.io avatar
unknown
javascript
23 days ago
2.0 kB
4
Indexable
Never
function setProgress ( gauge, progress ) {

		gauge.progress = progress;

		if(gauge.shape === "Bar" && gauge.barType === "Rectangle") {

			if(gauge.direction === "Forward") {

				if(gauge.barOrientation === "Horizontal") {
			
					gauge.progressObject.width = gauge.barWidth * gauge.progress;
					gauge.progressObject.x = 0;
					gauge.progressObject.y = 0;

				} else if(gauge.barOrientation === "Vertical") {


				}

			} else if(gauge.direction === "Reversed") {

				if(gauge.barOrientation === "Horizontal") {
			
					gauge.progressObject.width = gauge.barWidth * gauge.progress;
					gauge.progressObject.x = 0;
					gauge.progressObject.y = 0;

				} else if(gauge.barOrientation === "Vertical") {

					gauge.progressObject.height = gauge.barHeight * gauge.progress;
					gauge.progressObject.x = 0;
					gauge.progressObject.y = 0;


				}

			} else if(gauge.direction === "Centered") {


				if(gauge.barOrientation === "Horizontal") {
			

				} else if(gauge.barOrientation === "Vertical") {

					
				}
			
			}


		} 

		else if(gauge.shape === "Bar" && gauge.barType === "Image") {

			if(gauge.direction === "Forward") {

				if(gauge.barOrientation === "Horizontal") {
			

				} else if(gauge.barOrientation === "Vertical") {


				}

			} else if(gauge.direction === "Reversed") {

				if(gauge.barOrientation === "Horizontal") {
			

				} else if(gauge.barOrientation === "Vertical") {

					
				}

			} else if(gauge.direction === "Centered") {


				if(gauge.barOrientation === "Horizontal") {
			

				} else if(gauge.barOrientation === "Vertical") {

					
				}
			
			}


		} else if(gauge.shape === "Arc") { 

			if(gauge.direction === "Forward") {

			} else if (gauge.direction === "Reversed") {

			} else if (gauge.direction === "Centered") {

			}

		} else if (gauge.shape === "Pie") {

			if(gauge.direction === "Forward") {

			} else if (gauge.direction === "Reversed") {

			} else if (gauge.direction === "Centered") {
				
			}

		}

	}
Leave a Comment