Yes, this works. Currently, it’s a little bit confusing for me to code in flexJS. Coding flexJS feels actually a little bit like HTML try and error.
Maybe, I am using FlexSDK too long, but I don’t know exactly what height=„100%“
in flexJS means.
Correct me if I am wrong, but in FlexSDK / Flash it means the component which
has the
height=„100%“ property, takes the full height which is available in the parent.
code for better visualization (actually this is not correct flexJS code):
<Container id=„TOP“ height=„100%“>
<Container id=„SUB1“ height=„25px“>
</Container>
<Container id=„SUB2“ height=„100%“>
</Container>
</Container>
Without setting any top, bottom, margin, etc. I would assume, that TOP height
is 100% of my
ViewBase. Let’s say 1000px. (This works without any problems.) So the SUB2
would be
1000px - 25px = 975px. But in real life, the SUB2 is also 1000px. This confuses
me a lot.
Why doesn’t work this in flexJS? Here I have to set the top / bottom / margin
and so on?
In my personal opinion this is a little step backwards in terms of „easy
coding“.
Is it planned to fix this some day, or is this one of the disadvantages we have
to live with?
Ok, this are my first 2 days with flexJS, I really hope it’s getting better.
It took me 2 days to code a horizontal centered page structure.
2 days with this easy stuff, which would be coded in FlexSDK in 15 minutes. Oh
god….
I really hope this is a logarithmic learning curve. ;-) I don’t even have any
data in my application.
I want to start with the layout and will add the data later.
Maybe, it's getting a little bit better later.
Actually, this reminds me a little bit of my HTML-fight with my Internet
Explorer 6, I had years ago.
But you guys doing a great job with flexJS, it’s the HTML which is the problem
here. :-)
Thanks
Marcus
> Am 11.12.2015 um 18:46 schrieb Alex Harui <[email protected]>:
>
> Are you trying to get the app to resize as the browser changes size?
>
> If so, try adding the BrowserResizeListener bead to the Application's beads.
>
> -Alex
>
> From: Marcus Fritze
> <[email protected]<mailto:[email protected]>>
> Reply-To: "[email protected]<mailto:[email protected]>"
> <[email protected]<mailto:[email protected]>>
> Date: Friday, December 11, 2015 at 6:35 AM
> To: "[email protected]<mailto:[email protected]>"
> <[email protected]<mailto:[email protected]>>
> Subject: [FlexJS] How can I set css values for <html> and <body> of the
> generated html file?
>
> When I set the height of ViewBase to 100% , this height isn’t actually 100%
> (visible) in the generated HTML file.
>
> It generates:
>
> <div id="viewBase" style="display: block; position: relative; width: 100%;
> height: 100%; padding: 10px; background-color: rgb(255, 0, 0);“>
>
> I recognized, that the 100% height is only working, when <html> and <body>
> has also "height:100%“ in style.
>
> So how can I set this style in my mxml file? I tried with
>
>
> @namespace html5 "library://ns.apache.org/flexjs/html5";
>
> html5|html, html5|body{
>
> height: 100%;
>
> }
>
> But this produces some compiler error. It looks like this namespace isn’t
> working in my IntelliJ. I don’t know why.
>
>
> Thanks
>
> Marcus
signature.asc
Description: Message signed with OpenPGP using GPGMail
