---
title: "修复jquery图片裁剪插件CropZoom的BUG"
author: "gary0416"
date: "2011-07-15T12:41:33Z"
tags: ["jQuery", "图片裁剪"]
categories: ["Web前端"]
slug: "jquery-cropzoom-bug"
draft: false
lastmod: "2011-07-15T12:41:33Z"
id: 1125134
url: "https://gary0416.iteye.com/blog/1125134"
---

插件地址http://www.helloweba.com/view-blog-51.html

 

BUG:

参数x,y设置后无效

 

修正方法:

源码154行和155行,原为

 

 

```
$($image).attr('x', 0);
$($image).attr('y', 0);
```

 

 这里写死了...所以参数传不进来,修改为

 

```
$($image).attr('x', $options.x);
$($image).attr('y', $options.y);
```

 OK搞定