in partnership with mediatemple

Ticket #449 (reopened defect)

Opened 8 months ago

Last modified 2 days ago

Error when set Slider options steps = 0

Reported by: ming lin Owned by:
Type: defect Priority: minor
Milestone: Mootools version 1.3 Component: Plugins
Keywords: Cc:

Description

Following is the test case, please and please save it to a file and see for yourself in FireBug?.

Please save the following code to a html file and download a latest SVN and put it in the same folder. when you run it you will see Error reported by firebug: "$splat(value) has no properties", this only happen when I set the steps: 0.
but set steps:0 works on Mootools 1.11
Please let me know if you need more info (mingq.lin@gmail.com)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
	<title>mootools demos - Multiple Sliders in one page</title>
	<script type="text/javascript" src="mootools.js"></script>
	<script type="text/javascript">
		window.addEvent('domready', function(){
			/* Slider 1 */
			var mySlide = new Slider($('area'), $('knob'), {
				steps: 0,
				onChange: function(step){
					$('upd').setHTML(step);
				}
			}).set(0);
		});
	</script>
	<style type="text/css">
	#area {
		background-color:#cccccc;
		background-repeat:repeat-x;
		height: 15px;
		width: 200px;

	}

	#knob {
		background-color:#000;
		height: 15px;
		width: 25px;
}
    </style>
</head><body>
<div id="area">
	<div style="position: relative; left: 0px;" id="knob"></div>
</div>
<p id="upd">0</p>
</body></html>

Change History

Changed 8 months ago by ibolmo

  • status changed from new to closed
  • resolution set to wontfix

Thanks for the observation but it makes zero sense to have a Slider with "0" steps. That's not a slider. The slider would not move. The appropiate steps are > 0.

We'll add to the documentation, however. Thanks.

Changed 8 months ago by ming lin

  • status changed from closed to reopened
  • resolution deleted

Hello ibolmo, In Mootools Slider
when steps is equal -1, it means ZERO STEP
when steps is equal 0, it means only ONE STEP,
when steps is equal 1, it means Slider has TWO STEPS
...
For slider to have ONE STEP is make sense. It works on 1.1.
For 1.2 DEV, it works on ZERO STEP and MORE THAN ONE STEP, only ONE STEP DOESN'T WORK.
Please help fixing this issue

Changed 8 months ago by tomocchino

  • milestone changed from Mootools version 1.2 to Mootools version 1.3

This will be addressed when the Slider.js plugin is enhanced in the next release of MooTools after 1.2...

Changed 2 days ago by tomocchino

  • component set to Core
  • milestone set to Mootools version 1.3

Changed 2 days ago by tomocchino

  • priority changed from major to minor
  • component changed from Core to Plugins
Note: See TracTickets for help on using tickets.