{"action":"created","issue":{"url":"https://api.github.com/repos/nfpirus/canvasHouse/issues/14","repository_url":"https://api.github.com/repos/nfpirus/canvasHouse","labels_url":"https://api.github.com/repos/nfpirus/canvasHouse/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/nfpirus/canvasHouse/issues/14/comments","events_url":"https://api.github.com/repos/nfpirus/canvasHouse/issues/14/events","html_url":"https://github.com/nfpirus/canvasHouse/issues/14","id":144071433,"number":14,"title":"CH-7 Создать элемент управления ","user":{"login":"v4a26","id":9762164,"avatar_url":"https://avatars.githubusercontent.com/u/9762164?v=3","gravatar_id":"","url":"https://api.github.com/users/v4a26","html_url":"https://github.com/v4a26","followers_url":"https://api.github.com/users/v4a26/followers","following_url":"https://api.github.com/users/v4a26/following{/other_user}","gists_url":"https://api.github.com/users/v4a26/gists{/gist_id}","starred_url":"https://api.github.com/users/v4a26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v4a26/subscriptions","organizations_url":"https://api.github.com/users/v4a26/orgs","repos_url":"https://api.github.com/users/v4a26/repos","events_url":"https://api.github.com/users/v4a26/events{/privacy}","received_events_url":"https://api.github.com/users/v4a26/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nfpirus/canvasHouse/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"v4a26","id":9762164,"avatar_url":"https://avatars.githubusercontent.com/u/9762164?v=3","gravatar_id":"","url":"https://api.github.com/users/v4a26","html_url":"https://github.com/v4a26","followers_url":"https://api.github.com/users/v4a26/followers","following_url":"https://api.github.com/users/v4a26/following{/other_user}","gists_url":"https://api.github.com/users/v4a26/gists{/gist_id}","starred_url":"https://api.github.com/users/v4a26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v4a26/subscriptions","organizations_url":"https://api.github.com/users/v4a26/orgs","repos_url":"https://api.github.com/users/v4a26/repos","events_url":"https://api.github.com/users/v4a26/events{/privacy}","received_events_url":"https://api.github.com/users/v4a26/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-03-28T20:13:41Z","updated_at":"2016-03-28T20:35:45Z","closed_at":null,"body":"Желтые квадратики.\r\n![default](https://cloud.githubusercontent.com/assets/9762164/14088654/64bbbd5c-f539-11e5-9243-e1c74c18bf42.PNG)\r\n\r\n```Typescript\r\nclass ShapeInnerWall implements IShape {\r\n    public type: number = 2;\r\n    public coord: ICoordinates;\r\n    public childrens: Array<IShape>;\r\n    public valid: boolean;\r\n    public renderObject: paper.Group;\r\n\r\n    constructor(coordinates: ICoordinates) {\r\n        this.coord = coordinates;\r\n    }\r\n}\r\n```\r\nСами элементы будут добавляться в` childrens: Array<IShape>;` (там где необходимо) в качестве первых двух детей. Первым делом организую события onMouseDrag.\r\n\r\nНасчет этого хочу спросить, в каком месте лучше устанавливать их внутрь класса?  В конструкторе класса или в RenderApi? Во втором случае меньше зависимостей, а в первом вроде -- полное определение класса"},"comment":{"url":"https://api.github.com/repos/nfpirus/canvasHouse/issues/comments/202571391","html_url":"https://github.com/nfpirus/canvasHouse/issues/14#issuecomment-202571391","issue_url":"https://api.github.com/repos/nfpirus/canvasHouse/issues/14","id":202571391,"user":{"login":"v4a26","id":9762164,"avatar_url":"https://avatars.githubusercontent.com/u/9762164?v=3","gravatar_id":"","url":"https://api.github.com/users/v4a26","html_url":"https://github.com/v4a26","followers_url":"https://api.github.com/users/v4a26/followers","following_url":"https://api.github.com/users/v4a26/following{/other_user}","gists_url":"https://api.github.com/users/v4a26/gists{/gist_id}","starred_url":"https://api.github.com/users/v4a26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v4a26/subscriptions","organizations_url":"https://api.github.com/users/v4a26/orgs","repos_url":"https://api.github.com/users/v4a26/repos","events_url":"https://api.github.com/users/v4a26/events{/privacy}","received_events_url":"https://api.github.com/users/v4a26/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T20:35:45Z","updated_at":"2016-03-28T20:35:45Z","body":"> лучше в ShapeInnerWall добавить отдельные свойства и методы для работы с маркерами\r\n \r\nПолучается обработчики событий в RenderAPI, внутри классов добавить полей под обработчики?\r\n\r\n> `children: [ { type: 5, coordinates: [ { x: 0, y: 2100 }, { x: 0, y: 2300 } ], }, { type: 6, coordinates: [ { x: 0, y: 2400 }, { x: 0, y: 2600 } ], } ] `\r\n\r\nПример для того, что бы показать что внутри children массив и заполнять его можно при помощи объектов в описании js?"}}