Bug Tracker

Modify

Ticket #2508 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

ui.slider - Specified axis gets overwritten by "auto detection"

Reported by: joern Owned by: paul
Priority: major Milestone:
Component: ui Version:
Keywords: Cc:
Blocking: Blocked by:

Description

This code initializes the options:

//Prepare the passed options
this.options = $.extend({}, options);
var o = this.options;
$.extend(o, {
	axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'),
	maxValue: !isNaN(parseInt(o.maxValue,10)) ? parseInt(o.maxValue,10) :  100,
	minValue: parseInt(o.minValue,10) || 0
});

The docs say, for axis:

Normally you don't need to set this option because the plugin detects the slider orientation automatically. If the orientation is not correctly detected you can set this option to 'horizontal' or 'vertical'.

Looks to me like the specified option is always overwritten by the autodetection.

Change History

comment:1 Changed 5 years ago by joern

  • Status changed from new to closed
  • Resolution set to invalid
Missed the "o.axis
".

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.