Opened 9 years ago

Closed 4 years ago

#12080 closed defect (patchwelcome)

Dojox gfx silverlight resize defect

Reported by: Siqi Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: DojoX GFX Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

Step1: Enable silverlight for the gfx rendering:

    gfxRenderer: 'svg,silverlight,vml'

Step2: Create the chart contained with in border container with in a dojox.layout.FloatingPane. When the FloatingPane gets resized, it invokes the resize method on the border container, which in turn resizes on the chart.

The issue is that even though the chart is been feed the correct size deals it will always render to the charts previous size. Which means that it is all ways one step behind the correct size.

This problem is only apparent when silverlight is used.

Attachments (1)

test_FloatingPane.html (3.3 KB) - added by Siqi 9 years ago.
Put it under "dojox/charting/tests/ ".

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by Siqi

Attachment: test_FloatingPane.html added

Put it under "dojox/charting/tests/ ".

comment:1 Changed 9 years ago by Eugene Lazutkin

Description: modified (diff)
Milestone: tbdfuture
Status: newassigned

comment:2 Changed 9 years ago by Siqi

I think that it is caused by something wrong in the function 'getDimensions' in dojox/gfx/silverlight.js. Sometimes the actualWidth/actualHeight of p.content is not updated after the function 'setDimensions' is invoked. So I think we can fix it by replacing actualWidth/actualHeight with width/height directly.

getDimensions: function(){
		var p = this.rawNode && this.rawNode.getHost();
		var t = p ? {width: p.content.actualWidth, height: p.content.actualHeight} : null;
		if(t.width  <= 0){ t.width  = this.width; }
		if(t.height <= 0){ t.height = this.height; }
		return t;
	}

comment:3 in reply to:  2 Changed 9 years ago by Eugene Lazutkin

Replying to Siqi:

So I think we can fix it by replacing actualWidth/actualHeight with width/height directly.

Please test, if it works, and submit a patch. If you don't have CLA with us, please file it too.

comment:4 Changed 9 years ago by Eugene Lazutkin

Related to #10885.

comment:5 Changed 4 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: assignedclosed

Silverlight is mostly abandoned as a tech, so closing as patchwelcome.

Note: See TracTickets for help on using tickets.