Giter Site home page Giter Site logo

draggable's Introduction

Element(DOM) drag and resize (drag拖拽缩放插件)

Dragable is an element drag-and-zoom plug-in. It can freely implement drag-and-zoom, zoom and arrange layout of DOM elements with high scalability

draggable是一个元素拖拽缩放插件,它可以自由的实现DOM元素的拖拽、缩放、排列布局,可扩展性高

1.references in script tags(在script标签中引入)

<script src="./drag.js"></script>

2.how to use(如何使用)?

new Draggable(container, elem, dragHandle, resizeHandle, isPixel, dragFn, resizeFn)
params introduce(参数介绍)
  • container

Outer container for dragging elements(拖拽元素的外层容器)

  • elem

Dragged Zoom Elements(被拖拽缩放的元素)

  • dragHandle

Drag handle(拖拽的手柄)

  • resizeHandle

Zoom handle(缩放的手柄)

  • isPixel

Whether the element is positioned according to the pixel, default is true, false is percentage positioning(元素是否按照像素定位,默认为true,false则为百分比定位)

  • dragFn

Callback function after dragging(拖拽之后的回调函数)

  • resizeFn

Scaled callback function(缩放之后的回调函数)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.