{"id":23053642,"url":"https://github.com/component/pinch","last_synced_at":"2025-06-30T15:37:13.890Z","repository":{"id":10358390,"uuid":"12497696","full_name":"component/pinch","owner":"component","description":"pinch in and out on elements on handheld devices","archived":false,"fork":false,"pushed_at":"2017-06-16T10:30:10.000Z","size":244,"stargazers_count":56,"open_issues_count":2,"forks_count":10,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-03T07:05:44.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://component.github.io/pinch/","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/component.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-08-30T23:46:40.000Z","updated_at":"2025-02-14T15:51:32.000Z","dependencies_parsed_at":"2022-09-22T19:01:26.743Z","dependency_job_id":null,"html_url":"https://github.com/component/pinch","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/component/pinch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fpinch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fpinch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fpinch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fpinch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/pinch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fpinch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262801817,"owners_count":23366629,"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":[],"created_at":"2024-12-16T00:18:56.266Z","updated_at":"2025-06-30T15:37:13.855Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# pinch\n\n  pinch in and out on elements on handheld devices.\n\n## Installation\n\n  Install with [component(1)](http://component.io):\n\n    $ component install component/pinch\n\n## Example\n\n```js\npinch(img, function(e) {\n  dot.style.left = e.x + 'px';\n  dot.style.top = e.y + 'px';\n  dot.style['-webkit-transform'] = 'scale(' + e.scale + ')';\n});\n```\n\n## API\n\n### Pinch(el, fn)\n\n  Initialize `Pinch` with the element `el` and callback function `fn`.\n\n```js\npinch(img, function(e) {\n  var midpoint = { x: e.x, y: e.y };\n  var scale = e.scale;\n});\n```\n\nThe event object `e` is augmented with following keys:\n\n- `x`: the x coordinate of the midpoint between your two fingers\n- `y`: the y coordinate of the midpoint between your two fingers\n- `scale`: the relative distance between your two fingers starting at 1.\n\n### Pinch.unbind()\n\n  Unbind\n\n## TODO\n\n* add `e.rotate` support for android\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fpinch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fpinch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fpinch/lists"}