Skip to main content

Search and Top Navigation

#2500 closed bug (fixed)

Opened March 13, 2008 02:03PM UTC

Closed March 14, 2008 11:21AM UTC

Last modified February 26, 2009 11:04AM UTC

ui.slider - moveTo assumes string-value is always relative

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

In the current moveTo implementation, if the value is a string, its always handled as a relative value. Instead it should be checked if the value really starts with +=, and applying the relative stuff only then.

This works quite well:

if(value.constructor == String) {
	if (/^\\-\\=/.test(value) ) {
		value = this.value() - parseInt(value.replace('-=', ''), 10)
	} else if (/^\\+\\=/.test(value) ) {
		value = this.value() + parseInt(value.replace('+=', ''), 10)
	} else {
		value = parseInt(value, 10);
	}
}
Attachments (0)
Change History (2)

Changed March 14, 2008 11:21AM UTC by joern comment:1

resolution: → fixed
status: newclosed

Fixed in [4897].

Changed February 26, 2009 11:04AM UTC by paul comment:2

milestone: → 1.5