{"action":"closed","issue":{"url":"https://api.github.com/repos/aaronkennedy/ZingElements/issues/35","labels_url":"https://api.github.com/repos/aaronkennedy/ZingElements/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/aaronkennedy/ZingElements/issues/35/comments","events_url":"https://api.github.com/repos/aaronkennedy/ZingElements/issues/35/events","html_url":"https://github.com/aaronkennedy/ZingElements/issues/35","id":34762760,"number":35,"title":"Another crasher","user":{"login":"designker","id":1957186,"avatar_url":"https://avatars.githubusercontent.com/u/1957186?v=3","gravatar_id":"","url":"https://api.github.com/users/designker","html_url":"https://github.com/designker","followers_url":"https://api.github.com/users/designker/followers","following_url":"https://api.github.com/users/designker/following{/other_user}","gists_url":"https://api.github.com/users/designker/gists{/gist_id}","starred_url":"https://api.github.com/users/designker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/designker/subscriptions","organizations_url":"https://api.github.com/users/designker/orgs","repos_url":"https://api.github.com/users/designker/repos","events_url":"https://api.github.com/users/designker/events{/privacy}","received_events_url":"https://api.github.com/users/designker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aaronkennedy/ZingElements/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2014-06-02T10:59:53Z","updated_at":"2015-02-09T11:27:41Z","closed_at":"2015-02-09T11:27:41Z","body":"Comment line 47 back in to crash\r\n\r\nRectangle as root {\r\n    color: \"white\"\r\n    \r\n    property int minimumSpace: 1\r\n    property int rectangleSize: (root.width - (minimumSpace * 5)) / 4\r\n    \r\n    Row {\r\n        x: root.minimumSpace * 2\r\n        y: root.minimumSpace * 2\r\n        width: root.width\r\n        spacing: root.minimumSpace * 1\r\n        \r\n        Rectangle as rect1 {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"grey\"\r\n            scale: 1\r\n            TouchArea {\r\n                width: parent.width\r\n                height: parent.height\r\n                on tapped {\r\n                    \r\n                }\r\n            }\r\n            \r\n        }\r\n        \r\n        Rectangle as rect2{\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"darkgrey\"\r\n            Item {\r\n                x: parent.width * 0.1\r\n                y: parent.height * 0.6\r\n                Rectangle {\r\n                    width: rect1.width / 3\r\n                    height: rect1.height / 10\r\n                    color: \"white\"\r\n                    Text as t1{\r\n                        x: (parent.width - width) / 2\r\n                        y: (parent.height - height) / 2\r\n                        text: \"RECTANGLE\"\r\n                        size: parent.height / 2\r\n                        font: \"GillSans\"\r\n                    }\r\n                    Text {\r\n                        // size: t1.size * 2\r\n                        color: \"white\"\r\n                        text: \"Radius\"\r\n                    }\r\n                }\r\n            }\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect2.radius; from: 0; to: 100; duration: 1000; easing: ElasticEasing {type: 1; }\r\n                    }\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect2.radius; to: rect2.width/2; duration: 1000; easing: Easing {type:Easing.InExpo}\r\n                    }\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect2.radius; to: 0; duration: 1000; easing: ElasticEasing {type: 0; amplitude: 1.5; period: 0.5}\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        \r\n        Rectangle as rect3{\r\n            property int b: 0\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"lightgrey\"\r\n            border.width: rect3.b\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect3.b; from: 0; to: 10; duration: 1000; //easing: ElasticEasing {type: 1; }\r\n                    }\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect3.b; to: 0; duration: 1000; //easing: ElasticEasing {type: 1; }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        \r\n        \r\n        Rectangle as rect4{\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"grey\"\r\n            HueSaturation as hs{\r\n                width: parent.width\r\n                height: parent.height\r\n                item: rect4\r\n                hue: 0\r\n                lightness: 0.2\r\n                LoopAnimation {\r\n                    running: true\r\n                    NumberAnimation {\r\n                        property: hs.hue; from: 0; to: 1; duration: 20000; \r\n                    }\r\n                    \r\n                }\r\n                LoopAnimation {\r\n                    running: true\r\n                    SequentialAnimation {\r\n                        NumberAnimation {\r\n                            property: hs.lightness; from: 0; to: 0.9; duration: 20000; \r\n                        }\r\n                        NumberAnimation {\r\n                            property: hs.lightness; from: 0.9; to: 0; duration: 20000; \r\n                        }   \r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n    \r\n    Row {\r\n        x: root.minimumSpace * 2\r\n        y: 3 * root.minimumSpace + root.rectangleSize\r\n        width: root.width\r\n        spacing: root.minimumSpace\r\n        \r\n        Rectangle as rect5 {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"red\"\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect5.opacity; from: 0; to: 1; duration: 1000; easing: Easing {type: Easing.InSine }\r\n                    }\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect5.opacity; from: 1; to: 0; duration: 1000; easing: Easing {type: Easing.InOutSine }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        \r\n        Rectangle as rect6 {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"orange\"\r\n            scale: 0\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect6.scale; from: 0; to: 1; duration: 1000; easing: ElasticEasing {type: 1; }\r\n                    }\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rect6.scale; from: 1; to: 0; duration: 1000; easing: ElasticEasing {type: 0; amplitude: 1.5; period: 0.5}\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        \r\n        Rectangle as rectHorizontalScale {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"green\"\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    NumberAnimation {\r\n                        property: rectHorizontalScale.horizontalScale; from: -1; to: 1; duration: 1000; \r\n                    }\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                }\r\n            }\r\n        }\r\n        \r\n        Rectangle as rectVerticalScale {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"lightgreen\"\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rectVerticalScale.verticalScale; from: -1; to: 1; duration: 1000; \r\n                    }\r\n                }\r\n            }\r\n        }\r\n        \r\n    } \r\n    \r\n    Row {\r\n        x: root.minimumSpace * 2\r\n        y: 4 * root.minimumSpace + root.rectangleSize * 2\r\n        width: root.width\r\n        spacing: root.minimumSpace\r\n        \r\n        Rectangle as rectRotation {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"pink\"\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1000; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rectRotation.rotation; from: 0; to: 90; duration: 1000; \r\n                    }\r\n                }\r\n            }\r\n        }\r\n        Rectangle as rectTransformOrigin {\r\n            width: root.rectangleSize\r\n            height: width\r\n            color: \"purple\"\r\n            transformOrigin: Item.TopLeft\r\n            \r\n            function changeTransformOrigin() {\r\n                print(rectTransformOrigin.transformOrigin)\r\n                switch (rectTransformOrigin.transformOrigin) {\r\n                    case 0: // Item.Center\r\n                    // This case never happens.\r\n                    break;\r\n                    case 1: // Item.TopLeft\r\n                    rectTransformOrigin.transformOrigin = Item.Top;\r\n                    break;\r\n                    case 2: // Item.Top\r\n                    rectTransformOrigin.transformOrigin = Item.TopRight;\r\n                    break;\r\n                    case 3: // Item.TopRight\r\n                    rectTransformOrigin.transformOrigin = Item.Right;\r\n                    break;\r\n                    case 4: // Item.Left\r\n                    rectTransformOrigin.transformOrigin = Item.TopLeft;\r\n                    break;\r\n                    case 5: // Item.Right\r\n                    rectTransformOrigin.transformOrigin = Item.BottomRight;\r\n                    break;\r\n                    case 6: // Item.BottomLeft\r\n                    rectTransformOrigin.transformOrigin = Item.Left;\r\n                    break;\r\n                    case 7: // Item.Bottom\r\n                    rectTransformOrigin.transformOrigin = Item.BottomLeft;\r\n                    break;\r\n                    case 8: // Item.BottomRight\r\n                    rectTransformOrigin.transformOrigin = Item.Bottom;\r\n                    break;\r\n                }\r\n            }\r\n            LoopAnimation {\r\n                running: true\r\n                SequentialAnimation {\r\n                    PauseAnimation { duration: 1500; variance: 1000}\r\n                    NumberAnimation {\r\n                        property: rectTransformOrigin.rotation; from: 0; to: 360; duration: 1500; easing: Easing {type:Easing.InOutExpo}\r\n                    }\r\n                    ScriptAnimation { script: rectTransformOrigin.changeTransformOrigin() }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"}}