草庐IT

imgAreaSelect

全部标签

javascript - 在 jQuery 中,this.each() 是如何工作的?

为了让我的问题更具体,我阅读了.each()forjQuery的文档,但我有点困惑。我有这段代码:$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect')){if(options.remove){$(this).data('imgAreaSelect').remove();$(this).removeData('imgAreaSelect');}else$(this).data('imgAreaSelect').setOpt

javascript - 如何在新的 div 中显示 ImgAreaSelect 选定的图像

这是我的ImgAreaSelect代码:$(document).ready(function(){$('#ladybug_ant').imgAreaSelect({maxWidth:200,maxHeight:150,handles:true});});这段代码是我通过ImgAreaSelect为选择图像区域编写的。现在我想在新的div中选择图像。我希望你明白我想问什么。 最佳答案 答案在这里:http://odyniec.net/projects/imgareaselect/examples-callback.html-以活生生的

javascript - 如何在新的 div 中显示 ImgAreaSelect 选定的图像

这是我的ImgAreaSelect代码:$(document).ready(function(){$('#ladybug_ant').imgAreaSelect({maxWidth:200,maxHeight:150,handles:true});});这段代码是我通过ImgAreaSelect为选择图像区域编写的。现在我想在新的div中选择图像。我希望你明白我想问什么。 最佳答案 答案在这里:http://odyniec.net/projects/imgareaselect/examples-callback.html-以活生生的

php - 如何使用 jquery imgAreaSelect 使用 php 裁剪图像?

我正在使用以下javascript代码来实例化jqueryimgAreaSelect裁剪我的图像。$(document).ready(function(){$('#ladybug').imgAreaSelect({onSelectEnd:function(img,selection){$('input[name="x1"]').val(selection.x1);$('input[name="y1"]').val(selection.y1);$('input[name="x2"]').val(selection.x2);$('input[name="y2"]').val(selecti

javascript - Bootstrap 模式窗口中的错误位置 imgAreaSelect 插件

我在使用Bootstrap中的imgAreaSelect插件时遇到问题。我在初始化imgAreaSelect时设置了parent以防止滚动移动区域:thumb.imgAreaSelect({handles:true,aspectRatio:'1:1',fadeSpeed:300,parent:"#thumbBox"})这是我的html:Uploadyourpictureandcropit.当我尝试选择一个区域时,ImgAreaSelect选择了图片外的一个区域,但点(我的意思是x1、x2等)正是我想要的(功能正常但界面有问题)。在较小的设备中,ImgAreaSelect界面是nit但在