{"action":"created","issue":{"url":"https://api.github.com/repos/DDMAL/pixel_wrapper/issues/24","repository_url":"https://api.github.com/repos/DDMAL/pixel_wrapper","labels_url":"https://api.github.com/repos/DDMAL/pixel_wrapper/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/DDMAL/pixel_wrapper/issues/24/comments","events_url":"https://api.github.com/repos/DDMAL/pixel_wrapper/issues/24/events","html_url":"https://github.com/DDMAL/pixel_wrapper/issues/24","id":327492553,"number":24,"title":"Variablize the number of layers based on input/output ports","user":{"login":"EricHanLiu","id":17733887,"avatar_url":"https://avatars1.githubusercontent.com/u/17733887?v=4","gravatar_id":"","url":"https://api.github.com/users/EricHanLiu","html_url":"https://github.com/EricHanLiu","followers_url":"https://api.github.com/users/EricHanLiu/followers","following_url":"https://api.github.com/users/EricHanLiu/following{/other_user}","gists_url":"https://api.github.com/users/EricHanLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/EricHanLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricHanLiu/subscriptions","organizations_url":"https://api.github.com/users/EricHanLiu/orgs","repos_url":"https://api.github.com/users/EricHanLiu/repos","events_url":"https://api.github.com/users/EricHanLiu/events{/privacy}","received_events_url":"https://api.github.com/users/EricHanLiu/received_events","type":"User","site_admin":false},"labels":[{"id":925779498,"url":"https://api.github.com/repos/DDMAL/pixel_wrapper/labels/Project:%20PIXEL","name":"Project: PIXEL","color":"e5246e","default":false},{"id":915032017,"url":"https://api.github.com/repos/DDMAL/pixel_wrapper/labels/Project:%20Pixel/CM","name":"Project: Pixel/CM","color":"375e97","default":false},{"id":665304020,"url":"https://api.github.com/repos/DDMAL/pixel_wrapper/labels/bug","name":"bug","color":"ee0701","default":true},{"id":665304028,"url":"https://api.github.com/repos/DDMAL/pixel_wrapper/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"EricHanLiu","id":17733887,"avatar_url":"https://avatars1.githubusercontent.com/u/17733887?v=4","gravatar_id":"","url":"https://api.github.com/users/EricHanLiu","html_url":"https://github.com/EricHanLiu","followers_url":"https://api.github.com/users/EricHanLiu/followers","following_url":"https://api.github.com/users/EricHanLiu/following{/other_user}","gists_url":"https://api.github.com/users/EricHanLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/EricHanLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricHanLiu/subscriptions","organizations_url":"https://api.github.com/users/EricHanLiu/orgs","repos_url":"https://api.github.com/users/EricHanLiu/repos","events_url":"https://api.github.com/users/EricHanLiu/events{/privacy}","received_events_url":"https://api.github.com/users/EricHanLiu/received_events","type":"User","site_admin":false},"assignees":[{"login":"EricHanLiu","id":17733887,"avatar_url":"https://avatars1.githubusercontent.com/u/17733887?v=4","gravatar_id":"","url":"https://api.github.com/users/EricHanLiu","html_url":"https://github.com/EricHanLiu","followers_url":"https://api.github.com/users/EricHanLiu/followers","following_url":"https://api.github.com/users/EricHanLiu/following{/other_user}","gists_url":"https://api.github.com/users/EricHanLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/EricHanLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricHanLiu/subscriptions","organizations_url":"https://api.github.com/users/EricHanLiu/orgs","repos_url":"https://api.github.com/users/EricHanLiu/repos","events_url":"https://api.github.com/users/EricHanLiu/events{/privacy}","received_events_url":"https://api.github.com/users/EricHanLiu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-05-29T21:22:56Z","updated_at":"2018-05-30T15:55:06Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Idea to try:\r\n1. create ~8 optional input and output ports\r\n2. in `get_my_interface()` create an array of layer_urls\r\n3. only add to the array if the url is non-empty (follow if statement structure)\r\n4. Pass this array as the context to the index.html w/ django\r\n5. in the index.html create an array variable with this array from controller, count length\r\n6. Create the img objects based on the non-empty urls\r\n7. Use the length in Pixel source to create the number of default and required layers dynamically\r\n\r\nALSO NEED TO:\r\n1. disable the create/delete layer buttons if we're using the pixel_wrapper (not the standalone)\r\n2. Maybe do this by passing a parameter when pixel is created as a plugin? or in the standalone pixel add a quick check as to whether or not the wrapper elements are present\r\n3. Ensure the number of input and output ports is the same"},"comment":{"url":"https://api.github.com/repos/DDMAL/pixel_wrapper/issues/comments/393215648","html_url":"https://github.com/DDMAL/pixel_wrapper/issues/24#issuecomment-393215648","issue_url":"https://api.github.com/repos/DDMAL/pixel_wrapper/issues/24","id":393215648,"user":{"login":"EricHanLiu","id":17733887,"avatar_url":"https://avatars1.githubusercontent.com/u/17733887?v=4","gravatar_id":"","url":"https://api.github.com/users/EricHanLiu","html_url":"https://github.com/EricHanLiu","followers_url":"https://api.github.com/users/EricHanLiu/followers","following_url":"https://api.github.com/users/EricHanLiu/following{/other_user}","gists_url":"https://api.github.com/users/EricHanLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/EricHanLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricHanLiu/subscriptions","organizations_url":"https://api.github.com/users/EricHanLiu/orgs","repos_url":"https://api.github.com/users/EricHanLiu/repos","events_url":"https://api.github.com/users/EricHanLiu/events{/privacy}","received_events_url":"https://api.github.com/users/EricHanLiu/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T15:55:06Z","updated_at":"2018-05-30T15:55:06Z","author_association":"CONTRIBUTOR","body":"Finished the idea, works properly now with a variable amount of input and output ports.\r\n\r\nNote that the number of input/output ports **for layers** should be the same, excluding the mandatory layer 0 output port (background layer)\r\n\r\nNow just need to disable the create and remove layer buttons in the wrapper."}}
{"actor":{"display_login":"EricHanLiu"}}