18 Star 68 Fork 11

一生中最爱 / miniView

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

MiniView.js - An interesting web plugin !

I offer you a web plugin based on jquery that make a mini view of a container on your page. And support mousewheel zoom in.

support

  • ie9+
  • chrome
  • edge

Quickstart

Load up miniView.js (after jQuery):

<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="miniView.js"></script>

Then add a container with attribute id that much larger than the parent container

<div class="borderDiv" style="width: 800px; height: 600px; overflow: hidden; border: 1px solid;">
  <div class="mainContainer" id="view" style="width: 2000px; height: 1500px; background-color: #bad6cb"></div>
</div>

After the page is loaded, use init method to initialize the mini view. The method accept config that you can define the scale value, selector and parent scale value.

var miniMapObject = MiniMap.init({selector:"#view"});

Method

init

param: config. json format

key Behavior
selector Jquery selector with id attribute
zoom           Scale value of the mini map. default value 0.1
viewZoom Scale value of the container. default value 1
isEnableMouseWheel Whether enable mousewheel to zoom the container

refresh

param: config. just like init method.

Demo

image

空文件

简介

小地图,缩略图。可缩放、拖拽 展开 收起
JavaScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/dong_admin/miniView.git
git@gitee.com:dong_admin/miniView.git
dong_admin
miniView
miniView
master

搜索帮助