Jun 10, 2014, 5:29 PM
[CLOSED] drawcomponent adding sprite in stead of replacing
Hi,
I am facing a very strange performance:
In a web site I'm using a drawcomponent that is filled with an image. The image is replaced when the users clicks at a button or by a selection event in a gridpanel. The image is constructed on the fly using a handler (ashx).
In one situation (after a selection event in a gridpanel) the sprite (type image) in the drawcomponent is not replaced. That is: it is not replaced when running the website under IIS on a live server. When running it in Visual Studio it works ok (image is replaced).
This is very curious. Do you have any idea what might go wrong.
Code for replacing the sprite:
Do you have any suggestion where to search. I looked at a delay in de selection event, but without any result.
Thanks,
Hans Wapenaar
I am facing a very strange performance:
In a web site I'm using a drawcomponent that is filled with an image. The image is replaced when the users clicks at a button or by a selection event in a gridpanel. The image is constructed on the fly using a handler (ashx).
In one situation (after a selection event in a gridpanel) the sprite (type image) in the drawcomponent is not replaced. That is: it is not replaced when running the website under IIS on a live server. When running it in Visual Studio it works ok (image is replaced).
This is very curious. Do you have any idea what might go wrong.
Code for replacing the sprite:
Dim cNewId As String = drawMap.ClientID + "_" + "spritebgrnd"
Dim spritebkgrnd As Sprite = drawMap.GetSprite(cNewId)
spritebkgrnd.Src = cNewText
Dim attrs As SpriteAttributes = New SpriteAttributes
attrs.Src = cNewText
attrs.Type = SpriteType.Image
attrs.Height = CInt(Session("iMapHeight"))
attrs.Width = CInt(Session("iMapWidth"))
spritebkgrnd.SetAttributes(attrs, True)
spritebkgrnd.Redraw()
When I check the result (F12 in IE9) the following is the result. Notice that App.drawMap_spritebgrnd appears twice in the list.<div class="x-surface x-surface-default" id="drawMap" style="width: 1560px; height: 951px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
<svg id="ext-gen1246" style="width: 1560px; height: 951px;" width="1560" height="951" xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs/>
<rect id="ext-gen1247" opacity="0" fill="#000" stroke="none" width="100%" height="100%"/>
<image id="App.drawMap_spritebgrnd" transform="matrix(1 0 0 1 0 0)" preserveAspectRatio="none meet" x="0" y="0" width="1560" height="951" href="MapHandler.ashx?test=2014061024091051177448" zIndex="0" src="MapHandler.ashx?test=2014061024091051177448" hidden="false"/>
<image id="App.drawMap_spritebgrnd" transform="matrix(1 0 0 1 0 0)" preserveAspectRatio="none meet" x="0" y="0" width="1560" height="951" href="MapHandler.ashx?test=2014061024021406900889" zIndex="0" src="MapHandler.ashx?test=2014061024021406900889" hidden="false"/>
To reconstruct the problem I made a small example with just png files as sprites, but of course: there everything works fine.Do you have any suggestion where to search. I looked at a delay in de selection event, but without any result.
Thanks,
Hans Wapenaar
Last edited by Daniil; Jun 12, 2014 at 11:04 AM.
Reason: [CLOSED]