{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4076","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4076/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4076/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4076/events","html_url":"https://github.com/Leaflet/Leaflet/issues/4076","id":120874324,"number":4076,"title":"anchor popup to point feature dynamically on zoom event?","user":{"login":"JasonFitz","id":7906489,"avatar_url":"https://avatars.githubusercontent.com/u/7906489?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonFitz","html_url":"https://github.com/JasonFitz","followers_url":"https://api.github.com/users/JasonFitz/followers","following_url":"https://api.github.com/users/JasonFitz/following{/other_user}","gists_url":"https://api.github.com/users/JasonFitz/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonFitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonFitz/subscriptions","organizations_url":"https://api.github.com/users/JasonFitz/orgs","repos_url":"https://api.github.com/users/JasonFitz/repos","events_url":"https://api.github.com/users/JasonFitz/events{/privacy}","received_events_url":"https://api.github.com/users/JasonFitz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-07T21:41:40Z","updated_at":"2015-12-07T22:59:20Z","closed_at":"2015-12-07T22:01:34Z","body":"..not sure if this is an issue or just something I haven't figured out yet...\r\n\r\nWe have an app that uses divIcons for point markers.  The markers change size at different zoom levels (by using a variable concatenated into the html tag for the icon).  We also need to re-anchor the popup at different zoom levels for the different sized markers.\r\nIs there a way to do this?\r\n\r\n\r\nI tried adding the offset as a variable in the popup properties, but that hasn't worked:\r\n  var popupOptions = {        \r\n        autoPan:true,\r\n        closeButton: false,\r\n        minWidth: 220,\r\n        maxWidth: 220,\r\n        zoomAnimation:true,\r\n        offset: curOffset\r\n      };\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/162698776","html_url":"https://github.com/Leaflet/Leaflet/issues/4076#issuecomment-162698776","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4076","id":162698776,"user":{"login":"IvanSanchez","id":1125786,"avatar_url":"https://avatars.githubusercontent.com/u/1125786?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanSanchez","html_url":"https://github.com/IvanSanchez","followers_url":"https://api.github.com/users/IvanSanchez/followers","following_url":"https://api.github.com/users/IvanSanchez/following{/other_user}","gists_url":"https://api.github.com/users/IvanSanchez/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanSanchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanSanchez/subscriptions","organizations_url":"https://api.github.com/users/IvanSanchez/orgs","repos_url":"https://api.github.com/users/IvanSanchez/repos","events_url":"https://api.github.com/users/IvanSanchez/events{/privacy}","received_events_url":"https://api.github.com/users/IvanSanchez/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T22:59:20Z","updated_at":"2015-12-07T22:59:20Z","body":"The problem is that allowing users to change the `popupAnchor` property dinamically involves a lot of changes and testing to code that reliably, and it's not worth it (in my opinion) to code that into the leaflet core.\r\n\r\nPlease do look into a CSS solution. Keep the offset at [0,0] so you can manipulate it reliably with your code.\r\n\r\nAlso, refer to stackexchange to ask user questions like this one."}}