{"action":"created","issue":{"url":"https://api.github.com/repos/rzzzwilson/pySlipQt/issues/4","repository_url":"https://api.github.com/repos/rzzzwilson/pySlipQt","labels_url":"https://api.github.com/repos/rzzzwilson/pySlipQt/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/rzzzwilson/pySlipQt/issues/4/comments","events_url":"https://api.github.com/repos/rzzzwilson/pySlipQt/issues/4/events","html_url":"https://github.com/rzzzwilson/pySlipQt/issues/4","id":314539295,"node_id":"MDU6SXNzdWUzMTQ1MzkyOTU=","number":4,"title":"Drawing view still broken","user":{"login":"rzzzwilson","id":582403,"node_id":"MDQ6VXNlcjU4MjQwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/582403?v=4","gravatar_id":"","url":"https://api.github.com/users/rzzzwilson","html_url":"https://github.com/rzzzwilson","followers_url":"https://api.github.com/users/rzzzwilson/followers","following_url":"https://api.github.com/users/rzzzwilson/following{/other_user}","gists_url":"https://api.github.com/users/rzzzwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/rzzzwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzzzwilson/subscriptions","organizations_url":"https://api.github.com/users/rzzzwilson/orgs","repos_url":"https://api.github.com/users/rzzzwilson/repos","events_url":"https://api.github.com/users/rzzzwilson/events{/privacy}","received_events_url":"https://api.github.com/users/rzzzwilson/received_events","type":"User","site_admin":false},"labels":[{"id":829534781,"node_id":"MDU6TGFiZWw4Mjk1MzQ3ODE=","url":"https://api.github.com/repos/rzzzwilson/pySlipQt/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"closed","locked":false,"assignee":{"login":"rzzzwilson","id":582403,"node_id":"MDQ6VXNlcjU4MjQwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/582403?v=4","gravatar_id":"","url":"https://api.github.com/users/rzzzwilson","html_url":"https://github.com/rzzzwilson","followers_url":"https://api.github.com/users/rzzzwilson/followers","following_url":"https://api.github.com/users/rzzzwilson/following{/other_user}","gists_url":"https://api.github.com/users/rzzzwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/rzzzwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzzzwilson/subscriptions","organizations_url":"https://api.github.com/users/rzzzwilson/orgs","repos_url":"https://api.github.com/users/rzzzwilson/repos","events_url":"https://api.github.com/users/rzzzwilson/events{/privacy}","received_events_url":"https://api.github.com/users/rzzzwilson/received_events","type":"User","site_admin":false},"assignees":[{"login":"rzzzwilson","id":582403,"node_id":"MDQ6VXNlcjU4MjQwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/582403?v=4","gravatar_id":"","url":"https://api.github.com/users/rzzzwilson","html_url":"https://github.com/rzzzwilson","followers_url":"https://api.github.com/users/rzzzwilson/followers","following_url":"https://api.github.com/users/rzzzwilson/following{/other_user}","gists_url":"https://api.github.com/users/rzzzwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/rzzzwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzzzwilson/subscriptions","organizations_url":"https://api.github.com/users/rzzzwilson/orgs","repos_url":"https://api.github.com/users/rzzzwilson/repos","events_url":"https://api.github.com/users/rzzzwilson/events{/privacy}","received_events_url":"https://api.github.com/users/rzzzwilson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-16T07:59:15Z","updated_at":"2018-09-24T03:03:37Z","closed_at":"2018-09-24T03:03:36Z","author_association":"OWNER","body":"The code to handle drawing the view is still broken.  Having a \"key\" tile isn't enough.  We need to handle this in:\r\n\r\n* The paintEvent() code that actually draws the view\r\n* The resizeEvent() that handles a widget resize\r\n* The drag code in mouseMoveEvent()\r\n* The use_level() code used to zoom/unzoom\r\n\r\nThe first above is the \"consumer\" of the state maintained by the other routines.\r\n\r\n### Map larger than view, wrap-around active\r\n\r\nThis is the easiest case.  On drag just update \"key\" tile.\r\n\r\n### Map larger than view, no wrap-around\r\n\r\nAlmost the same as with wrap-around, but we must decide when we can no longer drag and must adjust key if zooming to ensure map edge not pulled past view edge.\r\n\r\n### Map smaller than view, wrap-around active\r\n\r\nUse \"key\" tile idea.  On drag just update \"key\" tile.\r\n\r\n### Map smaller than view, no wrap-around\r\n\r\n\"key\" tile idea works, but must centre in axis.  Drag does nothing.\r\n\r\n### State variables\r\n\r\nAs before, use a \"key\" tile:\r\n\r\n```\r\nself.key_tile_left = 0      # tile coordinates of key tile\r\nself.key_tile_top = 0\r\nself.key_tile_xoffset = 0   # view coordinates of key tile wrt view\r\nself.key_tile_yoffset = 0\r\n```\r\n\r\nWe also have the current map and view sizes:\r\n\r\n```\r\nself.view_width = 0     # width/height of the view\r\nself.view_height = 0    # changes when the widget changes size\r\nself.map_width = 0      # width/height of the virtual map (not wrapped)\r\nself.map_height = 0     # in pixels (changes when zoom level changes)\r\n```\r\n\r\nWhat else do we need to make these operations easily update map/view state?\r\n\r\n* Drag\r\n* Zoom (up and down)\r\n* Resize\r\n\r\nmaybe:\r\n\r\n* variables keeping edge offsets - so if dragging we stop if offset goes \"edge on view\""},"comment":{"url":"https://api.github.com/repos/rzzzwilson/pySlipQt/issues/comments/423868762","html_url":"https://github.com/rzzzwilson/pySlipQt/issues/4#issuecomment-423868762","issue_url":"https://api.github.com/repos/rzzzwilson/pySlipQt/issues/4","id":423868762,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzg2ODc2Mg==","user":{"login":"rzzzwilson","id":582403,"node_id":"MDQ6VXNlcjU4MjQwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/582403?v=4","gravatar_id":"","url":"https://api.github.com/users/rzzzwilson","html_url":"https://github.com/rzzzwilson","followers_url":"https://api.github.com/users/rzzzwilson/followers","following_url":"https://api.github.com/users/rzzzwilson/following{/other_user}","gists_url":"https://api.github.com/users/rzzzwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/rzzzwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzzzwilson/subscriptions","organizations_url":"https://api.github.com/users/rzzzwilson/orgs","repos_url":"https://api.github.com/users/rzzzwilson/repos","events_url":"https://api.github.com/users/rzzzwilson/events{/privacy}","received_events_url":"https://api.github.com/users/rzzzwilson/received_events","type":"User","site_admin":false},"created_at":"2018-09-24T03:03:36Z","updated_at":"2018-09-24T03:03:36Z","author_association":"OWNER","body":"It's mostly working now.  Close this issue and open others for the details that still aren't working."}}
{"actor":{"display_login":"rzzzwilson"}}