Download the PHP package zara-4/crop-select-js without Composer

On this page you can find all versions of the php package zara-4/crop-select-js. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package crop-select-js

CropSelectJs

A simple image cropping selection jQuery plugin.

View working example >

By Zara 4 image compression service

Installation

You will need to include both crop-select-js.min.js and crop-select-js.min.css into your web page.

Basic Example

Html code

Javascript code

Functions

To call a function on a CropSelectJs element, follow the pattern below. Replace the text 'function' with the name of the function you wish to call.

The functions available are listed below:

Function Description
enableAnimatedBorder Make the selection border animated
disableAnimatedBorder Make the selection border static (not animated)
getSelectionBoxX Get the X coordinate of the selection box
setSelectionBoxX Set the X coordinate of the selection box
getSelectionBoxY Get the Y coordinate of the selection box
setSelectionBoxY Set the Y coordinate of the selection box
getSelectionBoxWidth Get the width of the selection box
setSelectionBoxWidth Set the width of the selection box
getSelectionBoxHeight Get the height of the selection box
setSelectionBoxHeight Set the height of the selection box
setSelectionAspectRatio Set the aspect ratio of the selection box
clearSelectionAspectRatio Clear the aspect ratio of the selection box (allows free resizing)
getImageSrc Get the src to the current image being displayed
getImageWidth Get the width of the current image being displayed
getImageHeight Get the height of the current image being display
getImageAspectRatio Get the aspect ratio of the current image being displayed
setImageSrc Set the src of the image to be displayed
selectEverything Select the entire image
selectCentredSquare Select a square centred in the middle of the image
selectCentredFittedAspectRatio Select an area matching the aspect ratio centred in the middle of the image

Events

Event Trigger Name Description
selectionResize crop-select-js.selection.resize Triggered when the crop selection is resized
selectionMove crop-select-js.selection.move Triggered when the crop selection is moves

Event 'selectionResize'

This event is triggered when the crop selection is resized.

You can attach a callback by either providing a callback function when initialising, or by attaching an event listener.

To attach the event listener when initialising, do:

Alternatively you can attach an event listener (which can be after initialisation) by:

Payload Object

The payload that is given on this event will have the structure:


Event 'selectionMove'

This event is triggered when the crop selection is moved.

You can attach a callback by either providing a callback function when initialising, or by attaching an event listener.

To attach the event listener when initialising, do:

Alternatively you can attach an event listener (which can be after initialisation) by:

Payload Object

The payload that is given on this event will have the structure:


License

CropSelectJs is released under the GNU GPL 3.0 license. View license


All versions of crop-select-js with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zara-4/crop-select-js contains the following files

Loading the files please wait ....