{"action":"created","issue":{"url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/31","repository_url":"https://api.github.com/repos/yo35/rpb-chessboard","labels_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/31/comments","events_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/31/events","html_url":"https://github.com/yo35/rpb-chessboard/issues/31","id":58642855,"number":31,"title":"Scrolling the board while scrolling the page [feature request]","user":{"login":"buffos","id":9776567,"avatar_url":"https://avatars.githubusercontent.com/u/9776567?v=3","gravatar_id":"","url":"https://api.github.com/users/buffos","html_url":"https://github.com/buffos","followers_url":"https://api.github.com/users/buffos/followers","following_url":"https://api.github.com/users/buffos/following{/other_user}","gists_url":"https://api.github.com/users/buffos/gists{/gist_id}","starred_url":"https://api.github.com/users/buffos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buffos/subscriptions","organizations_url":"https://api.github.com/users/buffos/orgs","repos_url":"https://api.github.com/users/buffos/repos","events_url":"https://api.github.com/users/buffos/events{/privacy}","received_events_url":"https://api.github.com/users/buffos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-02-23T20:26:29Z","updated_at":"2016-10-07T12:11:57Z","closed_at":null,"body":"Since i had to change the \".uichess-chessgame-floatLeft\" position to relative i thought it would be nice and logical to scroll the board with while we scroll the document.\r\n\r\ni guess this is pretty easy \r\na) just s = getElementByClassName(\"uichess-chessgame-floatLeft\")[0]\r\nb) add an eventListener for on scroll\r\nc) Get the top position of the s element (the board) in the document using \r\nv = s.getBoundingClientRect().top\r\nd) the in the onscrollEvent callback just monitor drop = document.body.scrolltop - v + threshold >0\r\n(threshold is a fixed value based on the design of the page if there any fixed toolbar on the top and the user will just that globally and by default has the value in pixels of the wordpress toolbar)\r\n\r\nso if drop>0 then just s.style.top = drop and the board will drop\r\n\r\nofcourse one should check that drop < container.bottom which you can get from getBoundingClientRect.bottom from the correct div "},"comment":{"url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/comments/252236832","html_url":"https://github.com/yo35/rpb-chessboard/issues/31#issuecomment-252236832","issue_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/31","id":252236832,"user":{"login":"smigielski","id":542611,"avatar_url":"https://avatars.githubusercontent.com/u/542611?v=3","gravatar_id":"","url":"https://api.github.com/users/smigielski","html_url":"https://github.com/smigielski","followers_url":"https://api.github.com/users/smigielski/followers","following_url":"https://api.github.com/users/smigielski/following{/other_user}","gists_url":"https://api.github.com/users/smigielski/gists{/gist_id}","starred_url":"https://api.github.com/users/smigielski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smigielski/subscriptions","organizations_url":"https://api.github.com/users/smigielski/orgs","repos_url":"https://api.github.com/users/smigielski/repos","events_url":"https://api.github.com/users/smigielski/events{/privacy}","received_events_url":"https://api.github.com/users/smigielski/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T12:11:57Z","updated_at":"2016-10-07T12:11:57Z","body":"I am thinking of one more possibility to add chessboard on the right or left side and make a fixed height of the box with scrollable text. \r\n\r\nSomething like here:\r\n![screen shot 2016-10-07 at 14 10 05](https://cloud.githubusercontent.com/assets/542611/19189370/f625ab36-8c97-11e6-8c46-c13eeb0a0994.png)\r\n\r\nMaybe this is a simple option. "}}
{"actor":{"display_login":"smigielski"}}