{"action":"created","issue":{"url":"https://api.github.com/repos/nicoespeon/gitgraph.js/issues/116","repository_url":"https://api.github.com/repos/nicoespeon/gitgraph.js","labels_url":"https://api.github.com/repos/nicoespeon/gitgraph.js/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/nicoespeon/gitgraph.js/issues/116/comments","events_url":"https://api.github.com/repos/nicoespeon/gitgraph.js/issues/116/events","html_url":"https://github.com/nicoespeon/gitgraph.js/pull/116","id":172728550,"number":116,"title":"Fix offsetX and offsetY for older FF","user":{"login":"Fisjkars","id":1435052,"avatar_url":"https://avatars.githubusercontent.com/u/1435052?v=3","gravatar_id":"","url":"https://api.github.com/users/Fisjkars","html_url":"https://github.com/Fisjkars","followers_url":"https://api.github.com/users/Fisjkars/followers","following_url":"https://api.github.com/users/Fisjkars/following{/other_user}","gists_url":"https://api.github.com/users/Fisjkars/gists{/gist_id}","starred_url":"https://api.github.com/users/Fisjkars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fisjkars/subscriptions","organizations_url":"https://api.github.com/users/Fisjkars/orgs","repos_url":"https://api.github.com/users/Fisjkars/repos","events_url":"https://api.github.com/users/Fisjkars/events{/privacy}","received_events_url":"https://api.github.com/users/Fisjkars/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-23T15:20:51Z","updated_at":"2016-08-24T08:24:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nicoespeon/gitgraph.js/pulls/116","html_url":"https://github.com/nicoespeon/gitgraph.js/pull/116","diff_url":"https://github.com/nicoespeon/gitgraph.js/pull/116.diff","patch_url":"https://github.com/nicoespeon/gitgraph.js/pull/116.patch"},"body":"Hello,\r\n\r\nI had an issue when the canvas is not on the top of the page. (Firefox 38.XX)\r\nI change these two lines in order to be compatible with old Firefox because according to the definition of layerY.\r\n\r\n_This property takes scrolling of the page into account, and returns a value relative to the whole of the document, unless the event occurs inside a positioned element, **where the returned value is relative to the top left of the positioned element.**_\r\n\r\npageY take in account the whole page.\r\n\r\nThanks for your works!"},"comment":{"url":"https://api.github.com/repos/nicoespeon/gitgraph.js/issues/comments/241992391","html_url":"https://github.com/nicoespeon/gitgraph.js/pull/116#issuecomment-241992391","issue_url":"https://api.github.com/repos/nicoespeon/gitgraph.js/issues/116","id":241992391,"user":{"login":"Fisjkars","id":1435052,"avatar_url":"https://avatars.githubusercontent.com/u/1435052?v=3","gravatar_id":"","url":"https://api.github.com/users/Fisjkars","html_url":"https://github.com/Fisjkars","followers_url":"https://api.github.com/users/Fisjkars/followers","following_url":"https://api.github.com/users/Fisjkars/following{/other_user}","gists_url":"https://api.github.com/users/Fisjkars/gists{/gist_id}","starred_url":"https://api.github.com/users/Fisjkars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fisjkars/subscriptions","organizations_url":"https://api.github.com/users/Fisjkars/orgs","repos_url":"https://api.github.com/users/Fisjkars/repos","events_url":"https://api.github.com/users/Fisjkars/events{/privacy}","received_events_url":"https://api.github.com/users/Fisjkars/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T08:24:42Z","updated_at":"2016-08-24T08:24:42Z","body":"Hello,\r\n\r\noh yes... i didn't saw that point :/\r\nI had a look on jquery api code for offset to have an equivalent cross-client solution for these functions, unfortunately, imho I think it's not a sustainable solution for gitgraph to integrate this code. \r\n\r\nBtw, i'm not a js/jquery expert, so if you have alternative solution, i will happy to implement it.\r\n\r\nYou will find enclosed the concerned code in jQuery API.\r\n\r\nthanks again for your work, have a nice day.\r\n\r\n`jQuery.offset = {\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\r\n\t\t\tposition = jQuery.css( elem, \"position\" ),\r\n\t\t\tcurElem = jQuery( elem ),\r\n\t\t\tprops = {};\r\n\r\n\t\t// Set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tcurOffset = curElem.offset();\r\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\r\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\r\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\r\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\r\n\r\n\t\t// Need to be able to calculate position if either\r\n\t\t// top or left is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( options ) ) {\r\n\r\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\r\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};`"}}
{"actor":{"display_login":"Fisjkars"}}