Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1354] View center property does not work in Mobile Web

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2015-12-24T06:00:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio, Titanium SDK & CLI
Labelsn/a
ReporterFix Please
AssigneeSharif AbuDarda
Created2015-12-22T10:53:52.000+0000
Updated2016-03-08T07:37:46.000+0000

Description

<Alloy>
  <Window class="container" layout="absolute">
    <View id="red" backgroundColor="red"></View>
    <View id="green" backgroundColor="green"></View>
    <View id="blue" backgroundColor="blue"></View>
    <View id="yellow" backgroundColor="yellow"></View>
  </Window>
</Alloy>
".container": {
  backgroundColor:"white"
}

"View": {
  height: 150,
  width: 150,
  opacity: 0.7
}

"#red": {
  top: 150,
  left: 150
}

"#green": {
  bottom: 150,
  right: 150
}

"#blue": {
  height: 100,
  width: 100,

  center: {
    x: 150,
    y: 150
  }
}

Attachments

FileDateSize
centerPropertyDoesNotWork.jpg2015-12-22T10:50:00.000+000097042

Comments

  1. Sharif AbuDarda 2015-12-23

    Hello [~fixplease], According to [Appcelerator documentation](http://docs.appcelerator.com/platform/latest/#!/api/Point), Point attributes for center property in UI view is not available for Mobileweb. It's only available for iOS and Android. This is not a bug. Thanks.
  2. Fix Please 2015-12-23

    Hi Sharif, in this case there is a "bug" in the documentation: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-center There is nothing mentioned about platform compatibility of the 'center' property.
  3. Fix Please 2015-12-23

    PS. What about the TC-5759?
  4. Sharif AbuDarda 2015-12-24

    Hello, Read carefully my previous response. "Point attributes for center property in UI view is not available for Mobileweb". Go to the link you will see point attributes as providing "x" and "y" coordinates is not supported in Mobileweb. For using center property in views you need to provide the point attributes, in where the supported platform is given.
  5. Fix Please 2015-12-24

    Sharif, I always ready carefully. Please, do the same/ Go to the link you will see there is nothing written about that in the View description. !http://imghost.in/img/2015-12/24/s98c54xug31b53ixd4azqpw8h.jpg!

JSON Source