New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

preview-image-css3

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preview-image-css3

## 简介

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

图片预览组件——H5

简介

图片预览组件,基于 CSS3 实现,提供对图片的放大、缩小、移动等一些列的变换操作。

安装

  npm install preview-image-css3 --save-dev

使用

  var PreviewImage = require("preview-image-css3");
  var previewImage = new PreviewImage( element, {
    imageSrc: 'http://xxx.com/xxx.png', // 图片地址
    doubleZoom: 2, // 双击缩放
    maxZoom: 4, // 最大缩放
    minZoom: 1, // 最小缩放
    softY: true, // x 轴支持
    softX: true, // y 轴支持
  });

  previewImage.start(); // 开始执行图片拉取和渲染
  previewImage.unbind(); // 解除事件绑定
  previewImage.bind(); // 开启事件绑定
  previewImage.reset(); // 重置为初始状态

Keywords

preview

FAQs

Package last updated on 16 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts