tapmodo/Jcrop

Circle thumbnail erorr

Opened this issue · 0 comments

I used the circle.html demo and simply adedd to the Jcrop function thumbnail like this
var thumbnail = this.initComponent('Thumbnailer', { width: 130, height: 230});
so the result look like this
`$('#target').Jcrop({

      // Change default Selection component for new selections
      selectionComponent: CircleSel,
      
      // Use a default filter chain that omits shader
      applyFilters: [ 'constrain', 'extent', 'backoff', 'ratio', 'round' ],
      
      // Start with circles only
      aspectRatio: 1,
      
      // Set an initial selection
      setSelect: [ 147, 55, 456, 390 ],
      
      // Only n/s/e/w handles
      handles: [ 'n','s','e','w' ],
      
      // No dragbars or borders
      dragbars: ['n','s','e','w'],
      borders: [ ]
      
    },function(){
      this.container.addClass('jcrop-circle-demo');
      interface_load(this);
      var thumbnail = this.initComponent('Thumbnailer', { width: 130, height: 230});

    });`

and i have such erorrs:
Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
at Thumbnailer.recopyCanvas (file:///../crop/Jcrop-WIP-2.x/js/Jcrop.js:1761:39)
at HTMLDivElement. (file:///../crop/Jcrop-WIP-2.x/js/Jcrop.js:1780:15)
at HTMLDivElement.dispatch (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:2:5418)
at HTMLDivElement.y.handle (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:2:2126)
at Object.trigger (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:2:4495)
at HTMLCanvasElement. (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:2:12222)
at Function.each (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:1:15879)
at init.each (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:1:12596)
at init.trigger (file:///../crop/Jcrop-WIP-2.x/js/jquery.min.js:2:12197)
at CanvasStage.redraw (file:///../crop/Jcrop-WIP-2.x/js/Jcrop.js:296:18)