Giter Site home page Giter Site logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Heh, the clear method from UIForm was from the previous version, sorry, maybe I 
swapped windows or something and thought it was the newer one.

Original comment by [email protected] on 7 Aug 2012 at 3:52

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I made a patch with several changes:

https://gist.github.com/3294732

- Added some of the changes commented above.
- Commented some lines in layout as looking at the code it seems the behaviour 
is already applied several lines below (childAttributes.position(child, 
_inGroup && !_row);).
- Fixed some issues with parseLabel. defaultTextFormat setter doesn't format 
already set text, and checking @height for fixWidth doesn't seem right.
- I added an updateAfterEvent() call in page transitions... I use it for 
smoother transitions, but because of performance you may want to remove it.
- Several changes to UIScrollVertical, first, why the addChildAt(0)? it causes 
the content to stay behind behind other components, for example background 
images. Also, changed width and height usage to widthH and heightV, it seems 
right, as it is also used in the UI and in my case it improved its usage inside 
other containers.
- Added x, y, right and bottom properties when placing controls inside a frame 
container. This allows for anchoring, and placing controls in random positions 
without relying to code. Just using the UI XML.

I don't know if my changes cause any regression, I made a few tests and didn't 
see any. The app I'm working on saw several improvements thanks to these 
changes, like code reduction and dynamic placement of some controls without 
relying to more complex column or row layouts.

Original comment by [email protected] on 8 Aug 2012 at 12:41

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
"it seems right, as it is also used in the UI and" meant "it seems right, as it 
is also used in the constructor and"

Original comment by [email protected] on 8 Aug 2012 at 12:43

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Here is another patch to apply over the previous one:

https://gist.github.com/3344754

- Fixed some copy & paste errors.
- Looking at the code it seems attributes.height and attributes.width should be 
used for the size of control containers, if it isn't so, it looks OK to me. 
Seeing widthH and heightH are read-only maybe it would be more logical the 
other way around tho. Changed UIList and UIGroupedList accordingly, made some 
tests, and some cases where previous code resulted in wrongly sized lists now 
look OK.
- Changed how Attributes.parse() works, I think it is a bit clearer and 
consistent with the rest of the code this way, also, it fixes a problem with 
gapH and gapV in my previous patch.
- There is a line in original MadComponents code that looks like a copy & paste 
error: 

                _rendererAttributes.height=attributes.width - 2*attributes.paddingH;

I ran some regression tests, and didn't see any problem with my changes, but 
who knows...

Original comment by [email protected] on 13 Aug 2012 at 11:20

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
On the line that looks like a copy & paste error I changed:

+               _rendererAttributes.height=attributes.width - 2*attributes.paddingH;

To

+               _rendererAttributes.height=attributes.heightV - 2*attributes.paddingH;

It should be instead:

+               _rendererAttributes.height=attributes.heightV - 2*attributes.paddingV;

Original comment by [email protected] on 13 Aug 2012 at 11:23

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024

Original comment by [email protected] on 3 Sep 2012 at 2:50

  • Changed state: Started

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
When using the bottom and right properties alone a null reference error can be 
got in parseBlock because it tries to access child and it hasn't be set yet... 
quite obvious.

It depends of where you use these properties, since not always that parseBlock 
part is accessed called.

Haven't decided how to fix it yet.

Original comment by [email protected] on 9 Sep 2012 at 11:45

from mad-components.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Just to mention: Haven't decided how to fix it, but it may be possible to 
completely remove it. The layout function is always called at first after 
parseBlock, isn't it?

Original comment by [email protected] on 9 Sep 2012 at 12:12

from mad-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.