您的位置:首页 > Web前端 > JavaScript

cropper.js 跨域问题

2015-06-02 20:48 531 查看
this.$clone = $clone = $('<img>');

$clone.one('load', $.proxy(function () {
var naturalWidth = $clone.prop('naturalWidth') || $clone.width(),
naturalHeight = $clone.prop('naturalHeight') || $clone.height();

this.image = {
naturalWidth: naturalWidth,
naturalHeight: naturalHeight,
aspectRatio: naturalWidth / naturalHeight,
rotate: 0
};

this.url = url;
this.ready = true;
this.build();
}, this)).one('error', function () {
$clone.remove();
}).attr({
//      crossOrigin: crossOrigin, // "crossOrigin" must before "src" (#271)
src: bustCacheUrl || url
});

注释掉那行crossOrigin就好了,还不清楚是什么作用
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: