English 中文(简体)
Jquery 作物插件, 不知道是否存在类似的东西
原标题:Jquery crop plugin, don t know if something like this exists

假设我有一个区域, 例如 200px 乘 100px 。 而不是在田里选择一个作物, 我希望田本身是作物面积, 我拖动图像而不是作物面积 。

"https://i.sstatic.net/hcKPV.jpg" alt="作物图像示例"/ >

所以您可以看到整张图像的边缘, 但是您只看到作物区域内的图像 。 您可以拖动图像周围, 并看到图像在其中的变化 。

最佳回答

这里需要一个简单的小概念。 它需要一些精细的修改以确保您无法拖过界限( 如果您在红色边框的 div 上开始拖动它, 它并不适用封闭规则), 但这应该能提供概念的证明 。

http://jsfiddle.net/foxwisp/G7cEP/1/

基本上,您只需更新掩码框的位置,使其分离,然后更新背景图像位置,使其看起来移动。

如果你需要我进一步解释,请通知我

问题回答

暂无回答




相关问题
jQuery - ScrollTo and Serial Scroll not working together

I have tested the scrollTo() plugin, but I need a way to stop the scrolling animation, so I am looking at serialScroll(). Here is what I used with scrollTo: $( #scroller ).scrollTo( 1000px , 3000); ...

jQuery deconstructors for plugins?

I m using the Galleria plugin inside an Accordion plugin to display images in a super cool way. A problem occurs, however, when I open up a new tab (in the accordion) then come back to the gallery tab....

XPCOM Security issues

I m developing a Firefox plugin using XPCOM, I ve not yet read all the docs, but as far as I can see, A plugin is simply a DLL that provides services via a XPCOM interface and interacts with the ...

Ruby on Rails plugin development process

I m considering developing aspects of a website as Rails plugins for reuse. My question is about the development process. Since each of these plugins will provide a "slice" of functionality, should ...

help mongrel wont start

I have decided to switch from Restful authentication to authlogic.. so what I did was delete every file and folder that got installed when I downloaded the plugin.. now when I try to "ruby script/...

Basic MEF workflow/usage

I m looking to a framework which will allow me to have a simple plugin system in my .NET application. It seems MEF is the framework which Microsoft is endorsing, and will become part of .NET 4 (it ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

java plugin cache and dynamic IP host

I m trying to use Amazon S3 and Amazon Cloudfront CDN to deliver the jar files of my applet application. I m seeing several cache misses of my jars by the java plugin. This is a show-stopper for me, ...

热门标签