Suggestion: Allow disabling of scaling
-
I have a suggestion for the next version of the Cyclone Slider plugin: Allow disabling of scaling/auto height if desired. Currently the slideshow scales when the page gets narrower. Sometimes that isn’t desired and according to the underlying jQuery Cycle 2 plugin website it can be disabled by setting
data-cycle-auto-height="false"
I looked through the Cyclone plugin code and saw that this option isn’t there and when I delete the value for “height” in the admin panel it sets it to zero automatically which results in the slider not being visible at all (because it has zero height). I’ve currently worked around that by editing the “cycloneslider_settings()” fucntion on line 107 in cyclone-slider.php to look like this:
function cycloneslider_settings($slider_settings, $slider_id='', $slider_count=1){ if($slider_settings['height']==0) {$sliderHeight = 'false';} else {$sliderHeight = $slider_settings['width'].':'.$slider_settings['height'];} $out = ' data-cycle-slides="> div"'; $out .= ' data-cycle-auto-height="'.$sliderHeight.'"'; …
So, whenever one puts “0” (zero) into the “height” field in the admin panel, or leaves it blank, the aspect ratio/scaling is set to “false” and the slider doesn’t change the height when it gets narrower.
- The topic ‘Suggestion: Allow disabling of scaling’ is closed to new replies.