@github/image-crop-element

WebJar for @github/image-crop-element

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github__image-crop-element
Последняя версия

Последняя версия

3.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

@github/image-crop-element
WebJar for @github/image-crop-element
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/github/image-crop-element

Скачать github__image-crop-element

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github__image-crop-element/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github__image-crop-element</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github__image-crop-element/
implementation 'org.webjars.npm:github__image-crop-element:3.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github__image-crop-element/
implementation ("org.webjars.npm:github__image-crop-element:3.0.0")
'org.webjars.npm:github__image-crop-element:jar:3.0.0'
<dependency org="org.webjars.npm" name="github__image-crop-element" rev="3.0.0">
  <artifact name="github__image-crop-element" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github__image-crop-element', version='3.0.0')
)
libraryDependencies += "org.webjars.npm" % "github__image-crop-element" % "3.0.0"
[org.webjars.npm/github__image-crop-element "3.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

<image-crop-element>

This loads an image and creates a crop area that user can modify. An event is fired with x, y, width, and height as the crop area changes.

Installation

$ npm install --save @github/image-crop-element

Usage

Plain

<image-crop src="/avatar.jpg"></image-crop>

With loading state

<image-crop src="/avatar.jpg">
  <img src="spinner.gif" alt="" data-loading-slot>
</image-crop>

With autoupdate inputs

<image-crop src="/avatar.jpg">
  <input type="hidden" data-image-crop-input="x" name="x">
  <input type="hidden" data-image-crop-input="y" name="y">
  <input type="hidden" data-image-crop-input="width" name="width">
  <input type="hidden" data-image-crop-input="height" name="height">
</image-crop>

Listen to the change event

document.addEventListener('image-crop-change', function (event){
  console.log(
    'Crop area changed.',
    event.detail.x,
    event.detail.y,
    event.detail.width,
    event.detail.height
  )
})

Browser support

Browsers without native custom element support require a polyfill. Legacy browsers require various other polyfills. See examples/index.html for details.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge
org.webjars.npm

GitHub

How people build software.

Версии библиотеки

Версия
3.0.0