Home  >  Article  >  Web Front-end  >  JavaScript drag and zoom effect_javascript skills

JavaScript drag and zoom effect_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:57:391056browse

The drag and zoom here is a little more complicated than the general marquee. It can set fixed trigger points in eight directions (directions), and can set the minimum range, maximum range and proportional scaling.
Similar to the drag-and-drop effect, the prototype of the program is also created when making picture cutting effects. However, there are far fewer references for this effect. I basically explored it on my own and took many detours. Now I finally have the effect I want. Compared with the previous version, the program has changed beyond recognition. I still feel that there are many needs. There is room for improvement, just like there is never the perfect Turkish rug.
There is also a simplified version of SimpleResize here for easy learning.
Online testhttp://img.jb51.net/online/Resize/Resize.htm
Package download addresshttp://img.jb51.net/online/Resize /Resize.rar
ps: The example includes drag-and-drop effects, but the two effects are completely independent. You can still scale normally if you delete the drag-and-drop part.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn