dimsemenov/photoswipe-deep-zoom-plugin — dự án mã nguồn mở — đang có 75 sao GitHub. High-resolution tile-based image zoom plugin for PhotoSwipe
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
A plugin that adds tile-based zoom support to PhotoSwipe. Supports Deepzoom and Zoomify tile formats.
Unlike conventional viewers such as OpenLayers or OpenSeaDragon, it displays tiles only when user zooms beyond the primary image size. If user does not zoom - PhotoSwipe operates as usual.
If you just want to display a single tiled image, consider using OpenLayers, OpenSeaDragon or Leaflet.
Initialization
The plugin requires a single JS file photoswipe-deep-zoom-plugin.esm.js. To view the source code visit src/.
Or install via NPM npm install photoswipe-deep-zoom-plugin.
import PhotoSwipeLightbox from './lib/photoswipe/photoswipe-lightbox.esm.js';
import PhotoSwipe from './lib/photoswipe/photoswipe.esm.js';
import PhotoSwipeDeepZoom from './photoswipe-deep-zoom-plugin.esm.js';
const lightbox = new PhotoSwipeLightbox({
gallery: '#gallery',
children: '.pswp-gallery__item',
pswpModule: PhotoSwipe,
// Recommended PhotoSwipe options for this plugin
allowPanToNext: false, // prevent swiping to the next slide when image is zoomed
allowMouseDrag: true, // display dragging cursor at max zoom level
wheelToZoom: true, // enable wheel-based zoom
zoom: false // disable default zoom button
});
const deepZoomPlugin = new PhotoSwipeDeepZoom(lightbox, {
// deep zoom plugin options, for example:
tileSize: 256
});
lightbox.init();
Tile URL. Can be also defined as tileUrl property of the slide data.
For example: https://example.com/images/my-image/{z}/{x}_{y}.jpg. {z}, {x} and {y} will be automaticlaly replaced with the corresponding tile coordinates.
If you're using Zoomify type, there in an additional template string {zoomify_group}. For example:
The viewer will load higher resolution tiles earlier on high DPI screens.
For example, if device pixel ratio is 2 (regular retina screen) and maxTilePixelRatio: 2, the viewer will render twice as many tiles.
If device pixel ratio is higher than maxTilePixelRatio, the viewer will render tiles according to the maxTilePixelRatio option. If it is lower - it'll render according to the device pixel ratio.
Build
To build and minify JS in dist/:
npm run build
To update GitHub pages:
npm run publish:demo
Changelog
v1.1
High dpi screens support, added option maxTilePixelRatio.
Added property pswp-max-zoom-width (pswpMaxZoomWidth) that allows increasing or reducing how far the slide can be zoomed.
The plugin now adjusts behaviour of the loading indicator, it's displayed when tiles are loading.
Added zoom keyboard shortcuts (+ and -).
Added reset zoom button, it's displayed when zoomed beyond x3 of the initial state.
dimsemenov/photoswipe-deep-zoom-plugin có những chủ đề gì?
GitHub topics của dimsemenov/photoswipe-deep-zoom-plugin: "gallery", "images", "lightbox", "tile", "zoom". TopGit xếp repo vào nhóm mã nguồn mở.
dimsemenov/photoswipe-deep-zoom-plugin có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho dimsemenov/photoswipe-deep-zoom-plugin. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
dimsemenov/photoswipe-deep-zoom-plugin có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho dimsemenov/photoswipe-deep-zoom-plugin. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
dimsemenov/photoswipe-deep-zoom-plugin còn đang phát triển không?
Commit gần nhất trên dimsemenov/photoswipe-deep-zoom-plugin là 4.6 năm trước (theo timestamp GitHub). Repo có 8 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc thêm về dimsemenov/photoswipe-deep-zoom-plugin ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/dimsemenov/photoswipe-deep-zoom-plugin là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
photoswipe-deep-zoom-plugin có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về photoswipe-deep-zoom-plugin.