{"id":20529504,"url":"https://github.com/bmcmahen/image-zoom","last_synced_at":"2025-04-14T05:16:39.906Z","repository":{"id":57272188,"uuid":"13432822","full_name":"bmcmahen/image-zoom","owner":"bmcmahen","description":"smooth, iOS/medium.com style thumbnail viewing","archived":false,"fork":false,"pushed_at":"2017-05-05T20:32:14.000Z","size":521,"stargazers_count":37,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-01T12:36:43.311Z","etag":null,"topics":["image-zoom","images","javascript","thumbnails"],"latest_commit_sha":null,"homepage":"http://bmcmahen.github.io/image-zoom","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmcmahen.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-09T04:12:56.000Z","updated_at":"2024-06-13T13:58:44.000Z","dependencies_parsed_at":"2022-09-12T21:13:42.042Z","dependency_job_id":null,"html_url":"https://github.com/bmcmahen/image-zoom","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmcmahen%2Fimage-zoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmcmahen%2Fimage-zoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmcmahen%2Fimage-zoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmcmahen%2Fimage-zoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmcmahen","download_url":"https://codeload.github.com/bmcmahen/image-zoom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224859694,"owners_count":17381676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-zoom","images","javascript","thumbnails"],"created_at":"2024-11-15T23:32:28.210Z","updated_at":"2024-11-15T23:32:41.611Z","avatar_url":"https://github.com/bmcmahen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# image-zoom\n\nZoom an image to full-screen, as seen on Medium.com. It uses transforms for buttery smoothness, but should still work on older browsers given polyfills for classList \u0026 bind. [Demo here](http://bmcmahen.github.io/image-zoom).\n\nUsing React? Try [react-thumbnail-zoom](https://github.com/bmcmahen/react-thumbnail-zoom) instead.\n\n## Installation\n\n  Install using [Duo](http://github.com/duojs/duo) or NPM for use with browserify.\n  \n```\n$ npm install image-zoom\n```\n\n```\nvar Zoom = require('bmcmahen/image-zoom');\n```\n\n  or use the standalone build in `dist` using the global `Imagezoom`.\n\n## API\n\nYou can use markup (much like Bootstrap) for initiating zoom on certain elements.\n\n```html\n\u003cimg class='thumb' src='inst6.jpg' data-zoom-padding='20' data-zoom-url='inst6.jpg' data-zoom-overlay='true'\u003e\n\u003cscript src='imagezoom.js'\u003e\u003c/script\u003e\n```\n\nOr you can use the javascript API, like in the example below.\n\n```html\n\u003cimg class='thumb' src='inst6.jpg'\u003e\n\n\u003cscript\u003e\nvar ImageZoom = require('image-zoom');\n\nvar img = document.querySelector('img');\nvar zoom = new Imagezoom(img).overlay().padding(350);\n\nimg.onclick = function(e){\n  // stop propagation if we want to retain our HTML api\n  // in other parts of the site.\n  e.stopPropagation();\n  zoom2.show();\n};\n\n// unbind our delegate listener if we aren't\n// using the HTML api.\nzoom.stopListening();\n\n\u003c/script\u003e\n```\n\n### .show()\n\nZoom in.\n\n### .hide()\n\nZoom out.\n\n### .overlay()\n\nEnable the overlay when zooming into the image.\n\n### .padding(num)\n\nSet the padding of the zoomed image.\n\n### .use(plugin)\n\nUse a plugin.\n\n## Events\n\n### showing\n### shown\n### hiding\n### hidden\n### cancel\n\n```javascript\nvar zoom = require('image-zoom');\nvar z = zoom(document.querySelector('img'));\nz.on('shown', function(){\n  // our element is zoomed in\n});\n```\n\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmcmahen%2Fimage-zoom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmcmahen%2Fimage-zoom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmcmahen%2Fimage-zoom/lists"}