salted-herring / salted-cropper Goto Github PK
View Code? Open in Web Editor NEWCropper field for SilverStripe
License: MIT License
Cropper field for SilverStripe
License: MIT License
If you migrate from using the default SilverStripe Image class to using SaltedCroppableImage, you end up having to create a task to migrate these images. It'd be great if there was a task included in the module to handle this.
Currently the readme says you can do this in a SS template:
$Photo
$Photo.Cropped
$Photo.Cropped.SetWidth(100)
However, if a user has not set a crop yet (i.e. have just uploaded the image & not cropped) then .Cropped
returns nothing. Instead we should advise users to call .getCropped
If a user uploads an image, sets the crop & then removes the image, the next uploaded image should have the crop reset. We shouldn't automatically inherit the crop from the previous image.
Currently when using the cropper field you have to specify a ratio like so:
SaltedUploader::create('Image', 'Image')->setCropperRatio(100/50)
There are times when the ratio is irrelevant - i.e. you want the user to just use the toll to crop the image to whatever shape they like. Currently it falls back to a 1:1 ratio - I'd like to be able to have an unrestricted cropper if I don't supply a ratio.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.