Event.RESIZE and jeash

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Event.RESIZE and jeash

tom rhodes
Hi,

looking through the jeash source i can see that both Event.RESIZE and Stage are implemented, but when i add a RESIZE event listener to the stage and compile to flash and jeash, the resize event handler function is never called. do i need to do something specific to jeash? or is it something i need to change in the css of the html page?

thanks.

tom.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Event.RESIZE and jeash

Niel Drummond-3
Hello,

resize event handling is unfortunately not quite there yet. I will put it on my todo, patches / test cases will also get things done quicker :-)

Please take the time to use the jeash tracker:
https://bugs.launchpad.net/jeash

Thanks,

- Niel

On 02/20/11 16:11, tom rhodes wrote:
Hi,

looking through the jeash source i can see that both Event.RESIZE and Stage are implemented, but when i add a RESIZE event listener to the stage and compile to flash and jeash, the resize event handler function is never called. do i need to do something specific to jeash? or is it something i need to change in the css of the html page?

thanks.

tom.


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Event.RESIZE and jeash

tom rhodes
That'll be why then :)

i've put a bug up on the tracker, i'm trying to work around it like this...

$(window).resize(function ()
var rootCanvas = jeash.Lib.jeashGetCanvas();
rootCanvas.width = $(window).width();
rootCanvas.height = $(window).height();
jeash.display.Stage.jeashOnResize(rootCanvas.width, rootCanvas.height);
});

...but no dice, the canvas width does change but nothing redraws as it does in flash when the event fires. it looks like everything is there to make it happen already :) any idea what i need to tweak?

cheers,

tom.

On 20 February 2011 17:32, Niel Drummond <[hidden email]> wrote:
Hello,

resize event handling is unfortunately not quite there yet. I will put it on my todo, patches / test cases will also get things done quicker :-)

Please take the time to use the jeash tracker:
https://bugs.launchpad.net/jeash

Thanks,

- Niel


On 02/20/11 16:11, tom rhodes wrote:
Hi,

looking through the jeash source i can see that both Event.RESIZE and Stage are implemented, but when i add a RESIZE event listener to the stage and compile to flash and jeash, the resize event handler function is never called. do i need to do something specific to jeash? or is it something i need to change in the css of the html page?

thanks.

tom.


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Event.RESIZE and jeash

Niel Drummond-3
Different display objects are handled as separate html entities, so you
would need to work out the scaling factor, and tell all elements in the
scenegraph to scale appropriately, probably using
Lib.jeashSetSurfaceTransform. Changing the root canvas width is only
going to modify the boundaries of the drawing area.

- Niel

tom rhodes wrote:

> That'll be why then :)
>
> i've put a bug up on the tracker, i'm trying to work around it like
> this...
>
> $(window).resize(function ()
> {
> var rootCanvas = jeash.Lib.jeashGetCanvas();
> rootCanvas.width = $(window).width();
> rootCanvas.height = $(window).height();
> jeash.display.Stage.jeashOnResize(rootCanvas.width, rootCanvas.height);
> });
>
> ...but no dice, the canvas width does change but nothing redraws as it
> does in flash when the event fires. it looks like everything is there
> to make it happen already :) any idea what i need to tweak?
>
> cheers,
>
> tom.
>
> On 20 February 2011 17:32, Niel Drummond <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello,
>
>     resize event handling is unfortunately not quite there yet. I will
>     put it on my todo, patches / test cases will also get things done
>     quicker :-)
>
>     Please take the time to use the jeash tracker:
>     https://bugs.launchpad.net/jeash
>
>     Thanks,
>
>     - Niel
>
>
>     On 02/20/11 16:11, tom rhodes wrote:
>>     Hi,
>>
>>     looking through the jeash source i can see that both Event.RESIZE
>>     and Stage are implemented, but when i add a RESIZE event listener
>>     to the stage and compile to flash and jeash, the resize event
>>     handler function is never called. do i need to do something
>>     specific to jeash? or is it something i need to change in the css
>>     of the html page?
>>
>>     thanks.
>>
>>     tom.
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Event.RESIZE and jeash

tom rhodes
ok, in my haxe code i handle redrawing everything, i just need to get that function to fire and it'll see the adjusted stageWidth and stageHeight. all works fine when the page loads, then if i change the browser dims and refresh it's all perfect. so i think all i need to get going is the firing of the Event.RESIZE. if i can do that with a little jQuery in the html page then that'll be ok for now.


On 20 February 2011 18:17, Niel Drummond <[hidden email]> wrote:
Different display objects are handled as separate html entities, so you would need to work out the scaling factor, and tell all elements in the scenegraph to scale appropriately, probably using Lib.jeashSetSurfaceTransform. Changing the root canvas width is only going to modify the boundaries of the drawing area.

- Niel

tom rhodes wrote:
That'll be why then :)

i've put a bug up on the tracker, i'm trying to work around it like this...

$(window).resize(function ()
{ var rootCanvas = jeash.Lib.jeashGetCanvas();
rootCanvas.width = $(window).width();
rootCanvas.height = $(window).height();
jeash.display.Stage.jeashOnResize(rootCanvas.width, rootCanvas.height);
});

...but no dice, the canvas width does change but nothing redraws as it does in flash when the event fires. it looks like everything is there to make it happen already :) any idea what i need to tweak?

cheers,

tom.

On 20 February 2011 17:32, Niel Drummond <[hidden email] <mailto:[hidden email]>> wrote:

   Hello,

   resize event handling is unfortunately not quite there yet. I will
   put it on my todo, patches / test cases will also get things done
   quicker :-)

   Please take the time to use the jeash tracker:
   https://bugs.launchpad.net/jeash

   Thanks,

   - Niel


   On 02/20/11 16:11, tom rhodes wrote:
   Hi,

   looking through the jeash source i can see that both Event.RESIZE
   and Stage are implemented, but when i add a RESIZE event listener
   to the stage and compile to flash and jeash, the resize event
   handler function is never called. do i need to do something
   specific to jeash? or is it something i need to change in the css
   of the html page?

   thanks.

   tom.


   --
   haXe - an open source web programming language
   http://haxe.org




--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org