# j-Crop

> j-Crop: zoom, držení a spuštění

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: cs
Content-SHA256: f1d1195e6a32f02b0f6607977fd260b5b53725cc073d6361bc4f1cca0b684712
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

__Podpora__:

- Zoom
- Přejít a drop
- Lokální soubory
- Odpovědnost
- automaticky otáčí obrázek podle informací EXIF

__Konfigurace__:

- `width {Number}` Cílová šířka, požadovaná
- `height {Number}` Cílová výška, požadovaná
- `dragdrop {Boolean}` umožňuje přepínání a odkládání (předvolené: `true`)
- `background {String}` barva pozadí (podle předvolby: transparentní)
- `format {String}` formát pro generátor souborů URL (předvolený: `{0}`)

__Atributy__
- `path="path-with-url-to-image"` - musí obsahovat URL obrázku

__Metody__:

```js
// e.g.
var component = FIND('croper');

// Resize canvas
component.reconfigure('width:500;height:200');

// Get cropped image
// component.output([type], [return_object])
var png = component.output('image/png');
var jpg = component.output('image/jpeg');

// Below method automatically detects the transparency and sets the output
var data = component.output();

// var data = component.output(true);
// data.filename {String}
// data.data {String} base64

// New method for clearing of canvas
component.clear();
```

Použijte ji s `<ui-component name="crop">`Pokud je součástka ještě nezačleněna, jComponent Stáhnout ji na první použití z adresy `DEF.fallback` a) The Componentator CDN dle předvolby. autor: Peter Širka. zdroj: Componentator Výrobce je autorizován, MIT licence.

```html example.html
<div style="width:500px">
	<ui-component name="crop" path="model.picture" config="width:200;height:200"></ui-component>
</div>

<script>
	var model = {};
	model.picture = 'https://avatars0.githubusercontent.com/u/2414252?v=3&s=460';
</script>
```
