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

iOS: Cannot get gradient properties after creation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.3.0
    • Component/s: iOS
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2018 Sprint 06 SDK, 2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK, 2018 Sprint 10 SDK

      Description

      Triggered by TIMOB-9366, a developer might want to receive gradient properties after creating the gradient. Example:

      var win = Titanium.UI.createWindow({
          backgroundColor:'#fff'
      });
       
      var gradient = {
          type: 'radial',
          startPoint: { x: 50, y: 50 },
          colors: [ 'red', 'blue'],
          startRadius: '90%',
          endRadius: 0
      };
      var radialGradient = Ti.UI.createView({
          width: 100,
          height: 100,
          backgroundGradient: gradient
      });
       
      win.addEventListener('open', function() {
        console.log(radialGradient.backgroundGradient.colors.join(', ')); // CRASH!
      });
       
      win.add(radialGradient);		
      win.open();
      

      This does not only effect the "colors" key but also "startPoint", "endPoint" and "type".

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Joshua Quick
              Tester:
              Samir Mohammed
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code