{"action":"created","issue":{"url":"https://api.github.com/repos/ngokevin/kframe/issues/110","repository_url":"https://api.github.com/repos/ngokevin/kframe","labels_url":"https://api.github.com/repos/ngokevin/kframe/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/ngokevin/kframe/issues/110/comments","events_url":"https://api.github.com/repos/ngokevin/kframe/issues/110/events","html_url":"https://github.com/ngokevin/kframe/issues/110","id":269310838,"number":110,"title":"[state] state managed objects do not get updated correctly","user":{"login":"mattrei","id":379706,"avatar_url":"https://avatars0.githubusercontent.com/u/379706?v=4","gravatar_id":"","url":"https://api.github.com/users/mattrei","html_url":"https://github.com/mattrei","followers_url":"https://api.github.com/users/mattrei/followers","following_url":"https://api.github.com/users/mattrei/following{/other_user}","gists_url":"https://api.github.com/users/mattrei/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrei/subscriptions","organizations_url":"https://api.github.com/users/mattrei/orgs","repos_url":"https://api.github.com/users/mattrei/repos","events_url":"https://api.github.com/users/mattrei/events{/privacy}","received_events_url":"https://api.github.com/users/mattrei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-28T11:36:44Z","updated_at":"2017-11-04T16:19:04Z","closed_at":null,"author_association":"NONE","body":"When I bind a state object to a component the A-Frame core function _updateProperties_ (_src/core/components.js_) is called. \r\nIn this function there is the following code:\r\n`\r\nskipTypeChecking = attrValue !== null && typeof this.previousAttrValue === 'object' &&\r\n                       attrValue === this.previousAttrValue;\r\n`\r\n\r\nHowever when changing the properties via this state component, the _this.previousAttrValue_ reference does not change although the contents may have changed and therefore the _skipTypeChecking_ value is wrong and the component does not get updated correctly...\r\n\r\nI think the _state_ components  _clearObject_ function should instantiate a new reference and not reuse the old one.\r\n`\r\nfunction clearObject (obj) {\r\n  var key;\r\n  for (key in obj) { delete obj[key]; }\r\n}\r\n`\r\n\r\nThen the  `this.previousAttrValue === attrValue` is not the same anymore. \r\n\r\nHope you get my description. Thx for all your efforts!"},"comment":{"url":"https://api.github.com/repos/ngokevin/kframe/issues/comments/341909480","html_url":"https://github.com/ngokevin/kframe/issues/110#issuecomment-341909480","issue_url":"https://api.github.com/repos/ngokevin/kframe/issues/110","id":341909480,"user":{"login":"mattrei","id":379706,"avatar_url":"https://avatars0.githubusercontent.com/u/379706?v=4","gravatar_id":"","url":"https://api.github.com/users/mattrei","html_url":"https://github.com/mattrei","followers_url":"https://api.github.com/users/mattrei/followers","following_url":"https://api.github.com/users/mattrei/following{/other_user}","gists_url":"https://api.github.com/users/mattrei/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrei/subscriptions","organizations_url":"https://api.github.com/users/mattrei/orgs","repos_url":"https://api.github.com/users/mattrei/repos","events_url":"https://api.github.com/users/mattrei/events{/privacy}","received_events_url":"https://api.github.com/users/mattrei/received_events","type":"User","site_admin":false},"created_at":"2017-11-04T16:19:04Z","updated_at":"2017-11-04T16:19:04Z","author_association":"NONE","body":"see here this example:\r\nhttps://glitch.com/edit/#!/state-selector-problem\r\n\r\nthe _this.data.entity_ is a string however it should be a selected DOM node.\r\n\r\nSee above where the problem (imo) is hiding."}}
{"actor":{"display_login":"mattrei"}}