Attribute settings: center, centre or both?

  • Out of curiosity...
    Since I started using Krpano, that was 2009!, I've been using "centre" (UK) instead of center (US) for several attributes. For example:

    edge="bottomcentre"
    origin="centre"

    Recently Umalo has pointed out how does my code work at all? *g*
    I always assumed that Krpano was clever enough to understand both "centre" and "center", the same way that it undrestands "bottomleft" and "leftbottom".
    Am I right, or have I been very lucky for the last 5 years that all my xml code worked properly? *smile*

    Cheers,

    Rafael

  • Hi,

    yes, this behavior is intended ;-).
    Only the occurrence of these tags - 'left', 'right', 'top' or 'bottom' - is important.

    E.g. when the align setting contains the text 'left' anywhere, then left align for the x-axis is assumed, when it contains 'right' then right align and in all other cases 'center' alignment for the x-axis is is assumed. The same works for the y-axis with 'top' and 'bottom'.

    This is allows many different writings - e.g. 'left-top' or 'top-left' or also 'leftop' for the left-top edge, for centering almost anything can be used - also 'middle' would be okay. For bottom aligment normally just 'bottom' would be enough but many are preferring to write 'bottom-center' or similar.

    Such 'smart' handling is done at several places in krpano, but the most secure way would be use the officially documented settings of course ;-).

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!