Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26507

Windows: View.center is not respected when left & top is set.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Won't Do
    • Affects Version/s: Release 7.5.0
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      8
    • Sprint:
      2018 Sprint 22

      Description

      center property is not respected when left and top is set. Even when these properties are already set, center should be respected and update the position of the view. Also, we should be able to use undefined to "clear" existing values according to UNDEFINED behavior which is taken care by TIMOB-26507.

      var win = Ti.UI.createWindow({
          backgroundColor: 'green'
      });
       
      var view1 = Ti.UI.createView({
          width: 100, height: 100,
          top: 100, left: 100,
          backgroundColor: 'blue',
      });
       
      win.addEventListener('click', function (e) {
          // view1.top  = undefined;
          // view1.left = undefined;
          view1.center = { x: e.x, y:e.y };
      });
       
      win.add(view1);
      win.open();
      

      Expected: View should move to the position where you clicked.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                kiguchi Kota Iguchi
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-6663
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code