Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1798 closed defect (fixed)

ProgressBar widget inconsistency with dimension styling

Reported by: pbeshai Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: progressbar dimensions Cc:
Blocked By: Blocking:

Description

In ProgressBar?.js, at lines 28 and 29, width and height are defined as integers: width: 300, height: 30,

On lines 84 and 85: this.domNode.style.height = this.height; this.domNode.style.width = this.width;

When defining the style.height/width of the domNode, the integers are used which causes problems in FireFox?. The problem is resolved by adding a measurement to the end, ie: this.domNode.style.height = this.height + "px"; this.domNode.style.width = this.width + "px";

I have tried getting around this by simply setting height/width as XXXpx when I define the widget, which works fine for the height, but causes problems with the width. I believe this is because of the discrepancies at lines 261-264:

var _leftFront = (this.width - _widthFront)/2 + "px"; var _bottomFront = (parseInt(this.height) - parseInt(_heightFront))/2 + "px"; var _leftBack = (this.width - _widthBack)/2 + "px"; var _bottomBack = (parseInt(this.height) - parseInt(_heightBack))/2 + "px";

If this.width had parseInt() around it like this.height does, it would work. An occurrence that would need parseInt() as well would be at line 121.

While I think that simply appending lines 84 and 85 would solve the problem, the extra parseInts wouldn't hurt!

Attachments (1)

ProgressBar.js.diff (2.0 KB) - added by nicola.rizzo+dojo@… 13 years ago.
[patch][cla] fix for ProgressBar? dimensions

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by nicola.rizzo+dojo@…

Attachment: ProgressBar.js.diff added

[patch][cla] fix for ProgressBar? dimensions

comment:1 Changed 13 years ago by bill

Milestone: 0.4.1

Thanks, I'm checking in the patch now.

comment:2 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

(In [6428]) Fixes #1798. Patch from Nicola Rizzo (CLA on file).

comment:3 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.