Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8253 (new defect)

Opened 1 year ago

alignX/alignY bugs in slider.js

Reported by: NeoBlack Assigned to: thomas@fesch.at
Priority: high Milestone: 2.x
Component: script.aculo.us Version:
Severity: major Keywords:
Cc:

Description

I have found some bugs in the slider.js

I have fix this bugs in my version, here are the changes:

change 1:
line: 176
OLD:
this.track.style.width.replace(/px$/,"")) - this.alignY);

NEW:
this.track.style.width.replace(/px$/,"")) - this.alignX);

there are a wrong property in use.

change 2:
line 220-221:
OLD:
this.offsetX = (pointer[0] - offsets[0]);
this.offsetY = (pointer[1] - offsets[1]);

NEW:
this.offsetX = (pointer[0] - offsets[0] + this.alignX);
this.offsetY = (pointer[1] - offsets[1] + this.alignY);

the properties alignY and alignX where not uses by calculating the offset-values.

change 3:

line 233-234:
OLD:
this.offsetX = (pointer[0] - offsets[0]);
this.offsetY = (pointer[1] - offsets[1]);

NEW:
this.offsetX = (pointer[0] - offsets[0] + this.alignX);
this.offsetY = (pointer[1] - offsets[1] + this.alignY);

the properties alignY and alignX where not uses by calculating the offset-values.