Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12391 closed defect (duplicate)

[patch][CCLA]dojox.gfx.canvas.Surface.setDimensions() will fail if the parameters are string (like '100px')

Reported by: Patrick Ruzand Owned by: Chris Mitchell
Priority: high Milestone: 1.7
Component: DojoX GFX Version: 1.6.0
Keywords: 1.7-mobile canvas setDimensions Cc:
Blocked By: Blocking:

Description

setting surface.setDimensions("100px","100px) fails. The reason is that the canvas element dimensions properties expect integer values (i.e. normalized length) while the current implementation uses the parameter values:

this.width = g.normalizedLength(width); in pixels this.height = g.normalizedLength(height); in pixels if(!this.rawNode) return this; this.rawNode.width = width; <<<< KO this.rawNode.height = height; <<<< KO

The 2 last lines should use the normalizedLength of the dimensions.

Patch from Eric Durocher (IBM, CCLA) to follow.

Attachments (2)

canvas_setDimensions.patch (517 bytes) - added by Patrick Ruzand 9 years ago.
Patch to fix surface.setDimensions
canvas_setDimensions.2.patch (547 bytes) - added by Patrick Ruzand 9 years ago.
fix base dir

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by Patrick Ruzand

Attachment: canvas_setDimensions.patch added

Patch to fix surface.setDimensions

comment:1 Changed 9 years ago by Chris Mitchell

Milestone: tbd1.7

comment:2 Changed 9 years ago by Patrick Ruzand

new patch: fix patch base directory (base dir. was dojox/gfx/, now root of dojox/)

Changed 9 years ago by Patrick Ruzand

fix base dir

comment:3 Changed 9 years ago by Chris Mitchell

Owner: changed from Eugene Lazutkin to Chris Mitchell

comment:4 Changed 9 years ago by Chris Mitchell

Resolution: duplicate
Status: newclosed

this ticket has coreq changes with 7782, and will be address in the 7782 patch.

comment:5 Changed 9 years ago by Patrick Ruzand

Note: See TracTickets for help on using tickets.