SoFunction
Updated on 2025-04-03

JavaScript drag and pull zoom effect

JavaScript drag and pull zoom effect

Updated: December 10, 2008 17:45:02 Author:
Drag and zoom effect to adjust the area (width and height) of the layer by dragging the mouse. For example, the marquee effect.
The drag and pull scaling here is a little more complicated than the general marquee selection. It can set fixed trigger points in eight directions (directions), and can set the minimum range, maximum range and scale.
Like the drag-and-drop effect, the prototype of the program is also made when the image cutting effect is made. But there are many references to this effect. Basically, I have been exploring myself and took many detours. Now I have finally made the effect I want. The comparison between the program and the previous version has been "unrecognized". I still feel that there are many things that need improvement, just like there will never be the most perfect Turkish carpet.
There is also a simplified version of SimpleResize, which is easy to learn.
Online testinghttp://img./online/Resize/
Package download addresshttp://img./online/Resize/
ps: The instance contains drag and drop effects, but the two effects are completely independent, and the drag and drop parts can be scaled normally.
  • JavaScript
  • drag
  • Zoom

Related Articles

  • Full-screen command analysis and usage examples in JS

    I believe everyone is familiar with it, so some friends don’t know how to make it full screen. Here are some of them to introduce its commonly used commands and how to make it full screen.
    2013-12-12
  • JavaScript classic case simple calculator

    This article mainly introduces the simple calculator of JavaScript classic cases. The sample code in the article is introduced in detail and has a certain reference value. Interested friends can refer to it.
    2020-08-08
  • JS get scrollHeight problem think of standard problem

    If there is no document declaration, if there is a document declaration, it must be used.
    2007-05-05
  • Re-study on implementing OOP in JavaScript prototype mode

    Currently, the solutions for JavaScript implementing OOP mode on the Internet are basically prototype mode. The general example code is as follows
    2009-04-04
  • WeChat Xiaocha uses swiper component to realize the image carousel switching display function [with source code download]

    This article mainly introduces the use of the swiper component to realize the image carousel switching display function of WeChat Xiaochao, which involves the use of attributes related to the swiper component, and comes with source code for readers to download and refer to. Friends who need it can refer to it.
    2017-12-12
  • Bootstrap CSS layout buttons

    This article mainly introduces the relevant information about Bootstrap CSS layout buttons in detail, which has certain reference value. Interested friends can refer to it.
    2016-12-12
  • el-input instance code for display and hide functions of passwords in tags

    This article introduces the display and hiding of passwords in the el-input tag through example codes. The code is simple and easy to understand, very good, and has certain reference value. Friends who need it can refer to it.
    2019-07-07
  • js blocks avoid game code

    Mouse control, just don't let the blue squares touch the empty squares. See how long it can be played. It is a good game in JavaScript. Friends who want to write games with JS can refer to it. The code should be written by people from abroad.
    2008-05-05
  • When layer ui plug-in displays tips, how to modify font color

    Today, the editor will share with you an article on how to modify the font color when the layer ui plug-in displays tips. It has good reference value and hope it will be helpful to everyone. Let's take a look with the editor
    2019-09-09
  • First time to get into the magical Bootstrap navigation bar

    The first time I came into contact with the magical Bootstrap navigation bar, Bootstrap makes web development faster and simpler. Interested friends can refer to it.
    2016-08-08

Latest Comments