IsStatic: Boolean
The IsStatic property determines if slider can move.
Use JSON or the setIsStatic method to set the property value and the getIsStatic method to get the property value.
If the property is false the slider can move, otherwise it cannot.
By default the property is set to False.
To execute the example, the page must contain the Slider component named slider (see Example of Creating the Slider Component). Create a new slider that cannot be moved manually, determine and set a new position for the slider:
// Get parent container for sliders of the component var parentNode = slider.getItemByIndex(0).getParentNode(); // Create a new slider var sliderItem = new PP.Ui.SliderItem({ ParentNode: parentNode, // Parent container IsStatic: true, // Attribute indicating that slider cannot be moved MaxValue: 1, // Maximum available value of the slider MinValue: 0 // Minimum available value of the slider }); // Set red borders of the slider var style = "width: 25px; height: 15px; border-color: red;"; sliderItem.setStyle(style); // Determine new position for the slider var position = { X: 50, Y: 7.5 } // Set new position for the slider sliderItem.setPosition(position);
After executing the example a new slider with red borders is created. The slider cannot be moved manually, and is set to a new position:
See also: