Bug Tracker

Modify

Ticket #2591 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Slider size method only returns the width of the slider

Reported by: natecavanaugh Owned by: joern
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

Description

When checking for a sliders size, the size method only returns it's outerWidth, however, when using a vertical slider, you need the height of the slider, not its width.

The fix is to change this on line 192 in ui.slider.js:

return this.actualSize
(this.actualSize = this.element.outerWidth());

to this:

return this.actualSize
(this.actualSize = (this.options.axis == 'horizontal') ? this.element.outerWidth() : this.element.outerHeight());

Change History

comment:1 Changed 5 years ago by natecavanaug

Somehow the pipes are missing:

return this.actualSize | | (this.actualSize = (this.options.axis == 'horizontal') ? this.element.outerWidth() : this.element.outerHeight());

comment:2 Changed 5 years ago by paul

  • Owner changed from paul to joern

comment:3 Changed 5 years ago by joern

  • Status changed from new to closed
  • Resolution set to fixed

That got fixed some time ago, see latest revision.

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.