AaronErhardt / AaronErhardt.github.io

My personal blog
https://aaronerhardt.github.io
3 stars 4 forks source link

Update factory_position.md #32

Closed tronta closed 3 years ago

tronta commented 3 years ago

Is this correct? I

AaronErhardt commented 3 years ago

It's basically correct, but you could theoretically also specify the width and height (how much rows and columns the widget takes).

Also I would put it a little different:

"The task of the position function is mainly to map the index to a specific position (x, y, width and height) of a factory widget inside the parent widget (view)."

tronta commented 3 years ago

What about area?

AaronErhardt commented 3 years ago

What do you mean with area?

tronta commented 3 years ago

The task of the position function is mainly to map the index to a specific area (x, y, width and height) of a factory widget inside the parent widget (view).

I mean something with width and height is an area, isn't it?

AaronErhardt commented 3 years ago

Oh, yeah technically you're right. But maybe position is still easier to understand? Because area in this case means only a part of the area of the grid which is not really intuitive, I guess.

tronta commented 3 years ago

My personal intuition is that the position is only x, y. An additional argument for using an other word could be to not only repeat the function name, but provide an alternative word. Maybe location could also be a good additional description, what do you think? We could also write position/location, position/area…

AaronErhardt commented 3 years ago

Yeah, I think writing position/area is probably the best solution.

AaronErhardt commented 3 years ago

Perfect :+1: